List public holidays for an employee (user)
Returns a paginated list of public holidays relevant to the employee. The countries are derived from the employee's contracts that overlap the requested date range, and holidays are returned for those countries. When no date filters are supplied the range defaults to the current calendar year. Filtering and sorting are powered by Spatie Query Builder.
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
*
UUID of the PBX tenant.
employee_id
path · string · uuid
*
UUID of the employee whose public holidays are requested.
filter[from]
query · string · date
Return holidays on or after this date. Defaults to the start of the current year.
filter[to]
query · string · date
Return holidays on or before this date. Defaults to the end of the current year.
sort
query · string
Sort field. Allowed: date. Prefix with - for descending.
page
query · integer
Page number to retrieve.
per_page
query · integer
Number of items per page.
accept
header · string
example:
application/jsonResponses
Paginated list of public holidays for the employee's countries.
Response schema
dataarray<object>
Each item — Tempus public holiday as serialized by the V1 `TempusPublicHolidayResource`.
A public holiday marks a non-working (or partially non-working) day used by the
Tempus time and attendance module when computing worked hours, leave, and pay.
This object documents the exact keys returned by the resource, not the raw
database columns. Two fields are renamed or derived on output: the tenant
identifier is exposed as `mxvp_user_id` (falling back to the authenticated
caller's PBX when the holiday has no own `pbx_id`), and the model `duration`
column is exposed as `halfday`. The `country_cc` value is the ISO 3166-1
alpha-2 code resolved from the related `Country` record. Date and timestamp
values are emitted as ISO 8601 strings.
id*string · uuid
Unique public holiday identifier.
read-only
example:
550e8400-e29b-41d4-a716-446655440000mxvp_user_idstring | null · uuid
Identifier of the Pbx (tenant) that owns this public holiday. Sourced from
the holiday's own `pbx_id` and, when that is absent, from the authenticated
caller's PBX. Null only when neither the holiday nor the caller resolves to
a PBX.
example:
550e8400-e29b-41d4-a716-446655440001name*string
Human-readable name of the public holiday.
example:
New Year's Daydate*string · date-time
Calendar date of the public holiday, emitted as an ISO 8601 timestamp at
the start of that day in the application timezone.
example:
2024-01-01T00:00:00+00:00halfday*string
Portion of the day the holiday applies to: `fullday` for an entire
non-working day, `halfam` for a non-working morning, and `halfpm` for a
non-working afternoon.
enum:
fullday halfam halfpmexample:
fulldaycountry_ccstring | null
ISO 3166-1 alpha-2 country code of the holiday's associated country (for
example `LU` or `US`), resolved from the related `Country` record. Null
when the holiday is not linked to a country.
length: 2–2
example:
USdelete_datestring | null · date-time
Soft-delete timestamp, emitted as an ISO 8601 string. Null for active
holidays; populated only when the holiday has been soft-deleted and is
returned in a trashed listing.
read-only
linksobject
firststring
The first page of the resource
example:
http://localhost/api/v1/resources?page=1laststring
The last page of the resource
example:
http://localhost/api/v1/resources?page=1prevnull | string
The previous page of the resource
nextnull | string
The next page of the resource
metaobject
current_pageinteger
The current page of the resource
≥ 1
example:
1fromnull | integer
The first item of the resource
≥ 1
example:
1last_pageinteger
The last page of the resource
≥ 1
example:
1linksarray<object>
urlstring | null
The url of the resource (null for the boundary prev/next links)
example:
http://localhost/api/v1/resources?page=1labelstring
The label of the resource
example:
firstactiveboolean
The status of the resource
example:
1pathstring
The path of the resource
example:
http://localhost/api/v1/resourcesper_pageinteger
The number of items per page of the resource
≥ 1
example:
15tonull | integer
The last item of the resource
≥ 1
example:
1totalinteger
The total number of items of the resource
≥ 0
example:
1Authorization Token Missing. This error is returned when the authorization token is missing.
Response schema
errorstring
Error message
example:
Authorization Token is missingUnprocessable Parameters. This error is returned when a parameter is not valid.
Response schema
messagestring
example:
The given data was invalid.errorsobject
filterarray<string>
[]string
sortarray<string>
[]string
pagearray<string>
[]string
per_pagearray<string>
[]string
get
https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/public-holidays
Base URL
Request sample
curl -X GET 'https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/public-holidays' \
-H 'Authorization: Bearer YOUR_TOKEN'
const response = await fetch('https://cockpit.voxbi.com/api/v1/{pbx_id}/user/{employee_id}/public-holidays', {
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/{employee_id}/public-holidays',
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/{employee_id}/public-holidays', false, $context);
$data = json_decode($response, true);
print_r($data);
No example for this status.
{ … }
"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{ … }
"errors": { … }
"filter": [ … ],
"The filter field must be an array."
],
"sort": [ … ],
"The sort field must be a string."
],
"page": [ … ],
"The page field must be an integer."
],
"per_page": [ … ]
"The per page field must be an integer."
]
}
}
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