Calendar colors per entry type
Cell colors for GET /tempus/api/v2/{pbx}/calendar, the same palette as the /tempus/calendar page. Each value is { background, text } in solid hex, one set for light and dark mode. A request adds pattern: stripes with a soft pattern_color of the same hue; a removal keeps the plain fill and adds icon: minus, a minus marker drawn in the text color.
Pick the key from an event's type and status: absence-<type> when approved, absence-request.<type> when pending, absence-removal.<type> when pending_removal (type is legal, illness or special). Home office uses home-office-approved or, when pending, home-office-request; there is no home-office removal key. Holidays use public-holiday for public_holiday and special-holiday for custom_holiday. The absence keys (absence-absence, absence-request.absence, absence-removal.absence) serve the interactive calendar's legacy rows; the calendar endpoint never returns that type. Any employee of the PBX may read it.
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
dataobject
Authorization Token is missinghttps://cockpit.voxbi.com/api/v1/v2/{pbx}/calendar/colors
curl -X GET 'https://cockpit.voxbi.com/api/v1/v2/{pbx}/calendar/colors' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/v2/{pbx}/calendar/colors', {
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}/calendar/colors',
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}/calendar/colors', false, $context);
$data = json_decode($response, true);
print_r($data);
{ … }
"data": { … }
"public-holiday": { … },
"special-holiday": { … },
"absence-legal": { … },
"absence-special": { … },
"absence-illness": { … },
"absence-absence": { … },
"absence-request": { … },
"legal": { … },
"special": { … },
"illness": { … },
"absence": { … }
"absence-removal": { … },
"legal": { … },
"special": { … },
"illness": { … },
"absence": { … }
"home-office-approved": { … },
"home-office-request": { … }
{ … }
private, must-revalidatekeep-aliveapplication/jsonOrigin6057