Read the employee's overtime decision preference (user)
Returns the employee's standing overtime decision preference, the same row HR edits under "Decision Preferences" on the employee record, plus the options, bounds and defaults needed to render the form.
data is null when the employee has never saved a preference; in that case meta.configured is false and the company level rule applies. Read the starting values for the form from meta.defaults.
Self service only. The request is rejected with 403 when the authenticated user has no access to the tenant or the employee record is not their own, and with 404 when the employee cannot be found.
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/jsonResponses
meta*object
1options*object
auto_decision_policy*object
preferred_decision*object
rest_policy*object
limits*object
3600115200132defaults*object
skip_if_manual_decisionpay_up_toadd_to_balance360011Authorization Token is missingmessagearray<string>
https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision-preference
curl -X GET 'https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision-preference' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision-preference', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${YOUR_TOKEN}`,
},
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision-preference',
headers={'Authorization': f'Bearer {YOUR_TOKEN}'}
)
response.raise_for_status()
data = response.json()
print(data)
<?php
$context = stream_context_create([
'http' => [
'method' => 'GET',
'header' => "Content-Type: application/json\r\nAuthorization: Bearer YOUR_TOKEN",
],
]);
$response = file_get_contents('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision-preference', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
"data": { … },
"meta": { … }
"options": { … },
"auto_decision_policy": { … },
"preferred_decision": { … },
"rest_policy": { … }
"limits": { … },
"defaults": { … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"message": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057