PeopleForce
Leaves

Early access

Company API v4 is the next-generation API and is under active development. Endpoints and fields may still change.

List all leave balances

Returns a list of leave balances for every person the service account can see

GET
/api/v4/leave_balances

Returns a list of leave balances for every person the service account can see

Query Parameters

page?integer

Page offset to fetch.

Formatint32
Default1
per_page?integer

Number of results to return per page.

Formatint32
Default100
offset?integer

Pad a number of results.

Formatint32
Default0
employee_ids?array<>

Filter by employee IDs. e.g., employee_ids[]=1&employee_ids[]=2

leave_type_ids?array<>

Filter by leave type IDs. e.g., leave_type_ids[]=1&leave_type_ids[]=2

Response Body

application/json

curl -X GET "https://example.com/api/v4/leave_balances"
{  "data": [    {      "id": 0,      "employee_id": 0,      "employee": {        "id": 0,        "first_name": "string",        "last_name": "string",        "email": "string",        "type": "string"      },      "effective_on": "2019-08-24",      "balance": 0.1,      "leave_type_policy": {        "id": 0,        "name": "string"      },      "leave_type": {        "id": 0,        "name": "string",        "unit": "string",        "hex_color": "string",        "fa_class": "string",        "created_at": null      }    }  ],  "metadata": {    "page": 0,    "per_page": 0,    "total_pages": 0,    "total_count": 0  }}