GET /api/absences
Get absences list

Get a list of all absences accessible to user.

Access rights:

  • Regular users can see only their own absences.
  • User's absences can also be seen by their approvers.
  • Accountants and managers can see all absences in the company.

Params

Param name Description
page
optional

Page number.

Validations:

  • Must be a Integer

per_page
optional

Number of records per page. Default: 50.

Validations:

  • Must be a Integer

date_range
optional

Get all absences within the specified date range. Date range format: "DD/MM/YYYY - DD/MM/YYYY" (e.g. 15/02/2025 - 28/02/2025).

Validations:

  • Must be a String

date_range_start
optional

Get all absences within a date range with the specified start date.

Validations:

  • Must be a String

date_range_end
optional

Get all absences within a date range with the specified end date.

Validations:

  • Must be a String

updated_after
optional

Get all absences updated after the specifiex Unix timestamp.

Validations:

  • Must be a Integer

user_id
optional

Get all absences for the specified user.

Validations:

  • Must be a Integer

state
optional

Filter absences by state.

Validations:

  • Must be one of: pending, approved, unapproved.

absence_type_name
optional

Filter absences by absence type name. Must be one of the following: Vacation, SickLeave, one of company’s long absence types’ names.

Validations:

  • Must be a String

sort_by
optional

Sort by field. Default: start_date.

Validations:

  • Must be a String

order
optional

Sorting order (descending or ascending). Default: asc.

Validations:

  • Must be one of: desc, asc.


GET /api/absences/deleted
Get a list of deleted absences

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.


GET /api/absences/:id
Get a specific absence

Params

Param name Description
id
required

Absence ID

Validations:

  • Must be a Integer


POST /api/absences
Create an absence

Params

Param name Description
absence
required

Absence parameters.

Validations:

  • Must be a Hash

absence[type]
required

Absence type. Option 1: one of Vacation, SickLeave, LongAbsence; subtype_id is required for LongAbsence type. Option 2: for Long absences, can contain the name of long absence type instead; then subtype_id is not required.

Validations:

  • Must be a String

absence[subtype_id]
optional

Only for LongAbsence type. ID of one of company’s long absence types.

Validations:

  • Must be a Integer

absence[user_id]
optional

User ID. By default, current user’s ID is used.

Validations:

  • Must be a Integer

absence[start_date]
required

Absence’s start date. E.g. 2025-12-01.

Validations:

  • Must be a String

absence[end_date]
required

Absence’s end date. E.g. 2025-12-31.

Validations:

  • Must be a String

absence[description]
optional

Absence’s description. Maximum length: 300 characters.

Validations:

  • Must be a String

absence[start_time]
optional

Absence’s start time, in case the first day is less than a day long. In UTC. E.g., 13:00.

Validations:

  • Must be a String

absence[end_time]
optional

Absence’s end time, in case the last day is less than a day long. In UTC. E.g., 13:00.

Validations:

  • Must be a String

absence[sickness_id]
optional

Only for SickLeave type. Sickness ID that would allow to identify whether several sick leaves were due to the same sickness.

Validations:

  • Must be a String

absence[external_id]
optional

Absence’s ID in an external service.

Validations:

  • Must be a String


PUT /api/absences/:id
Update an absence

Updating absences reported to payroll is not allowed.
Updating an (un)approved absence will return it back to pending state.

Params

Param name Description
id
required

Absence ID

Validations:

  • Must be a Integer

absence
required

Absence parameters.

Validations:

  • Must be a Hash

absence[type]
required

Absence type. Option 1: one of Vacation, SickLeave, LongAbsence; subtype_id is required for LongAbsence type. Option 2: for Long absences, can contain the name of long absence type instead; then subtype_id is not required.

Validations:

  • Must be a String

absence[subtype_id]
optional

Only for LongAbsence type. ID of one of company’s long absence types.

Validations:

  • Must be a Integer

absence[user_id]
optional

User ID. By default, current user’s ID is used.

Validations:

  • Must be a Integer

absence[start_date]
required

Absence’s start date. E.g. 2025-12-01.

Validations:

  • Must be a String

absence[end_date]
required

Absence’s end date. E.g. 2025-12-31.

Validations:

  • Must be a String

absence[description]
optional

Absence’s description. Maximum length: 300 characters.

Validations:

  • Must be a String

absence[start_time]
optional

Absence’s start time, in case the first day is less than a day long. In UTC. E.g., 13:00.

Validations:

  • Must be a String

absence[end_time]
optional

Absence’s end time, in case the last day is less than a day long. In UTC. E.g., 13:00.

Validations:

  • Must be a String

absence[sickness_id]
optional

Only for SickLeave type. Sickness ID that would allow to identify whether several sick leaves were due to the same sickness.

Validations:

  • Must be a String

absence[external_id]
optional

Absence’s ID in an external service.

Validations:

  • Must be a String


DELETE /api/absences/:id
Delete an absence

Note: deleting absences reported to payroll is not allowed.

Params

Param name Description
id
required

Absence ID

Validations:

  • Must be a Integer


PUT /api/absences/:id/approve
Approve a pending absence

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.

Params

Param name Description
id
required

Absence ID

Validations:

  • Must be a Integer


PUT /api/absences/:id/unapprove
Unapprove a pending absence

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.

Params

Param name Description
id
required

Absence ID

Validations:

  • Must be a Integer


PUT /api/absences/:id/set_reported_at
Save timestamp of reporting the absence to payroll

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.

Examples

{"reported_at":1740649659}
{"reported_at":true}
{"reported_at":null}

Params

Param name Description
reported_at
optional

Timestamp, in Unix time format. Pass true to use current time. Pass null to erase reported_at timestamp.

Validations:

  • Must be a String


GET /api/absences/vacation_balance
Get vacation balance for a user

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:

  • user themselves
  • user's approvers
  • company's managers and accountants
  • company users configured to approve vacations

Examples

{
  "balance_type": "vacation",
  "value":10,
  "units":"days",
  "start_date":"2025-04-01",
  "end_date":"2026-03-31"
}

Params

Param name Description
user_id
optional

User ID. Default: current user ID.

Validations:

  • Must be a Integer


GET /api/absences/export
Download absences in XLSX format