List the home office requests waiting on you to decide (user)
The home office requests this employee is asked to decide, newest first.
One entry per day-row: a home office request for a week is stored as a row per day,
each decided on its own, and each carrying its own id and place in the chain. Read
dates rather than start/end. Requests to take back already approved days are
included, marked sub_type: removal.
Read off the approval rows addressed to them, so approval chains are honoured
exactly as the decision endpoints honour them: which step holds the request,
watchers, self-approval grants, and restarts. Requests at a step below theirs are
included with can_decide_now: false, so a validator further up a chain sees what
is coming rather than having it appear from nowhere.
Your own employee record only: another employee's id returns 403, since a queue is built from rows addressed to one person.
One endpoint per request type, matching how the work is looked at: a screen showing
one type pages that type, instead of over-fetching a mixed feed and filtering it.
The sibling queues are pending-requests/absences, pending-requests/home-office
and pending-requests/time-point-corrections; GET /v2/{pbx}/employee/{employee}/validator
reports how many are waiting in each.
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*array<object>
pagination*object
121410Authorization Token is missingYou do not have access to this PBX.User not found.The given data was invalid.errorsobject
filterarray<string>
sortarray<string>
pagearray<string>
per_pagearray<string>
https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/pending-requests/home-office
curl -X GET 'https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/pending-requests/home-office' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/pending-requests/home-office', {
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/v2/{pbx}/employee/{employee}/pending-requests/home-office',
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/v2/{pbx}/employee/{employee}/pending-requests/home-office', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
"data": [ … ],
{ … }
"employee": { … },
"dates": [ … ],
"requested_time": { … },
"validators": [ … ],
{ … }
"step": { … },
"pagination": { … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"errors": { … }
"filter": [ … ],
"sort": [ … ],
"page": [ … ],
"per_page": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057