QHR Developers

List leave policies

GET/leave_policies
Read token is enoughView leave policies leave_policy/viewRequires feature leave_policyAvailable in Claudeleave_policies.list

Returns 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

NameInTypeDescriptionExample
leave_category_idqueryintegerOnly the policies of this category (id from leave_categories.list).1
Accept-LanguageheaderstringLanguage of messages and translated labels. English when omitted.
Allowed values: ar, en
ar

Response

200 The leave policies.

FieldTypeDescription
recordsRequiredarray<object>The policies, newest first.
records[].idRequiredintegerLeave policy id.
records[].nameRequiredstringName in the language of the request.
records[].leave_category_idRequiredintegerCategory the policy belongs to (leave_categories.list).
records[].durationRequiredstringEntitlement in days a year (or in total for a one-time policy), as a decimal string, e.g. "21.0".
records[].activeRequiredbooleanFalse when the policy is switched off: no new requests, no accrual.
records[].employees_countintegerEmployees currently holding the policy.
records[].compensation_typestringHow the leave is paid: Fully Paid, Tiered Pay or Unpaid (translated).
records[].approverstringWho approves requests: Manager, HR, or Manager & HR (translated).
records[].accrued_perstringHow often the entitlement is granted: Per Year, Per Event or One Time Only (translated).
records[].accrual_methodstringHow the days are granted: Full Balance (all at once) or Monthly (translated).
records[].allow_past_datesbooleanEmployees may request leave for dates already past.
records[].allow_negative_balancebooleanRequests may exceed the available balance. Always true for per-event policies.
records[].requires_documentbooleanA supporting document must be attached to each request.
records[].show_used_balancebooleanEmployees see the days they have used.
records[].carryover_usablebooleanCarried-over days may be taken. When false they are only paid out when the employee leaves the company.
records[].carryover_max_daysnumberMost days carried into the next year; null for no cap, 0 to carry nothing.
records[].carryover_expires_end_of_monthintegerMonth (1–11) at whose end unused carried-over days expire; null when they never expire.
records[].tiersarray<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[].daysintegerDays in this tier (at least 1).
records[].tiers[].percentageintegerPercentage of pay for these days, 0 to 100.

Errors

HTTPCodeMeaningHow to fix
401token_missingNo Authorization: Bearer … header, or it is malformed.Send Authorization: Bearer qhr_… with the full token.
401token_invalidThe 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.
401token_expiredThe token is past its expiry date.Create a new token.
401token_revokedThe 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.
401tenant_inactiveThe company account is suspended.Contact QHR support.
403forbiddenThe token owner's role lacks the permission this operation needs.Ask an admin to grant the permission shown on this operation (x-permission).
403employee_inactiveThe token owner's employee record is not active.HR must reactivate the employee record.
403tenant_access_revokedThe 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.
This endpoint can also return the errors that can happen on any endpoint →402 / 412 / 425 entitlement_blocked · 429 rate_limited · 500 internal_error

See the full error catalogue →