Skip to content

Convert overtime balance into holiday days (user)

Convert a whole number of days of overtime (compensatory) balance into legal holiday days on the ongoing overtime period. Irreversible. May be repeated within the period while balance remains.

The credited holiday days land in the compensatory-balance pool, and the same amount is deducted from the overtime balance on the current period.

422 when a conversion is not possible: no ongoing period, the remaining balance is under a full day, or the requested days exceed it.

HTTP: bearerAuth

User bearer token. Default authentication for customer-facing endpoints. Obtain a token by calling POST /login with your credentials, then send it on every subsequent request as Authorization: Bearer <token>. The token inherits the permissions and PBX scope of the authenticated user.

HTTP Authorization Scheme
bearer
Bearer format
Bearer <token>
pbx path · string · uuid *
UUID of the PBX tenant. Must be the tenant the token belongs to; anything else is refused with 403 rather than answered from another tenant.
employee_id path · string · uuid *
UUID of the Tempus employee whose queue this is. Must be the caller's own employee record: a queue is built from the approval rows addressed to one person, so another employee's id is refused rather than quietly answered with your own.
accept header · string
example: application/json

Request body · required

Request schema
days*integer
Whole days of overtime balance to convert.
≥ 1≤ 99
example: 3
commentstring | null
Optional note stored on the conversion.
length: 0–500
example: Converting overtime earned in August.

Responses

Created. The conversion was recorded.
Response schema
daysinteger
example: 3
amount_secondsinteger
Overtime converted, in seconds.
example: 86400
new_balance_secondsinteger
Overtime balance remaining after the conversion, in seconds.
example: 57600
messagestring
example: Balance converted successfully.
Authorization Token Missing. This error is returned when the authorization token is missing.
Response schema
errorstring
Error message
example: Authorization Token is missing
Forbidden. The caller is outside this PBX, or asked for an employee record that is not their own.
Response schema
messagestring
example: You do not have access to this PBX.
Not found. No such employee in this PBX.
Response schema
messagestring
example: User not found.
Unprocessable. The conversion is not allowed: no ongoing period, the remaining balance is under a full day, or the requested days exceed it.
Response schema
messagestring
example: Conversion amount exceeds the current compensatory balance.
post https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/overtime/conversion
Base URL
Request sample
curl -X POST 'https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/overtime/conversion' \
  -H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/overtime/conversion', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': `Bearer ${YOUR_TOKEN}`,
  },
});

const data = await response.json();
console.log(data);
import requests

response = requests.post('https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/overtime/conversion',
    headers={'Authorization': f'Bearer {YOUR_TOKEN}'}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
    'http' => [
        'method'  => 'POST',
        'header'  => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
    ],
]);

$response = file_get_contents('https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/overtime/conversion', false, $context);
$data = json_decode($response, true);
print_r($data);
Sample request
No request example provided.
No example for this status.
{}
"error": "Authorization Token is missing"
}
Cache-Control string
example: private, must-revalidate
Connection string
example: keep-alive
Content-Type string
example: application/json
Vary string
example: Origin
X-RateLimit-Limit integer
Max requests allowed in the current rate-limit window.
example: 60
X-RateLimit-Remaining integer
Requests remaining in the current rate-limit window.
example: 57
No example for this status.
No example for this status.
No example for this status.