EmployeesSubmit timesheet days for approval

Submit timesheet days for approval

Closes the listed days of an employee's timesheet and sends each one for approval.

Like submit-period, but for an explicit set of days that need not be consecutive. The close checks (running time tracker, account zero-hours / below-standard-time rule) are evaluated once over all listed days together; if they pass, each day is then closed and announced separately — one dialogue entry and one TimesheetClosed* event per day.

Use it to:

  • Submit only the working days that the source system has finalised.
  • Resubmit a day after fixing a rejected registration.

Not for:

  • A contiguous range — POST /v1/approval/timesheets/submit-period does it in one batch and one event.

Behaviour:

  • Not idempotent.
  • Safe to retry only under a condition. Re-submitting adds another dialogue entry and event per day; nothing checks that a day is already submitted.
  • Duplicates: Not deduplicated.
  • Side effect: Per listed day: an approval-dialogue entry with Comment; approval context items set to Submitted.
  • On failure: Days are closed one at a time after the up-front checks; an unexpected failure on a later day leaves the earlier days submitted.
  • Changes are visible to the next read immediately.
  • Batch: partial

Call first: GET /v1/approval/timesheets/get-status-by-dates

Next: GET /v1/approval/timesheets/get-status-by-dates

See also: POST /v1/approval/timesheets/submit-period

curl -X POST "https://app3.timelog.com/your-account/api/v1/approval/timesheets/submit-dates" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "EmployeeUserID": 123,
  "Dates": [
    "null"
  ],
  "Comment": "null"
}'
"null"
POST
/v1/approval/timesheets/submit-dates
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.

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.
Content-Typestring
Required

The media type of the request body

Options: application/json
EmployeeUserIDinteger
Required

User ID of the employee whose days are submitted. Refers to UserRead.UserID. Look up valid values with GET /v1/user. - 0, negative or omitted — 400 "'Employee User ID' must be greater than '0'." - another user than the caller, without the needed rights — 500 Code 102, ErrorCode 37966.

Format: int32
Datesarray
Required

The days to close. Each day is closed and announced (TimesheetClosed event) separately, in the order sent. Date only — no time component. - omitted, null or empty — No validation rule: fails inside the engine → 500 Code 100. - a date with a time-of-day — Compared as sent: the active-time-tracker check matches only midnight values (x == StartTime.Date).

Format: date-time
Commentstringnull

Optional free text stored on the submit dialogue entry of every submitted day. Contains personal data.

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.

Body

application/json
EmployeeUserIDinteger
Required

User ID of the employee whose days are submitted.

Refers to UserRead.UserID. Look up valid values with GET /v1/user.

  • 0, negative or omitted — 400 "'Employee User ID' must be greater than '0'."

  • another user than the caller, without the needed rights — 500 Code 102, ErrorCode 37966.

Datesarray
Required

The days to close. Each day is closed and announced (TimesheetClosed event) separately, in the order sent.

Date only — no time component.

  • omitted, null or empty — No validation rule: fails inside the engine → 500 Code 100.

  • a date with a time-of-day — Compared as sent: the active-time-tracker check matches only midnight values (x == StartTime.Date).

Commentstring,null

Optional free text stored on the submit dialogue entry of every submitted day.

Contains personal data.

Responses

Success without content: HTTP 200 with the literal JSON body null. Literal JSON null (TafSuccessResult). Read the result back with get-status-by-dates.