List leave policies
GET
/leave_policiesRead token is enoughView leave policies
leave_policy/viewRequires feature leave_policyAvailable in Claudeleave_policies.listReturns every leave policy of the company, newest first, with all its rules: entitlement (duration), how and how often days are granted, carry-over, pay, approver and how many employees hold it. Switched-off policies (active: false) are included. The list is not paginated.
When to use: to see what leave the company offers and on what terms, or to find a policy id for leave_policies.show, leave_policies.update or the assignment operations (employee_leave_policies.list). Filter by leave_category_id to see one kind of leave.
Prerequisites: none. Category ids come from leave_categories.list.
Side effects: none.
Before you call this
You will need ids that come from these operations:
Parameters
| Name | In | Type | Description | Example |
|---|---|---|---|---|
leave_category_id | query | integer | Only the policies of this category (id from leave_categories.list). | 1 |
Accept-Language | header | string | Language of messages and translated labels. English when omitted. Allowed values: ar, en | ar |
Response
200 The leave policies.
| Field | Type | Description |
|---|---|---|
recordsRequired | array<object> | The policies, newest first. |
records[].idRequired | integer | Leave policy id. |
records[].nameRequired | string | Name in the language of the request. |
records[].leave_category_idRequired | integer | Category the policy belongs to (leave_categories.list). |
records[].durationRequired | string | Entitlement in days a year (or in total for a one-time policy), as a decimal string, e.g. "21.0". |
records[].activeRequired | boolean | False when the policy is switched off: no new requests, no accrual. |
records[].employees_count | integer | Employees currently holding the policy. |
records[].compensation_type | string | How the leave is paid: Fully Paid, Tiered Pay or Unpaid (translated). |
records[].approver | string | Who approves requests: Manager, HR, or Manager & HR (translated). |
records[].accrued_per | string | How often the entitlement is granted: Per Year, Per Event or One Time Only (translated). |
records[].accrual_method | string | How the days are granted: Full Balance (all at once) or Monthly (translated). |
records[].allow_past_dates | boolean | Employees may request leave for dates already past. |
records[].allow_negative_balance | boolean | Requests may exceed the available balance. Always true for per-event policies. |
records[].requires_document | boolean | A supporting document must be attached to each request. |
records[].show_used_balance | boolean | Employees see the days they have used. |
records[].carryover_usable | boolean | Carried-over days may be taken. When false they are only paid out when the employee leaves the company. |
records[].carryover_max_days | number | Most days carried into the next year; null for no cap, 0 to carry nothing. |
records[].carryover_expires_end_of_month | integer | Month (1–11) at whose end unused carried-over days expire; null when they never expire. |
records[].tiers | array<object> | Pay ladder of a tiered_pay policy, in order: the first days days of the leave are paid at percentage, the next tier's days at its percentage, and any day beyond the last tier is unpaid. Empty for every other compensation type. |
records[].tiers[].days | integer | Days in this tier (at least 1). |
records[].tiers[].percentage | integer | Percentage of pay for these days, 0 to 100. |
Errors
| HTTP | Code | Meaning | How to fix |
|---|---|---|---|
| 401 | token_missing | No Authorization: Bearer … header, or it is malformed. | Send Authorization: Bearer qhr_… with the full token. |
| 401 | token_invalid | The token is unknown or wrong, or its owner's account is locked. | Check the token was copied in full, or create a new one in QHR › Settings › API & Integrations. |
| 401 | token_expired | The token is past its expiry date. | Create a new token. |
| 401 | token_revoked | The token was revoked by its owner or an admin, or the owner was removed from the company (which revokes all their tokens). | Create a new token, or ask your admin. If the owner was removed, they must be re-invited to the company first. |
| 401 | tenant_inactive | The company account is suspended. | Contact QHR support. |
| 403 | forbidden | The token owner's role lacks the permission this operation needs. | Ask an admin to grant the permission shown on this operation (x-permission). |
| 403 | employee_inactive | The token owner's employee record is not active. | HR must reactivate the employee record. |
| 403 | tenant_access_revoked | The token's owner is no longer an active member of this company. Rare: removing a member normally revokes their tokens, which answers 401 token_revoked instead. | The owner must be re-invited to the company, then create a new token. If the owner is still a member, contact QHR support. |
entitlement_blocked · 429 rate_limited · 500 internal_error