Scopes used on this page: leave:read. Calling an endpoint your key was not granted the scope for returns 403 insufficient_scope.
Every call below needs your API key — see Partner API: authentication and your first call — and every response follows the paging and field-selection rules in Partner API: pagination, field selection and identifiers.
GET /v1/leave/balances
Available leave balance per employee and policy, as of today or of ?as_on=. Policies that carry no numeric balance, such as unpaid leave, are not returned.
Scope required: leave:read.
Query parameters:
limit— Rows per page, 1-200. Defaults to 50.cursor— Opaque cursor from the previous page's next_cursor. Omit for the first page; a null next_cursor means there are no further pages.employee_id— Restrict to one employee, by business code.leave_type— Restrict to one leave type. Types with no numeric balance are accepted and return an empty list rather than an error. One of:CASUAL_LEAVE,COMPOFF_LEAVE,EARNED_LEAVE,LEAVE_WITHOUT_PAY,MATERNITY_LEAVE,OPTIONAL_HOLIDAY,OTHER,PATERNITY_LEAVE,PRIVILEGED_LEAVE,SICK_LEAVE,UNLIMITED_LEAVE.as_on— Balance as of this date (YYYY-MM-DD). Defaults to today.
Fields on each record: asan_empcode, available_balance, department_name, designation_name, leave_type, max_balance_days, policy_name.
Example:
curl -s "https://api.asanify.com/v1/leave/balances?limit=2" \ -H "Authorization: Bearer $ASANIFY_API_KEY"
