curl --request POST \
--url https://api-{region}.sesametime.com/overtime-policies/v1/adjustments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employeeId": "550e8400-e29b-41d4-a716-446655440000",
"operation": "add",
"from": "2026-01-01",
"to": "2026-01-31",
"balanceBeforeSeconds": 7200,
"amountSeconds": 3600,
"note": "Correction after audit"
}
'{
"data": {
"adjustmentId": "3f2b8c1e-6a0d-4c4e-9b7a-2d1f0e5c9a11",
"employeeId": "550e8400-e29b-41d4-a716-446655440000",
"operation": "add",
"appliedSeconds": 3600,
"balanceBeforeSeconds": 7200,
"balanceAfterSeconds": 10800
},
"meta": {
"currentPage": 1,
"lastPage": 1,
"total": 1,
"perPage": 1
}
}Adjust the overtime balance of an employee
Adds time to, subtracts time from, or resets the overtime balance of one employee of the company of the token, over the from-to period. The employee must belong to the company of the token and have overtime balance rows in that period.
Optimistic concurrency: for add and subtract, balanceBeforeSeconds must equal the current balance of the resolved source, as returned by GET /overtime-policies/v1/employees/{employeeId}/balance for the same from/to (key positive_balance for source positive_balance, negative_balance for negative_balance, total_balance for total_balance); for multiplier_rule and typifying_rule it must equal the balanceSeconds of the rule ruleId returned by GET /overtime-policies/v1/employees/{employeeId}/rule-balances for the same from/to. Otherwise the request is rejected with 409 compensable_balance_changed. The check only detects changes visible in that value: while an earlier subtract on total_balance keeps the positive balance below zero, GET /overtime-policies/v1/employees/{employeeId}/balance reports positive_balance as 0 and an add on positive_balance leaves it at 0 (it only moves total_balance), so a replayed add is not rejected and is applied again. Rule balances count closed days only (up to yesterday), as rule-balances does.
reset brings the positive and negative balances of the period to zero as of the moment it is made (movements created after it count again), and is reflected in GET /overtime-policies/v1/employees/{employeeId}/balance, GET /overtime-policies/v1/employees/{employeeId}/rest-compensable-balance and the balanceBeforeSeconds checks (a positive balance already taken below zero by an earlier subtract on total_balance is not brought back to zero): source is ignored (the movement is recorded with source total_balance) unless it is multiplier_rule or typifying_rule, in which case only the balance of the rule ruleId is brought to zero, amountSeconds is ignored and balanceBeforeSeconds is optional and not checked.
When nothing can be applied (amount omitted or not greater than zero, nothing to allocate, or a reset of a balance that is already zero) the call still answers 200 with appliedSeconds: 0 and an empty adjustmentId, and no movement is created.
Rule adjustments (source multiplier_rule or typifying_rule, ruleId mandatory) take ruleId, source and balanceSeconds (as balanceBeforeSeconds) as they are from the item of the rule in GET /overtime-policies/v1/employees/{employeeId}/rule-balances for the same from/to. They move only the balance of that rule, which can become negative. A multiplier_rule adjustment also moves the general balance when the company shows multipliers in the balance; a typifying_rule adjustment never does. balanceBeforeSeconds and balanceAfterSeconds in the response refer to the rule.
For total_balance, positive_balance, negative_balance and a non-rule reset, balanceAfterSeconds is the balance of the source read back after the adjustment, as GET /overtime-policies/v1/employees/{employeeId}/balance returns it. An add on negative_balance only cancels earlier subtracts on that source: the negative balance coming from the worked time never goes down.
curl --request POST \
--url https://api-{region}.sesametime.com/overtime-policies/v1/adjustments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"employeeId": "550e8400-e29b-41d4-a716-446655440000",
"operation": "add",
"from": "2026-01-01",
"to": "2026-01-31",
"balanceBeforeSeconds": 7200,
"amountSeconds": 3600,
"note": "Correction after audit"
}
'{
"data": {
"adjustmentId": "3f2b8c1e-6a0d-4c4e-9b7a-2d1f0e5c9a11",
"employeeId": "550e8400-e29b-41d4-a716-446655440000",
"operation": "add",
"appliedSeconds": 3600,
"balanceBeforeSeconds": 7200,
"balanceAfterSeconds": 10800
},
"meta": {
"currentPage": 1,
"lastPage": 1,
"total": 1,
"perPage": 1
}
}Authorizations
Body
- add or subtract
- reset
Balance the adjustment applies to. Optional: when omitted it defaults to total_balance, except when the policy of the employee is hybrid with separated positive/negative balances, where it is mandatory (422 hybrid_independent_policy_required). When the from-to period covers days of more than one policy, the policy of the latest closed day (up to yesterday) decides; a period with no closed day yet uses its latest day. Ignored on reset unless it is a rule source. Any value outside the enum is rejected with 422 validation on source (validator.invalid_type). For a rule, send the source of the rule as returned by GET /overtime-policies/v1/employees/{employeeId}/rule-balances.
total_balance, positive_balance, negative_balance, multiplier_rule, typifying_rule Rule whose balance is adjusted (422 validation validator.invalid_uuid when it is not a UUID). Mandatory when source is multiplier_rule or typifying_rule (422 validation on ruleId: validator.rule_ids_required_for_rule_source); rejected when source is any other value or is omitted (422 rule_id_not_allowed_for_source). It must be a rule of the company of the token of the kind the source names (422 rule_adjustment_rule_not_found). Send the ruleId of an item of GET /overtime-policies/v1/employees/{employeeId}/rule-balances together with its source.
"55555555-5555-4555-8555-555555555555"
Balance the adjustment belongs to, rest (time off) or paid (remuneration). Mandatory when any policy version of the employee in the from-to period keeps separate rest and remuneration balances (422 adjustment_bucket_required), also on reset, which then brings only that balance to zero. Rejected otherwise and with a rule source (422 adjustment_bucket_not_allowed). With bucket, balanceBeforeSeconds and balanceAfterSeconds refer to the balance of that bucket. Adjustments created without it count as paid in those policies.
rest, paid "rest"
Was this page helpful?