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).
- Batch: all_or_nothing
Call first: GET /v1/salary-account, GET /v1/user
Next: GET /v1/salary-account/{salaryAccountId}/aggregation
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"
}
{
"Message": "Authorization has been denied for this request."
}
{
"Message": "Page Not Found",
"Timestamp": "…",
"RawUrl": "https://app{server-number}.timelog.com/{account}/api/v1/salary-account/{salaryAccountId}/posting"
}
{
"Code": 100,
"Message": "Unknown error occur in system, please contact system administrator.",
"Details": [],
"Parameters": "…",
"Url": "https://app{server-number}.timelog.com/{account}/api/v1/salary-account/{salaryAccountId}/posting"
}
/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.
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.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).
The employees to adjust; at least one. Can be set on create only.
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.
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).
The employees to adjust; at least one.
Can be set on create only.