QHR Developers

List an employee's leave requests

GET/employees/{id}/time_off/leave_requests
Read token is enoughView others' time off time_off/view_othersRequires feature time_offAvailable in Claudetime_off.leave_requests

Returns every leave request of one employee, newest first, whatever its status and date: pending, approved, rejected, cancelled and revoked, past and future. Each row says where the request waits (current_stage), whether HR or the manager filed it (on_behalf, submitted_by) and whether the token's owner may withdraw or revoke an approval on it (approver_actions).

When to use: to answer "what leave has this person asked for or taken?". For the remaining days per policy use time_off.balances; for requests across the whole company use hr_leaves.requests.

Prerequisites: the employee's id from employees.list, employees.search or hr_leaves.employees. Needs "View others' time off".

Side effects: none. Up to 50 per page.

Before you call this

You will need ids that come from these operations:

Parameters

NameInTypeDescriptionExample
idRequiredpathintegerEmployee id, from employees.list, employees.search or hr_leaves.employees.1203
pagequeryintegerPage number, starting at 1.
min 1
1
per_pagequeryintegerRecords per page. Each list states its maximum.
min 1
20
q[status_eq]querystringOnly this status.
Allowed values: pending, approved, rejected, cancelled, revoked
approved
q[leave_policy_id_eq]queryintegerOnly this leave policy (id from time_off.balances).7
q[start_date_gteq]querystring (date)Leave starting on or after this date.2026-01-01
q[start_date_lteq]querystring (date)Leave starting on or before this date.2026-12-31
q[s]querystringSort, <field> asc|desc on start_date, end_date, created_at or status. Newest first when omitted.start_date desc
Accept-LanguageheaderstringLanguage of messages and translated labels. English when omitted.
Allowed values: ar, en
ar

Response

200 A page of the employee's leave requests.

FieldTypeDescription
recordsRequiredarray<object>The requests on this page, newest first.
records[].idintegerLeave request id.
records[].start_datestring (date)First day of leave.
records[].end_datestring (date)Last day of leave.
records[].balancestringWorking days the request takes from the balance, as a decimal string ("3.0").
records[].statusstringRequest status: pending (waiting on a decision), approved, rejected, cancelled or revoked (an approval taken back before the leave started).
Allowed values: pending, approved, rejected, cancelled, revoked
records[].created_atstringWhen it was submitted, in UTC (2026-11-20 08:15:00 UTC).
records[].leave_type_namestringLeave policy name.
records[].on_behalfbooleanTrue when HR or the manager filed it for the employee; the employee cannot edit it, and cancelling it goes to the approver's review.
records[].policy_approverstringWho the policy says approves (Manager, HR, Manager then HR), translated. Not the person holding it now.
records[].current_stagestringWhere the request waits: awaiting_manager, awaiting_hr, cancellation_review or terminal (decided).
records[].current_approver_namestringReserved on this list; always null here.
records[].cancellation_requested_atstringWhen the employee asked to cancel, if a cancellation is under review.
records[].lockedbooleanAlways false on this list.
records[].lock_reasonstringReserved on this list; always null here.
records[].submitted_byobjectWho filed an on-behalf request; null when the employee filed it.
records[].submitted_by.idintegerEmployee id.
records[].submitted_by.full_namestringFull name.
records[].revoke_typestringHow an approval was taken back: withdrawn (by the manager, before HR decided) or revoked (a final approval); null otherwise.
records[].revocationobjectWho took the approval back, when (UTC, ISO 8601) and why; null unless revoke_type is set.
records[].revocation.byobjectA person: id (employee id) and full_name.
records[].revocation.by.idintegerEmployee id.
records[].revocation.by.full_namestringFull name.
records[].revocation.atstringWhen.
records[].revocation.notestringThe reason given.
records[].approver_actionsobjectWhat the token's owner may do on this request as an approver.
records[].approver_actions.can_withdrawbooleanTrue when the owner may withdraw their own approval while the request waits for HR.
records[].approver_actions.can_revokebooleanTrue when the owner may revoke the final approval of leave that has not started.
records[].approver_actions.revoke_blocked_reasonstringWhy a revoke is blocked right now: payroll_locked (the days are in a processed payroll run) or cancellation_pending.
paginationRequiredobject
pagination.current_pageRequiredintegerThis page's number.
pagination.per_pageRequiredintegerRecords per page.
pagination.total_entriesRequiredintegerRecords across all pages.
pagination.pagesRequiredintegerNumber of pages.

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.
404not_foundThe record does not exist, or you cannot see it.Check the id. List the records first to get a valid one.
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 →