Skip to main content
POST

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
employeeId
string<uuid>
required

Employee whose overtime is compensated with rest. Must belong to the company of the token.

absenceTypeId
string<uuid>
required

Hours compensation absence type the rest is credited to. Must be available for the employee (see GET /schedule/v1/employees/available-hours-compensation-types).

from
string<date>
required

First day of the period (Y-m-d). Must not be after to (422 validation on from: validator.invalid_date).

Example:

"2026-10-01"

to
string<date>
required

Last day of the period (Y-m-d), inclusive.

Example:

"2026-10-31"

balanceBeforeSeconds
integer
required

Balance the client read before compensating, in seconds, for the resolved source and the same from/to (see the concurrency note above).

Example:

114750

amountSeconds
integer

Seconds to compensate. Required unless compensateAll is true: when it is omitted or not greater than zero the request is rejected with 422 insufficient_compensable_balance.

Example:

1200

compensateAll
boolean
default:false

When true, compensates the whole compensable balance of the period and amountSeconds is not needed.

source
enum<string>

Balance the compensation draws from. 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). Any other value, including the rule sources multiplier_rule and typifying_rule (the public API does not expose rule compensation), is rejected with 422 validation on source (validator.invalid_choice).

Available options:
total_balance,
positive_balance,
negative_balance
note
string | null

Free text stored with the compensation and shown in its history

Response

Rest compensation created. The status is 200 (not 201) because the controller answers through fromRawData; meta is the default single-object meta.

data
object
required
meta
object
required