Skip to content

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.

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 path · string · uuid *
UUID of the PBX tenant. Must be the tenant the token belongs to; anything else is refused with 403 rather than answered from another tenant.
accept header · string
example: application/json

Responses

OK. Colors keyed by calendar entry type, in `data`.
Response schema
dataobject
Free-form object
Authorization Token Missing. This error is returned when the authorization token is missing.
Response schema
errorstring
Error message
example: Authorization Token is missing
get https://cockpit.voxbi.com/api/v1/v2/{pbx}/calendar/colors
Base URL
Request sample
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": { … },
"background": "#3d6d92",
"text": "#ffffff"
},
"special-holiday": { … },
"background": "#afd2ee",
"text": "#000000"
},
"absence-legal": { … },
"background": "#a5d6a7",
"text": "#000000"
},
"absence-special": { … },
"background": "#8ecfd6",
"text": "#000000"
},
"absence-illness": { … },
"background": "#ecbf4a",
"text": "#000000"
},
"absence-absence": { … },
"background": "#a5d6a7",
"text": "#000000"
},
"absence-request": { … },
"legal": { … },
"background": "#a5d6a7",
"text": "#000000",
"pattern": "stripes",
"pattern_color": "#d7edd7"
},
"special": { … },
"background": "#8ecfd6",
"text": "#000000",
"pattern": "stripes",
"pattern_color": "#cce9ed"
},
"illness": { … },
"background": "#ecbf4a",
"text": "#000000",
"pattern": "stripes",
"pattern_color": "#f6e2ae"
},
"absence": { … }
"background": "#a5d6a7",
"text": "#000000",
"pattern": "stripes",
"pattern_color": "#d7edd7"
}
},
"absence-removal": { … },
"legal": { … },
"background": "#a5d6a7",
"text": "#000000",
"icon": "minus"
},
"special": { … },
"background": "#8ecfd6",
"text": "#000000",
"icon": "minus"
},
"illness": { … },
"background": "#ecbf4a",
"text": "#000000",
"icon": "minus"
},
"absence": { … }
"background": "#a5d6a7",
"text": "#000000",
"icon": "minus"
}
},
"home-office-approved": { … },
"background": "#e9dac1",
"text": "#000000"
},
"home-office-request": { … }
"background": "#e9dac1",
"text": "#000000",
"pattern": "stripes",
"pattern_color": "#f5eee3"
}
}
}
{ … }
"error": "Authorization Token is missing"
}
Cache-Control string
example: private, must-revalidate
Connection string
example: keep-alive
Content-Type string
example: application/json
Vary string
example: Origin
X-RateLimit-Limit integer
Max requests allowed in the current rate-limit window.
example: 60
X-RateLimit-Remaining integer
Requests remaining in the current rate-limit window.
example: 57