Time registrationsUpdate the time of a registration

Update the time of a registration

Changes hours, billing, comment, date or task of a project or travel registration by its integer ID.

The timesheet's "update registration" action for project time. Addressed by the integer TimeRegistrationID; the employee is kept. It is a mixed update: TaskID, Date and MonthlyPeriod keep their values when omitted, but Comment, AdditionalComment, Billable and BillableHours are REPLACED (cleared / false / 0) when omitted. Send every field you want to keep.

Use it to:

  • Correct the hours of a registration you only know by its integer ID

Not for:

  • Absence registrations → update-hours-absence / update-half-or-full-day-absence
  • Changing the employee → PUT /v1/time-registration (PUT, full replace)

Rules across fields:

  • R1: StartTime and EndTime both sent → StartTime < EndTime and (EndTime − StartTime) in minutes = round(Hours × 60).

Behaviour:

  • Idempotent.
  • Safe to retry.
  • Side effect: Same as PUT update: overwrites Created/CreatedBy; a rejected registration becomes …RejectedAndResolved; TimeRegistrationUpdated event.
  • Side effect: Changing TaskID can create an allocation (staffing side effect, as create).
  • Read-after-write consistency: not yet documented.

Call first: GET /v1/time-registration/{timeRegistrationID}

Next: GET /v1/time-registration/{timeRegistrationID}

See also: PUT /v1/time-registration

Not yet documented: behaviour → consistency; examples (success).

curl -X POST "https://app3.timelog.com/your-account/api/v1/time-registration/update-time" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "TimeRegistrationID": 123,
  "Hours": 3.14,
  "Minutes": 42,
  "Billable": true,
  "BillableHours": 3.14,
  "BillableMinutes": 42,
  "Factor": 3.14,
  "MonthlyPeriod": "example_string",
  "TaskID": 123,
  "StartTime": "2024-12-25T10:00:00Z",
  "EndTime": "2024-12-25T10:00:00Z",
  "Date": "2024-12-25T10:00:00Z",
  "Comment": "example_string",
  "AdditionalComment": "example_string"
}'
"null"
POST
/v1/time-registration/update-time
POST
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp). The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user. > Not yet documented: how to obtain a token. > Not yet documented: token lifetime.

OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp). The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user. > Not yet documented: how to obtain a token. > Not yet documented: token lifetime.
Content-Typestring
Required

The media type of the request body

Options: application/json
TimeRegistrationIDinteger
Required

Integer ID of the registration to change. Identifier of this object, unique per TimeLog site.

Format: int32
Hoursnumber
Required

New duration in decimal hours. Unit: hours (decimal) Must be non-zero. When StartTime and EndTime are both sent, Hours × 60 must equal their difference in whole minutes.

Format: double
Minutesinteger

Duration in minutes. Unit: minutes - always — Hours is always present, and Hours wins for project time — Minutes is never applied.

Format: int32
Billableboolean

Whether the time is billable.

BillableHoursnumber

Billable duration in decimal hours. Unit: hours (decimal)

Format: double
BillableMinutesinteger

Billable duration in minutes. Unit: minutes - always — BillableHours is always passed (0 when omitted), so BillableMinutes is never applied.

Format: int32
Factornumber

Registration factor (100 = normal). Same OvertimeFactor rules as TimeRegistrationWrite.Factor (update context: a value not in the allowed list keeps the previous value).

Format: double
MonthlyPeriodstring

Salary month (MMyyyy). > Not yet documented: null semantics.

TaskIDinteger

Moves the registration to another task. Refers to TaskRead.TaskID. - TaskID differs from the current task and the employee is not allocated to it — The allocation is created (same staffing side effect as create). > Not yet documented: values → lookup op.

Format: int32
StartTimestring

Start time of the work. Time zone: none applied — sent value stored as-is Applied only when the employee has timestamps enabled (see TimeRegistrationWrite.StartTime).

Format: date-time
EndTimestring

End time of the work — used ONLY to validate Hours. Time zone: none applied - StartTime and EndTime both sent — 400 if EndTime ≤ StartTime, or if (EndTime − StartTime) in minutes ≠ round(Hours × 60). - always — Not stored; the server sets EndTime = StartTime + Hours.

Format: date-time
Datestring

Moves the registration to another date. Time zone: not yet documented. > Not yet documented: constraints → timezone.

Format: date-time
Commentstring

Free-text comment.

AdditionalCommentstring

Second free-text field, configurable per site. Conditional. Required when the site configures the additional field as mandatory (30048).

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. OAuth 2.0 bearer token, sent as Authorization: Bearer <token>. JWT and reference tokens are both accepted. The token must carry the required scope (default tlp).

The token's sub claim is the acting user. A token WITHOUT sub (client-credentials) acts as the system service user. If the sub user cannot log in (inactive, locked, deleted), the request is rejected with 401 — it is no longer let through without a user.

Not yet documented: how to obtain a token.

Not yet documented: token lifetime.

Body

application/json
TimeRegistrationIDinteger
Required

Integer ID of the registration to change.

Identifier of this object, unique per TimeLog site.

Hoursnumber
Required

New duration in decimal hours.

Unit: hours (decimal)

Must be non-zero. When StartTime and EndTime are both sent, Hours × 60 must equal their difference in whole minutes.

Minutesinteger

Duration in minutes.

Unit: minutes

  • always — Hours is always present, and Hours wins for project time — Minutes is never applied.
Billableboolean

Whether the time is billable.

BillableHoursnumber

Billable duration in decimal hours.

Unit: hours (decimal)

BillableMinutesinteger

Billable duration in minutes.

Unit: minutes

  • always — BillableHours is always passed (0 when omitted), so BillableMinutes is never applied.
Factornumber

Registration factor (100 = normal).

Same OvertimeFactor rules as TimeRegistrationWrite.Factor (update context: a value not in the allowed list keeps the previous value).

MonthlyPeriodstring

Salary month (MMyyyy).

Not yet documented: null semantics.

TaskIDinteger

Moves the registration to another task.

Refers to TaskRead.TaskID.

  • TaskID differs from the current task and the employee is not allocated to it — The allocation is created (same staffing side effect as create).

Not yet documented: values → lookup op.

StartTimestring

Start time of the work.

Time zone: none applied — sent value stored as-is

Applied only when the employee has timestamps enabled (see TimeRegistrationWrite.StartTime).

EndTimestring

End time of the work — used ONLY to validate Hours.

Time zone: none applied

  • StartTime and EndTime both sent — 400 if EndTime ≤ StartTime, or if (EndTime − StartTime) in minutes ≠ round(Hours × 60).

  • always — Not stored; the server sets EndTime = StartTime + Hours.

Datestring

Moves the registration to another date.

Time zone: not yet documented.

Not yet documented: constraints → timezone.

Commentstring

Free-text comment.

AdditionalCommentstring

Second free-text field, configurable per site.

Conditional. Required when the site configures the additional field as mandatory (30048).

Responses

Success without content: HTTP 200 with the literal JSON body null. Body is the literal JSON null. Call GET to read the result.