v1

latestOpenAPI 3.1.02026-07-2421872196.9 KB
Leaves

List leave requests

Returns a list of leave requests. The leave requests are reutrned sorted by the starting date of the leave request, with the most recent appearing last.

get/leave_requests

Query parameters

employee_ids[]integer

Return results filtered by these specified employee IDs. Multiple employe IDs can be provided using an ampersand separated list. For example, employee_ids[]=1&employee_ids[]=2

states[]'pending' | 'approved' | 'rejected' | 'withdrawn'

Return results where states are filtered by these specified states. Multiple states can be provided using an ampersand separated list. For example, states[]=approved&states[]=pending

starts_onstring date
Example:2023-01-01

Return results where leave requests start greater than or equal to this value.

ends_onstring date
Example:2023-01-01

Return results where leave requests end less than or equal to this value.

pageinteger

A cursor for pagination across multiple pages of results.

created_at[gt]integer
Example:1683557122

Return results where the created_at field is greater than this value. Value should be a valid Unix timestamp.

created_at[lt]integer
Example:1683557122

Return results where the created_at field is less than this value. Value should be a valid Unix timestamp.

updated_at[gt]integer
Example:1683557122

Return results where the updated_at field is greater than this value. Value should be a valid Unix timestamp.

updated_at[lt]integer
Example:1683557122

Return results where the updated_at field is less than this value. Value should be a valid Unix timestamp.

Response

OK

Example response

{
  "data": [
    {
      "employee": {
        "id": 100,
        "first_name": "John",
        "last_name": "Doe",
        "email": "test@example.com"
      }
    }
  ]
}