v1

latestOpenAPI 3.1.02026-07-14801408.6 KB

/timeoff/requests

Returns a paginated collection of time off requests. Required scope: r_timeoff. Supports both user and account tokens.

Account token — when employee_id/employee_ids are omitted, returns all requests in the account.

User token — when employee_id/employee_ids are omitted, returns the user's own requests plus all direct and indirect descendants' requests. A user with the time off requests view permission receives all account requests.

get/timeoff/requests

Query parameters

from_datestring required

Iso date without timezone string

to_datestring

Iso date without timezone string

category_idsstring[]

Filter the response by category ids that can be retrieved through /timeoff/categories endpoint

statesstring[]

Filter the response by states

employee_idstring

Filter by a single employee SPI key. Optional. When combined with employee_ids, the values are merged and deduplicated. User tokens are authorized per employee and receive a 403 if any id cannot be viewed.

employee_idsstring[]

Filter by one or more employee SPI keys. Optional. When combined with employee_id, the values are merged and deduplicated. User tokens are authorized per employee and receive a 403 if any id cannot be viewed.

limit10 | 20 | 50 | 100

Number of results per page. Allowed values: 10, 20, 50, 100. Default 10.

offsetinteger

Number of requests to skip (for pagination). Default 0.

Response

200

total_countinteger

Total number of requests matching the query, ignoring limit/offset.

Example response

{
  "total_count": 1,
  "requests": [
    {
      "id": "135b",
      "employee_id": "4d3",
      "from_date": "2024-04-04T00:00:00.000",
      "to_date": "2024-04-12T00:00:00.000",
      "formatted_period": "04 April 2024 - 12 April 2024",
      "state": "approved",
      "requesting_total": 7,
      "timeoff_tracking_unit": "half_days",
      "updated_by": "Dan Snow",
      "updated_at": "2024-04-04T09:58:08.724Z",
      "category_name": "Paid time off ",
      "pending_approvals": [
        {
          "id": "4d3",
          "approver_id": "1839d70f-7caa-4f02-9e3f-c46cced76f5b"
        }
      ]
    }
  ]
}