Salary and absencePost manual salary account adjustments (bulk)

Post manual salary account adjustments (bulk)

Adds a manual posting (positive or negative, in hours) to one salary account for each listed employee, on one date.

Adjusts payroll balances (e.g. flex or vacation) in bulk: for every item in EmployeeUsers a Manual posting of HoursAdjustment is created on salaryAccountId at BalanceDate, with optional comments to the manager and the employee. Hours-format accounts get hours (and whole minutes); days-format accounts get the hours converted to days with each employee's average daily norm; count-format accounts get 0. Validation is all-or-nothing: if any employee fails, nothing is written and Details lists every failure. Returns 204.

Use it to:

  • Import opening balances or year-end corrections of flex / vacation accounts from a payroll system.

Not for:

  • Registering absence — use the absence registration operations, which post to the account themselves.

Behaviour:

  • Not idempotent.
  • Not safe to retry blindly.
  • Duplicates: Not deduplicated: a retry or a repeated UserId posts again (the balance is adjusted twice).
  • Side effect: Raises SalaryAccountEmployeePostingBatchCreated with the employee IDs, account and date (aggregation refresh).
  • Read-after-write consistency: not yet documented.
  • Batch: all_or_nothing

Call first: GET /v1/salary-account, GET /v1/user

Next: GET /v1/salary-account/{salaryAccountId}/aggregation

Not yet documented: behaviour (closed / approved periods); behaviour → consistency; examples (success).

curl -X POST "https://app3.timelog.com/your-account/api/v1/salary-account/123/posting" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "BalanceDate": "2024-12-25T10:00:00Z",
  "EmployeeUsers": [
    {
      "UserId": 123,
      "HoursAdjustment": 3.14,
      "CommentToManager": "null",
      "CommentToEmployee": "null"
    }
  ]
}'
{}
POST
/v1/salary-account/{salaryAccountId}/posting
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
salaryAccountIdinteger
Required

Unknown ID → 37994 (HTTP 500).

Format: int32
Content-Typestring
Required

The media type of the request body

Options: application/json
BalanceDatestring
Required

Date of the postings. Only the date part is used. Can be set on create only. Date only — no time component. - Later than today + the account setting SalaryAccountEmployeePostingDateNoOfMonthsAhead months — 37995 (HTTP 500). - On or before today − SalaryAccountEmployeePostingDateNoOfMonthsBackdate months — 37995 (HTTP 500). - Before the site creation date, or outside an employee's employment period — 30181 / 30167 for that employee, with 37993 (HTTP 500). > Not yet documented: behaviour.

Format: date-time
EmployeeUsersarray
Required

The employees to adjust; at least one. Can be set on create only. > Not yet documented: multiple → max items.

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

salaryAccountIdinteger
Required

Unknown ID → 37994 (HTTP 500).

Body

application/json
BalanceDatestring
Required

Date of the postings. Only the date part is used.

Can be set on create only.

Date only — no time component.

  • Later than today + the account setting SalaryAccountEmployeePostingDateNoOfMonthsAhead months — 37995 (HTTP 500).

  • On or before today − SalaryAccountEmployeePostingDateNoOfMonthsBackdate months — 37995 (HTTP 500).

  • Before the site creation date, or outside an employee's employment period — 30181 / 30167 for that employee, with 37993 (HTTP 500).

Not yet documented: behaviour.

EmployeeUsersarray
Required

The employees to adjust; at least one.

Can be set on create only.

Not yet documented: multiple → max items.

Responses