Docs

List a person's leave balances

Preview· P9
GET
/people/{person_id}/leave-balances

Returns this leave year's figures for each type with a yearly balance: entitled, carried over, taken, adjusted, expired, the balance, booked (approved, not started) and pending (waiting for a decision). Private types aren't listed.

Scope: attendance:read · Plan: Pro and Enterprise in live mode; every plan in test mode.

Authorization

headerAuthorizationBearer <token>

Send Authorization: Bearer <token> on every request. The token is one of:

PrefixWhat it isWhere it may be used
agoo_sk_live_Secret key, live modeYour servers only
agoo_sk_test_Secret key, test modeYour servers only
agoo_pk_live_Publishable key, live modeBrowsers and apps: create pre-registrations and bookings, read public booking types (with their intake questions) and their free slots, read the visit types open for pre-registration with their public forms. Never lists people.
agoo_pk_test_Publishable key, test modeAs above, in test mode

Admins create keys in Console → Developers → API keys and choose each key's scopes. A key is shown once. Never put a secret key in a URL, a browser or a mobile app.

Scope: attendance:read

Path Parameters

person_id*string

The person's ID.

Match^person_[0-7][0-9a-hjkmnp-tv-z]{25}$
Example"person_01kjsesxm0e4zbyvkr7bcfxbfg"

Response Body

The person's balances.

application/json
  1. response
person_id*PersonId

A person ID (TypeID with the person prefix).

Match^person_[0-7][0-9a-hjkmnp-tv-z]{25}$
Example"person_01kjsesxm0e4zbyvkr7bcfxbfg"
year_start*string
Formatdate
year_end*string
Formatdate
data*array<>
curl -X GET 'https://api.agoo.ardent.africa/v1/people/person_01kjsesxm0e4zbyvkr7bcfxbfg/leave-balances'
{  "person_id": "person_01kjw4mg80efgb5aqbsqnxhtbh",  "year_start": "2026-01-01",  "year_end": "2026-12-31",  "data": [    {      "type_id": "ltype_01m4y8r6t0e9k2b7c5d3f1g0hj",      "type_name": "Annual leave",      "kind": "annual",      "unit": "working_days",      "entitled": 15,      "carried": 3,      "taken": 4,      "adjusted": 1,      "expired": 0,      "balance": 15,      "booked": 2,      "pending": 3    }  ]}