Skip to navigation

Get All Holidays

Get all holidays/time-off entries for the current workspace with optional filters

Headers

xi-api-keystringOptional
xi-workspace-idstringRequired
The customer workspace a reseller's API key acts on.

Query parameters

start_unixinteger or nullOptional
Filter entries overlapping from this timestamp
end_unixinteger or nullOptional
Filter entries overlapping before this timestamp
time_off_typeenum or nullOptional

Filter by type: location, staff, or asset

Allowed values:
resource_idstring or nullOptional

Filter by associated resource ID (staff/asset)

location_idstring or nullOptional
Filter by location ID

Response

Successful Response
namestring
Display name of the closure or time off.
start_dateobject
First day of the closure or time off, inclusive.
end_dateobject
Last day of the closure or time off, inclusive.
time_off_typeenum

What the entry applies to: a location, a staff member, or an asset.

Allowed values:
idstring

The closure or time-off entry’s ID.

created_at_unixinteger
When the entry was created, as a Unix timestamp in seconds.
updated_at_unixinteger
When the entry was last updated, as a Unix timestamp in seconds.
holiday_typeenumOptionalDefaults to closed

‘closed’ for no availability, or ‘override’ to use override_hours instead of the regular hours.

Allowed values:
override_hourslist of objects or nullOptional

Replacement working hours when holiday_type is ‘override’.

resource_idstring or nullOptional

The staff member or asset ID; required when time_off_type is ‘staff’ or ‘asset’.

location_idstring or nullOptional

For LOCATION type: the location this closure applies to.

reasonstring or nullOptional
Optional note on why the closure or time off happens, up to 500 characters.

Errors

422
Unprocessable Entity Error