Skip to navigation

Create Holiday

Create a new holiday

Headers

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

Request

This endpoint expects an object.
namestringRequired
Display name of the closure or time off.
start_dateobjectRequired
First day of the closure or time off, inclusive.
end_dateobjectRequired
Last day of the closure or time off, inclusive.
time_off_typeenumRequired

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

Allowed values:
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.

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