List your own requests and where each one has got to (user)
Everything this employee has asked for - absence, illness and special leave, home office days, time-point corrections, and requests to remove already approved days - newest first, each with where it stands in its approval chain.
The mirror of the pending queues: those list what is waiting on you to decide, this
lists what you asked for. progress is the same shape either way, because "who is
holding my request" is one question asked from two sides.
Read this rather than v1's own-requests listing when you need status. That one returns
a flat accepted_by array of names and answers, with no step, no total and nobody
identified as currently holding the request, so "at step 2 of 3, waiting on HR" cannot
be built from it.
Every status by default, not only pending: a settled request is the more common thing
to look at, and GET /v2/{pbx}/requests/{kind}/{id}/trail explains how it got there.
Your own employee record only: another employee's id returns 403.
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>
open settled application/jsonResponses
data*array<object>
pagination*object
132410Authorization 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}/requests
curl -X GET 'https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/requests' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/v2/{pbx}/employee/{employee}/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/v2/{pbx}/employee/{employee}/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/v2/{pbx}/employee/{employee}/requests', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"errors": { … }
"filter": [ … ],
"sort": [ … ],
"page": [ … ],
"per_page": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057