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"
}
]
}'
import requests
import json
url = "https://app3.timelog.com/your-account/api/v1/salary-account/123/posting"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"BalanceDate": "2024-12-25T10:00:00Z",
"EmployeeUsers": [
{
"UserId": 123,
"HoursAdjustment": 3.14,
"CommentToManager": "null",
"CommentToEmployee": "null"
}
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://app3.timelog.com/your-account/api/v1/salary-account/123/posting", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"BalanceDate": "2024-12-25T10:00:00Z",
"EmployeeUsers": [
{
"UserId": 123,
"HoursAdjustment": 3.14,
"CommentToManager": "null",
"CommentToEmployee": "null"
}
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"BalanceDate": "2024-12-25T10:00:00Z",
"EmployeeUsers": [
{
"UserId": 123,
"HoursAdjustment": 3.14,
"CommentToManager": "null",
"CommentToEmployee": "null"
}
]
}`)
req, err := http.NewRequest("POST", "https://app3.timelog.com/your-account/api/v1/salary-account/123/posting", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://app3.timelog.com/your-account/api/v1/salary-account/123/posting')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"BalanceDate": "2024-12-25T10:00:00Z",
"EmployeeUsers": [
{
"UserId": 123,
"HoursAdjustment": 3.14,
"CommentToManager": "null",
"CommentToEmployee": "null"
}
]
}'
response = http.request(request)
puts response.body
{}
{
"Code": 200,
"Details": [
"",
"Balance Date is not a valid date.",
"At least one employee is required."
],
"Message": "Invalid model state error.",
"Parameters": "salaryAccountEmployeeManualPostingCreateModel: {"BalanceDate":"0001-01-01T00:00:00","EmployeeUsers":[]}",
"Url": "https://app{server-number}.timelog.com/{account}/api/v1/salary-account/1/posting"
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server",
"code": 500,
"requestId": "req_1234567890"
}
/v1/salary-account/{salaryAccountId}/postingTarget server for requests. Edit to use your own host.
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.
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.Unknown ID → 37994 (HTTP 500).
The media type of the request body
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.
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
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
Unknown ID → 37994 (HTTP 500).
Body
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.
The employees to adjust; at least one.
Can be set on create only.
Not yet documented: multiple → max items.