Voxbi Cockpit APIs
All endpoints

Employee calendar for the logged-in user

Returns the data behind the Tempus "Employee Calendar" page for the logged-in user, for a single year: the summary block, the per-company rights breakdown (details), contract periods, and a fully-classified day-by-day year_calendar. Plain data only: no colours, icons or theme; the client owns presentation.

The employee is resolved from the Sanctum token; there is no employee parameter and a caller can only ever read their own calendar. The only input is the year (bounded to the employee's contract history through next year).

Per-day type merge priority (highest first): no_contract > special_holiday > transaction (non-home-office) > public_holiday > weekend > work. Home office is an orthogonal flag, never the winning type.

HTTP: bearerAuth

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>
pbx_id path · string · uuid *
Identifier of the Pbx (tenant).
year query · integer
Calendar year to return. Must fall within the employee's `[minYear, maxYear]` bounds (earliest contract year … current year + 1). Defaults to the current year. Out-of-range values return 422.

Responses

The employee's calendar for the requested year.
Response schema
year*integer
example: 2026
year_bounds*object
Selectable year range for the year filter (earliest contract year through next year).
mininteger
maxinteger
summary*object
Aggregate rights/taken/remaining for the year.
totalsobject
Aggregate seconds for the year.
rightsinteger
takeninteger
remaininginteger
compensatoryinteger
availableinteger
cardsarray<object>
The headline figures shown as summary cards.
keystring
enum: rights taken remaining_rights compensatory_balance possible
titlestring | null
valuestring | null
Human display (days or hours), e.g. "26 days".
raw_secondsinteger
percentagenumber | null
warningboolean
True when the value fell back to an 8h/day assumption (no workshift).
commentstring | null
handle_compensatory_balanceboolean
workshift_missingboolean
True when no contract/workshift is set, so days-vs-hours fell back to 8h.
details*object
Per-company rights breakdown for the whole year.
total_secondsinteger
total_displaystring
companiesarray<object>
company_idstring | null · uuid
companystring | null
period_labelstring | null
periodsarray<object>
startstring · date
endstring · date
show_periodboolean
switched_onstring | null
subtotal_secondsinteger
subtotal_displaystring | null
rowsarray<object>
typestring | null
Human label of the holiday pool.
type_keystring | null
Machine key, e.g. legal, age, public_holiday.
descriptionstring | null
rights_secondsinteger
rights_displaystring | null
contract_periods*array<object>
The employee's contract periods clamped to the year.
startstring · date
endstring · date
daily_expected_seconds*integer
Expected working seconds per day for the year (weekly time ÷ 5).
example: 28800
year_calendar*object
Every date of the year (YYYY-MM-DD keys) mapped to its classified day.
Free-form object
Unauthenticated.
Response schema
No response body.
The authenticated user has no employee record in this Pbx.
Response schema
No response body.
The requested year is outside the employee's allowed range.
Response schema
No response body.
get https://cockpit.voxbi.com/api/v1/{pbx_id}/user/calendar
Base URL
Request sample
curl -X GET 'https://cockpit.voxbi.com/api/v1/{pbx_id}/user/calendar' \
  -H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/calendar', {
  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/calendar',
    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/calendar', false, $context);
$data = json_decode($response, true);
print_r($data);
No example for this status.
No example for this status.
No example for this status.
No example for this status.