List the employees a schedule may assign (user)
Returns the people who may be booked into this schedule's slots: its scope resolved for you, whether that scope is whole companies, several departments, or a hand-picked list. Use it to populate the assignment dropdown on the slot create and edit forms. Booking anybody outside this list is refused with a 422.
Only employees holding a contract that is active today are listed, whatever the scope type — a hand-picked selection does not override the contract, so somebody who has left or has not started yet is left out.
Reading only requires a token belonging to the PBX, like the other schedule GET endpoints. The same list is embedded as employees on every schedule payload, so a client that already loaded the schedule does not need this call.
This replaces the former approach of calling GET /{pbx_id}/users?filter[group_id]=<the schedule's group>, which only ever worked for single-department schedules and under-reports for company and employee scoped ones.
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
dataarray<object>
550e8400-e29b-41d4-a716-446655440010Jane Smith550e8400-e29b-41d4-a716-446655440002Customer SupportAuthorization Token is missingmessagearray<string>
https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}/employees
curl -X GET 'https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}/employees' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/schedule-management/{schedule}/employees', {
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}/schedule-management/{schedule}/employees',
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}/schedule-management/{schedule}/employees', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
"data": [ … ]
{ … },
{ … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057{ … }
"message": [ … ]
private, must-revalidatekeep-aliveapplication/jsonOrigin6057