Updates a workspace absence.

PUThttps://api.awork.com/api/v1/workspaceabsences/{workspaceAbsenceId}
PUT https://api.awork.com/api/v1/workspaceabsences/{workspaceAbsenceId}

Updates a workspace absence. The submitted dates and region determine when it applies.

Authentication

AuthorizationBearer

Send your token in the Authorization: Bearer <token> header. See Authentication for API keys and OAuth.

Path parameters

workspaceAbsenceIdstringRequired
format: uuid

The workspace absence to update.

Request body Required

Updated workspace absence details including start date, end date, description, and optional region.

application/json

startOnstringRequired
format: date-time

The start time of the workspace absence.

endOnstringRequired
format: date-time

The end time of the workspace absence.

descriptionstringRequired
minLength: 0 maxLength: 1000

The description of the workspace absence.

regionIdstring or nullOptional
format: uuid

(optional) The id of the absence region to limit the workspace absence to. If not set, the workspace absence will apply to all users in the workspace. Otherwise, it will only apply to users in the specified absence region.

isHalfDayOnStartbooleanOptional

If it's true, and it's a single day absence means that the absence is for the first half of the workday. If it's a multi day absence, it will start on the second half of the first day of the absence period.

isHalfDayOnEndbooleanOptional

If it's true, and it's a single day absence means that the absence is for the second half of the workday. If it's a multi day absence it will end on the first half of the last day of the absence period.

Responses

200 OK

application/json

idstringOptional
format: uuid

The id of the entity.

createdOnstringOptional
format: date-time

The date this entity was created.

createdBystringOptional
format: uuid

The id of the user who created this entity.

updatedOnstringOptional
format: date-time

The date this entity was last modified.

updatedBystringOptional
format: uuid

The id of the user who last modified this entity.

startOnstringOptional
format: date-time

The start time of the workspace absence.

endOnstringOptional
format: date-time

The end time of the workspace absence.

descriptionstring or nullOptional

The description of the absence.

regionIdstring or nullOptional
format: uuid

The (optional) regionId of the workspace absence. If null, the absence is global for the entire workspace. Otherwise, it will be applied only to the users of the region.

regionstring or nullOptional

The name of the region of the workspace absence. Null if the absence is global for the entire workspace.

isReadOnlybooleanOptional

If it's true it means that this Absence is read-only and cannot be edited/deleted by the user.

isHalfDayOnStartbooleanOptional

If it's true and it's a single day absence means that the absence is for the first half of the workday. If it's a multi day absence it started on the second half of the first day of the absence period.

isHalfDayOnEndbooleanOptional

If it's true and it's a single day absence means that the absence is for the second half of the workday. If it's a multi day absence it ended on the first half of the last day of the absence period.

400 Bad Request

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

404 Not Found

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

Search documentation