Get a list of all absences accessible to user.
Access rights:
| Param name | Description |
|---|---|
|
page
optional |
Page number. Validations:
|
|
per_page
optional |
Number of records per page. Default: 50. Validations:
|
|
date_range
optional |
Get all absences within the specified date range. Date range format: Validations:
|
|
date_range_start
optional |
Get all absences within a date range with the specified start date. Validations:
|
|
date_range_end
optional |
Get all absences within a date range with the specified end date. Validations:
|
|
updated_after
optional |
Get all absences updated after the specifiex Unix timestamp. Validations:
|
|
user_id
optional |
Get all absences for the specified user. Validations:
|
|
state
optional |
Filter absences by state. Validations:
|
|
absence_type_name
optional |
Filter absences by absence type name. Must be one of the following: Validations:
|
|
sort_by
optional |
Sort by field. Default: Validations:
|
|
order
optional |
Sorting order (descending or ascending). Default: Validations:
|
Get a list of deleted absences that were accessible to the current user.
The response structure and the supported parameters are the same as in GET /api/absences endpoint.
To fetch absences deleted after a specific timestamp, use updated_after parameter.
| Param name | Description |
|---|---|
|
id
required |
Absence ID Validations:
|
| Param name | Description |
|---|---|
|
absence
required |
Absence parameters. Validations:
|
|
absence[type]
required |
Absence type. Option 1: one of Validations:
|
|
absence[subtype_id]
optional |
Only for Validations:
|
|
absence[user_id]
optional |
User ID. By default, current user’s ID is used. Validations:
|
|
absence[start_date]
required |
Absence’s start date. E.g. Validations:
|
|
absence[end_date]
required |
Absence’s end date. E.g. Validations:
|
|
absence[description]
optional |
Absence’s description. Maximum length: 300 characters. Validations:
|
|
absence[start_time]
optional |
Absence’s start time, in case the first day is less than a day long. In UTC. E.g., Validations:
|
|
absence[end_time]
optional |
Absence’s end time, in case the last day is less than a day long. In UTC. E.g., Validations:
|
|
absence[sickness_id]
optional |
Only for Validations:
|
|
absence[external_id]
optional |
Absence’s ID in an external service. Validations:
|
Updating absences reported to payroll is not allowed.
Updating an (un)approved absence will return it back to pending state.
| Param name | Description |
|---|---|
|
id
required |
Absence ID Validations:
|
|
absence
required |
Absence parameters. Validations:
|
|
absence[type]
required |
Absence type. Option 1: one of Validations:
|
|
absence[subtype_id]
optional |
Only for Validations:
|
|
absence[user_id]
optional |
User ID. By default, current user’s ID is used. Validations:
|
|
absence[start_date]
required |
Absence’s start date. E.g. Validations:
|
|
absence[end_date]
required |
Absence’s end date. E.g. Validations:
|
|
absence[description]
optional |
Absence’s description. Maximum length: 300 characters. Validations:
|
|
absence[start_time]
optional |
Absence’s start time, in case the first day is less than a day long. In UTC. E.g., Validations:
|
|
absence[end_time]
optional |
Absence’s end time, in case the last day is less than a day long. In UTC. E.g., Validations:
|
|
absence[sickness_id]
optional |
Only for Validations:
|
|
absence[external_id]
optional |
Absence’s ID in an external service. Validations:
|
Note: deleting absences reported to payroll is not allowed.
| Param name | Description |
|---|---|
|
id
required |
Absence ID Validations:
|
Optionally, accepts the same attributes as PUT /api/absences/:id endpoint. In such a case, if the update is not successful, the approval will not be performed.
| Param name | Description |
|---|---|
|
id
required |
Absence ID Validations:
|
Optionally, accepts the same attributes as PUT /api/absences/:id endpoint. In such a case, if the update is not successful, the unapproval will not be performed.
| Param name | Description |
|---|---|
|
id
required |
Absence ID Validations:
|
Mark an absence as reported to payroll by setting its reported_at timestamp, or mark it as not reported to payroll by setting its reported_at to null. Reported absences are locked for edit.
{"reported_at":1740649659}
{"reported_at":true}
{"reported_at":null}
| Param name | Description |
|---|---|
|
reported_at
optional |
Timestamp, in Unix time format. Pass Validations:
|
Get vacation balance (number of vacation days left) this vacation year.
Imported vacation balances will also be taken into account when calculating.
Permissions. User's vacation balance can be accessed by:
{ "balance_type": "vacation", "value":10, "units":"days", "start_date":"2025-04-01", "end_date":"2026-03-31" }
| Param name | Description |
|---|---|
|
user_id
optional |
User ID. Default: current user ID. Validations:
|