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.
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>
application/jsonRequest body · required
3Converting overtime earned in August.Responses
38640057600Balance converted successfully.Authorization Token is missingYou do not have access to this PBX.User not found.Conversion amount exceeds the current compensatory balance.https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/overtime/conversion
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);
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057