Calculate overtime for an employee over a date range (user)
Calculates the accumulated overtime for a single Tempus employee within a date range and returns it split into business (overtime worked on regular business days) and non_working (overtime worked on weekends, public holidays and other non-working days). Both figures are expressed in seconds.
The window is taken from the start and end query parameters. When neither is supplied the endpoint falls back to the employee's current overtime period. The range may not exceed the configured maximum number of months (default 3); a longer range is rejected with 422. The employee must belong to the requested PBX tenant, otherwise the request returns 404.
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
72001800Authorization Token is missingmessagearray<string>
The given data was invalid.errorsobject
filterarray<string>
sortarray<string>
pagearray<string>
per_pagearray<string>
https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision/getOvertime
curl -X GET 'https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision/getOvertime' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/user-overtime-decision/getOvertime', {
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/getOvertime',
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/getOvertime', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"message": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"errors": { … }
"filter": [ … ],
"sort": [ … ],
"page": [ … ],
"per_page": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057