API reference

List annual leave bookings that overlap a date range

GET
/v1/leave-requests

Annual leave only. Requires leave:read.

Authorization

headerAuthorizationBearer <token>

OAuth 2.0 client credentials. Enter the client ID and client secret from Settings, API access; the token lasts one hour.

Query Parameters

from*string
Formatdate
to*string

At most 400 days after from.

Formatdate
status?string
Value in"pending""approved""rejected""cancelled""cancellation_requested"
employee_id?string
Formatuuid
updated_since?string

Only records changed at or after this RFC 3339 time (with an offset), for incremental sync.

Formatdate-time
limit?integer
Range1 <= value <= 500
Default100
cursor?string

next_cursor from the previous page, unchanged.

Response Body

A page of leave bookings.

application/json
  1. response
has_more*boolean
next_cursor*string|null
data*array<>
curl -X GET "https://example.com/v1/leave-requests?from=2019-08-24&to=2019-08-24"
{  "has_more": true,  "next_cursor": "string",  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "employee_id": "df4fd699-0854-488d-9cc2-15e751a80ee3",      "leave_type": {        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "name": "string",        "category": "annual",        "is_paid": true      },      "start_date": "2019-08-24",      "end_date": "2019-08-24",      "start_half_day": true,      "start_half_period": "am",      "end_half_day": true,      "end_half_period": "am",      "days": 0,      "status": "pending",      "requested_at": "2019-08-24T14:15:22Z",      "reviewed_at": "2019-08-24T14:15:22Z",      "cancelled_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z"    }  ]}