List employees with pending absence and home office requests (user)
Returns the employees, in scope of the authenticated validator, who have pending home office requests, absence requests, or absence removal requests awaiting validation. The authenticated user must be a Tempus employee in the given PBX; otherwise a 403 is returned.
The response is a hand-rolled envelope. The data object is keyed by the
employee's telephony extension id. Each value carries the optional
home_office, absence_requests, and absence_removals sections, populated
only when the validator has scope for that module and pending records exist.
The queue is built from the approval rows addressed to the caller, so it
accounts for approval chains: which step holds the request, watchers, and
self-approval grants. Every request entry therefore also reports
can_decide_now, watcher, step, and awaiting. Requests at a step below
the caller's are listed with can_decide_now: false: visible, not yet theirs
to decide.
home_office keeps its three date lists and adds a requests array, because
a home office group is one row per day and the date lists cannot say which
days the caller may act on.
Absence entries (absence_requests, absence_removals) also carry
next_availability: when that employee is back if this request is approved,
next to what the general next-availability answer says today. Home office does
not — a home office day is governed by a weekly limit, not time off that moves an
availability date.
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
data*object
pagination*object
132410Authorization Token is missingThis action is unauthorized.The given data was invalid.errorsobject
filterarray<string>
sortarray<string>
pagearray<string>
per_pagearray<string>
https://cockpit.voxbi.com/api/v1/{pbx_id}/validator/pending-requests
curl -X GET 'https://cockpit.voxbi.com/api/v1/{pbx_id}/validator/pending-requests' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/validator/pending-requests', {
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}/validator/pending-requests',
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}/validator/pending-requests', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
"data": { … },
"1042": { … }
"home_office": { … },
"requested_days": [ … ],
"requests": [ … ]
{ … }
"dates": [ … ],
"step": { … },
"absence_requests": [ … ],
{ … }
"next_availability": { … },
"if_approved": { … },
"current": { … }
"validators": [ … ],
{ … }
"step": { … },
"awaiting": [ … ]
"pagination": { … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"errors": { … }
"filter": [ … ],
"sort": [ … ],
"page": [ … ],
"per_page": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057