API reference
List annual leave bookings that overlap a date range
GET
Annual leave only. Requires leave:read.
header
AuthorizationBearer <token>OAuth 2.0 client credentials. Enter the client ID and client secret from Settings, API access; the token lasts one hour.
from*stringFormat
dateto*stringAt most 400 days after from.
Format
datestatus?stringValue in
"pending""approved""rejected""cancelled""cancellation_requested"employee_id?stringFormat
uuidupdated_since?stringOnly records changed at or after this RFC 3339 time (with an offset), for incremental sync.
Format
date-timelimit?integerRange
1 <= value <= 500Default
100cursor?stringnext_cursor from the previous page, unchanged.
A page of leave bookings.
application/json- response
has_more*booleannext_cursor*string|nulldata*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" } ]}