Creates a holiday. Omit ResourceIds and CountryId for global scope; set one list for people or country scope.

Persists the definition in one transaction. One occurrence is stored for each day from DateFrom through DateTo (inclusive), each as a full calendar day off. Omit CountryId and ResourceIds for a workspace-wide holiday; set one list for people or country scope. Each CountryId is an ISO 3166-1 alpha-2 string (for example NZ). The inclusive range is capped (see server validation) to limit payload size.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

x-integration-namestringOptional
The name of the calling system passed along as a header parameter

Request

Name, date range, and optional country or resource targeting.
reasonstringOptional

Reason or label for the holiday (for example, public holiday name or company shutdown).

dateFromstringOptionalformat: "date"

First calendar day of the holiday (inclusive).

dateTostringOptionalformat: "date"

Last calendar day of the holiday (inclusive). Must be on or after DateFrom.

resourceIdslist of strings or nullOptional

Resources this holiday applies to (people scope). Mutually exclusive with CountryId.

countryIdlist of strings or nullOptional

ISO 3166-1 alpha-2 country identifiers this holiday applies to (country scope). Mutually exclusive with ResourceIds.

Response

Success
errorobject or nullOptional
If the API call failed, this will contain information about the error that occurred.
successbooleanOptionalRead-only

True if the API call succeeded; false otherwise.

hasErrorbooleanOptionalRead-only
True if the API call failed.
statusCodeenumOptional
The HTTP code of the response.
datalist of objectsOptional
If the API call succeeded, this will contain the results.