API reference

List annual leave balances for a year

GET
/v1/leave-balances

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

year?integer

Leave year. Defaults to the current calendar year.

Range2000 <= value <= 2100
employee_id?string
Formatuuid
limit?integer
Range1 <= value <= 500
Default100
cursor?string

next_cursor from the previous page, unchanged.

Response Body

A page of balances.

application/json
  1. response
has_more*boolean
next_cursor*string|null
data*array<>
curl -X GET "https://example.com/v1/leave-balances"
{  "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      },      "year": 0,      "allowance": 0,      "carried_over": 0,      "adjustment": 0,      "used": 0,      "pending": 0,      "remaining": 0,      "updated_at": "2019-08-24T14:15:22Z"    }  ]}