Time registrationsStop a time tracker (v2)

Stop a time tracker (v2)

Stops a running time tracker now and turns the tracked time into a time registration; answers 201 with a link to it.

Ends the tracker at the current server time, exactly like the v1 stop: a tracker that ran past midnight is split per day (start day plus at most the next day), the tracked time is saved as registration(s) — added to the linked registration when the tracker is linked to one — and the tracker is deleted. Unlike v1, the registration is NOT in the body: the response is 201 Created with body null and a Location header to GET /v1/time-registration/{id} of the LAST registration written (the v1 route, by design of the call — there is no v2 registration GET).

Use it to:

  • Stop button of a timer UI; follow Location to show the resulting registration.

Not for:

  • Discarding a tracker without registering time → DELETE /v1/time-tracker/{id}

Behaviour:

  • Not idempotent.
  • Not safe to retry blindly. A second call targets the deleted tracker and fails with 500.
  • Side effect: Ends the tracker at server time; splits it across days when it ran past midnight (max 1 extra day).
  • Side effect: Creates or updates time registration(s) with full registration side effects (work units, invoicing, salary, financials).
  • Side effect: Deletes the tracker once converted.
  • Side effect: Writes a Serilog information line (purpose MeasureTimeRegistrationServiceProcessingTime) with the tracker owner's user ID and hours.
  • On failure: If conversion yields no registration, the ended tracker is saved and the call returns 500.
  • Read-after-write consistency: not yet documented.

Call first: GET /v2/time-tracker/active, POST /v1/time-tracker/task/start-time-tracker, POST /v1/time-tracker/absence/start-time-tracker

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

See also: POST /v1/time-registration/stop-time-tracker/{timeTrackerId}

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

curl -X POST "https://app3.timelog.com/your-account/api/v2/time-tracker/stop/123" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
"null"
POST
/v2/time-tracker/stop/{timeTrackerId}
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.
path
timeTrackerIdinteger
Required

Integer ID of the tracker (TimeTrackerId from GET /v2/time-tracker/active), not a registration ID. No {int} route constraint: a non-integer is a 400 model-state error.

Format: int32
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.

Path Parameters

timeTrackerIdinteger
Required

Integer ID of the tracker (TimeTrackerId from GET /v2/time-tracker/active), not a registration ID. No {int} route constraint: a non-integer is a 400 model-state error.

Responses