For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDeveloper ForumLogin
  • Overview
    • Introduction
    • Getting Started
    • Integration Example (PSA)
    • Authentication
    • Error Handling
    • Pagination
    • Filtering
    • Ordering
    • Rate Limits
    • Permissions
    • Webhooks
    • MCP Server
    • Versioning
    • Changelog
    • Support
  • API v1 Reference
    • Projects Overview
    • Tasks Overview
    • Time Tracking Overview
    • Documents Overview
    • Search Overview
    • Companies Overview
    • Users Overview
      • GETGets all absence regions.
      • POSTCreates a new absence region.
      • GETList of supported countries for absence regions.
      • GETList of locations for a country.
      • POSTAssign/remove current user to/from an absence region.
      • PUTAssign/remove current user to/from an absence region.
      • POSTAssigns or unassigns users to/from an absence region.
      • PUTAssigns or unassigns users to/from an absence region.
      • GETGet an absence region by id.
      • PUTUpdates an absence region.
      • DELDeletes an absence region.
    • Files & Images Overview
    • Custom Fields Overview
    • Workload & Planning Overview
    • Project Templates Overview
    • Workflows Overview
    • Login & Access Overview
    • API Management Overview
LogoLogo
SupportDeveloper ForumLogin
API v1 ReferenceAbsence Regions

Updates an absence region.

PUT
https://api.awork.com/api/v1/absenceregions/:absenceRegionId
PUT
/api/v1/absenceregions/:absenceRegionId
$curl -X PUT https://api.awork.com/api/v1/absenceregions/absenceRegionId \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Hamburg",
> "countryCode": "DE"
>}'
1{
2 "id": "123e4567-e89b-12d3-a456-426614174000",
3 "createdOn": "2022-03-11T15:33:47.100Z",
4 "createdBy": "123e4567-e89b-12d3-a456-426614174000",
5 "updatedOn": "2022-03-11T21:15:00.100Z",
6 "updatedBy": "123e4567-e89b-12d3-a456-426614174000",
7 "name": "Hamburg",
8 "countryCode": "DE",
9 "country": "Germany",
10 "locationCode": "DE-HH",
11 "location": "Hamburg",
12 "isDefault": true,
13 "numberOfPublicHolidays": 10,
14 "assignedUsers": [
15 "7b356284-d22b-4f74-980d-0a548d3b6318",
16 "b37f07dd-6644-4271-9c8a-bb700cc21b63"
17 ]
18}
<Check title="Required Permissions" icon="key">The user must be an admin or have `user-planning-data:write` permissions.</Check>
Was this page helpful?
Previous

Deletes an absence region.

Next
Built with
Required Permissions
The user must be an admin or have user-planning-data:write permissions.

Authentication

AuthorizationBearer

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

Path parameters

absenceRegionIdstringRequiredformat: "uuid"
The id of the absence region to update.

Request

The model to update the absence region.
namestringRequired1-255 characters
The name of the absence region. Must be unique.
countryCodestringRequired1-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 in ISO 3166-2 format (e.g. ‘DE-HH’ for Hamburg, Germany).

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

Response

OK
idstringformat: "uuid"
The id of the entity.
createdOnstringformat: "date-time"
The date this entity was created.
createdBystringformat: "uuid"
The id of the user who created this entity.
updatedOnstringformat: "date-time"
The date this entity was last modified.
updatedBystringformat: "uuid"
The id of the user who last modified this entity.
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 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
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.
assignedUserslist of strings or null
The list of user ids assigned to the absence region.

Errors

400
Bad Request Error
404
Not Found Error