v1

latestOpenAPI 3.1.02026-08-066984441.1 MB
absenceRegions

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).

<Note title="Subscription Level" icon="layer-group">This endpoint requires the Standard plan or higher.</Note>

<Check title="Required Permissions" icon="key">The user must be an admin or have user-planning-data:write permissions.</Check>

post/absenceregions

Headers

Authorizationstring required

Bearer authentication

Request body

namestring required

The name of the absence region. Must be unique.

countryCodestring required

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

locationCodestring nullable

The (optional) location code of the absence region in ISO 3166-2 format (e.g. 'DE-HH' for Hamburg, Germany).

isDefaultboolean

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

Response

OK

idstring uuid

The id of the entity.

createdOnstring date-time

The date this entity was created.

createdBystring uuid

The id of the user who created this entity.

updatedOnstring date-time

The date this entity was last modified.

updatedBystring uuid

The id of the user who last modified this entity.

namestring nullable

The name of the absence region, as specified by the user. It must be unique within the workspace.

countryCodestring nullable

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

countrystring nullable

The english name of the country.

locationCodestring nullable

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

locationstring nullable

The name of the location. It will always be in the related country's language.

isDefaultboolean

Indicates whether the absence region is the default absence region. Any new user will be assigned to the default absence region.

numberOfPublicHolidaysinteger

The number of public holidays in the absence region.

assignedUsersstring[] nullable

The list of user ids assigned to the absence region.