Creates a new absence region.

Creates a new absence region. An absence region is defined by an ISO 3166-1 alpha-2 country code and a location code. There can be multiple absence regions for a country, but only one absence region for a country and location. (no duplicates)

Subscription Level
This endpoint requires the Standard plan or higher.
Required Permissions
The user must be an admin or have user-planning-data:write permissions.

Headers

AuthorizationstringRequired

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

Request

This endpoint expects an object.
namestringRequired>=1 character<=255 characters
The name of the absence region. Should be unique.
countryCodestringRequired>=1 character<=2 characters

The ISO 3166-1 alpha-2 country code. (e.g. ‘DE’ for Germany)

locationCodestring or nullOptional<=25 characters

The (optional) location code of the absence region. It is in ISO 3166-2 format. (e.g. ‘DE-BE’ for Berlin, Germany)

isDefaultbooleanOptional
Indicates whether the absence region is the default absence region. A default absence region is automatically assigned to new employees.

Response

OK
idUUID or null
createdOndatetime or null
createdByUUID or null
updatedOndatetime or null
updatedByUUID or null
namestring or null
The name of the absence region, as specified by the user. It must be unique within the workspace.
countryCodestring or null

The country code of the absence region. It must be a valid ISO 3166-1 alpha-2 country code.

countrystring or null
The english name of the country.
locationCodestring or null

The location code of the absence region. It is optional. It should be a valid ISO 3166-2 country subdivision code.

locationstring or null
The name of the location. It will always be in the related country's language.
isDefaultboolean or null
Indicates whether the absence region is the default absence region. Any new user will be assigned to the default absence region.
numberOfPublicHolidaysinteger or null
The number of public holidays in the absence region.
assignedUserslist of UUIDs or null
The list of user ids assigned to the absence region.