Each item — A single overtime decision recorded against an employee for a given overtime
calculation period. A decision captures how an employee's accrued overtime
balance is resolved: how much is paid out, converted, reset, or carried
forward, together with the resulting new balance.
All duration fields (`decision_balance`, `decision_overtime`, `to_pay`,
`to_increment`, `to_convert`, `to_reset`, `decision_new_balance`) are
expressed as a whole number of seconds. They are returned as raw integer
second counts, not as the HHH:MM display strings used in the admin UI.
The related calculation period is only present in the response under
`overtime_calculation_period` when it has been explicitly loaded by the
endpoint (eager loaded); otherwise the field is omitted.
**Rows for a period that is still running are computed live.** An employee
decides once, part-way through the period, and then keeps working, so the
figures stored on the row are a snapshot of that moment and go out of date
immediately. On `GET /{pbx_id}/user/{employee_id}/user-overtime-decision`,
such a row therefore reports `decision_balance`, `decision_overtime`,
`to_increment` and `decision_new_balance` as they stand right now, against the
decision the employee made, and `values_live` is true. Settled history — a
processed row, or any row whose period has ended — is returned exactly as
stored. See `values_live` below.
id*string · uuid
Unique identifier of the overtime decision.
read-only
example: 550e8400-e29b-41d4-a716-446655440000
mxvp_user_id*string · uuid
Identifier of the Pbx (tenant) that owns this decision.
example: 550e8400-e29b-41d4-a716-446655440001
ext_id*string | null
External extension identifier of the employee the decision applies to,
resolved from the employee record. Null when the employee has no
associated extension.
example: 1042
overtime_calculation_period_id*string | null · uuid
Identifier of the overtime calculation period this decision belongs to.
Null when the decision is not linked to a specific period.
example: 550e8400-e29b-41d4-a716-446655440002
decision_type*string
How the decision was created. Defaults to `manual` when not otherwise
set. `manual` decisions are entered by an operator, `automatic` decisions
are produced by the system.
enum: manual automatic
example: manual
decision*string | null
The chosen resolution applied to the employee's overtime balance for the
period (for example whether the overtime is paid out, converted, or
reset). Null when no resolution has been selected yet.
example: pay_out
decision_balance*integer · int32
The employee's overtime balance, in seconds, carried into this period:
the `decision_new_balance` of the last LOCKED period, or the contract's
opening base when nothing has been locked yet. Maps to the model's
`old_balance`.
example: 36000
decision_overtime*integer · int32
The overtime accrued during the period, in seconds, that this decision
resolves. Counted over COMPLETED days only — the range ends at yesterday
midnight, so neither the remaining workdays nor the hours still owed on
today are counted as undertime. (A day carries its full shift requirement
from the moment it begins, so a day in progress always reads negative.)
Negative when the employee genuinely worked less than required over those
completed days. Maps to the model's `overtime`.
On a running period this is recomputed per request and keeps moving until
the period closes; see `values_live`.
example: 7200
to_pay*integer · int32
Amount of overtime, in seconds, to be paid out to the employee. Never
negative and never more than `decision_balance + decision_overtime`.
This is the employee's own commitment to cash out a given amount, so it is
NOT re-derived on a live row even as the accrual grows — it is only clamped
down if it would exceed what is available. The growth lands on
`to_increment` instead.
example: 3600
to_pay_extra*integer · int32
Additional overtime to pay out, in seconds. Always returned as 0 by this
endpoint (reserved for future use).
example: 0
to_increment*integer · int32
Amount of overtime, in seconds, added to the employee's balance:
`decision_overtime - to_pay`. Negative when the payout is larger than the
period's accrual (the difference is drawn from the carried-in balance), or
when the period itself ended in undertime.
example: 0
to_convert*integer · int32
Amount of overtime, in seconds, to be converted (for example into leave
or another balance type).
example: 1800
to_reset*integer · int32
Amount of overtime, in seconds, to be reset (discarded) from the balance.
example: 0
decision_new_balance*integer · int32
The resulting overtime balance, in seconds, after applying this decision —
what the employee has left once the payout is taken out. Derived by the
system as
`decision_balance + decision_overtime - to_pay - to_convert - to_reset`.
Maps to the model's `new_balance`.
example: 38400
comment*string | null
Optional free-form note explaining or justifying the decision.
example: Carried forward at the employee's request
locked*boolean
Whether the decision has been processed and locked. True once the
decision has a processing timestamp, after which it should be treated as
final and immutable.
example:
values_live*boolean
Whether the duration fields on this row were computed just now rather than
read from the decision snapshot.
True only for a row whose period is still running and which has not been
processed. Those figures are a moving target — they change as the employee
keeps working, and are final only once the period closes and the decision
is locked. False for all settled history, where the stored values are
returned verbatim.
example:
created*string | null
Timestamp when the decision was created, formatted as `Y-m-d H:i:s`
(for example `2024-03-01 08:29:07`). Null when the creation timestamp is
not set.
read-only
example: 2024-03-01 08:29:07
overtime_calculation_periodobject
The related overtime calculation period this decision belongs to. Only
present when the relation has been eager loaded by the endpoint;
otherwise the field is omitted from the response.
idstring · uuid
Unique identifier of the overtime calculation period.
read-only
example: 550e8400-e29b-41d4-a716-446655440002
mxvp_user_idstring · uuid
Identifier of the Pbx (tenant) that owns the period.
example: 550e8400-e29b-41d4-a716-446655440001
company_idstring | null · uuid
Identifier of the Tempus company the period belongs to.
example: 550e8400-e29b-41d4-a716-446655440003
ext_idstring | null
External extension identifier of the employee, falling back to the
period's user identifier when the employee has no extension.
example: 1042
startstring | null · date-time
ISO 8601 timestamp marking the start of the calculation period.
example: 2024-03-01T00:00:00Z
endstring | null · date-time
ISO 8601 timestamp marking the end of the calculation period.
example: 2024-03-31T23:59:59Z
lockedboolean
Whether the calculation period is locked and no longer editable.
example:
delete_datestring | null · date-time
ISO 8601 timestamp when the period was soft deleted. Null while the
period is active.