QHR Developers

List my leave requests

GET/leave_requests
Read token is enoughView own leave history leave_request/viewRequires feature leave_requestAvailable in Claudeleave_requests.list
  • To act on other people’s records it also needs: View others' leave requests leave_request/view_others

Returns the token owner's own leave requests, newest submitted first, with their status, the approval stage they are at and who must decide next. Without q[from] / q[to] it shows the requests that start or end in the current month; a request matches when its first or last day falls in the window.

When to use: to answer "what leave have I asked for?" or "is my leave approved yet?", and to find a request's id for leave_requests.show, leave_requests.update or leave_requests.cancel. For the totals per status, leave_requests.stat_cards is lighter. A manager's view of the team is team_leaves.pending_requests.

Prerequisites: none for your own requests. employee_id reads another employee's requests and needs "View others' leave requests" (x-permission.x-others); you see only employees within your reach (your reports, or everyone for HR). Policy ids for q[leave_policy_id_eq] come from leave_requests.assigned_leave_policies.

Side effects: none. Up to 50 per page.

Before you call this

You will need ids that come from these operations:

Parameters

NameInTypeDescriptionExample
pagequeryintegerPage number, starting at 1.
min 1
1
per_pagequeryintegerRecords per page. Each list states its maximum.
min 1
20
q[from]querystring (date)Window start. Alone, the window runs to the end of that month. The current month when both are omitted.2026-03-01
q[to]querystring (date)Window end. Alone, the window starts on the first of that month.2026-03-31
q[status_eq]querystringOnly this status.
Allowed values: pending, approved, rejected, cancelled, revoked
pending
q[leave_policy_id_eq]queryintegerOnly this leave policy (value from leave_requests.assigned_leave_policies).7
q[s]querystringSort, <field> asc|desc, e.g. start_date asc. Newest submitted first when omitted.start_date asc
employee_idqueryintegerAnother employee's requests (id from employees.list or employees.team). Needs "View others' leave requests".1203
Accept-LanguageheaderstringLanguage of messages and translated labels. English when omitted.
Allowed values: ar, en
ar

Response

200 A page of leave requests.

FieldTypeDescription
recordsRequiredarray<object>The requests on this page, newest submitted 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 charges to the leave balance, as a decimal string ("3.0"). Weekends, days off and public holidays are not counted.
records[].statusstringRequest status: pending (waiting for a decision), approved, rejected, cancelled, or revoked (an approval was taken back).
Allowed values: pending, approved, rejected, cancelled, revoked
records[].created_atstringWhen the request was submitted, in UTC (2026-03-02 06:00:00 UTC).
records[].leave_type_namestringLeave policy name (Annual leave, Sick leave…), in the requested language.
records[].on_behalfbooleanTrue when HR or the employee's manager filed it. The employee cannot edit it or withdraw it directly; cancelling it goes to review.
records[].policy_approverstringWho the leave policy routes requests to (manager, manager then HR, or HR), translated. Not the person holding it now — see current_approver_name.
records[].current_stagestringWhere the request sits in the approval chain: awaiting_manager, awaiting_hr, cancellation_review (the employee asked to cancel an approved leave) or terminal (decided).
Allowed values: awaiting_manager, awaiting_hr, cancellation_review, terminal
records[].current_approver_namestringWho must decide next, when the request is waiting. Null once decided.
records[].cancellation_requested_atstringWhen the employee asked to cancel this approved leave, while that is under review. Null otherwise.
records[].lockedbooleanTrue when the employee can no longer cancel the request (see lock_reason).
records[].lock_reasonstringWhy it is locked, in words ("Rejected by Omar Ali.", "Your leave has started…"). Null when not locked.
records[].submitted_byobjectWho filed it on the employee's behalf (HR or the manager). Null when the employee filed it.
records[].submitted_by.idintegerEmployee id.
records[].submitted_by.full_namestringFull name, in the requested language when known.
records[].revoke_typestringHow the approval was taken back: withdrawn (the manager, while HR had not decided) or revoked (a final approval, before the leave started). Null unless revoked.
Allowed values: withdrawn, revoked, null
records[].revocationobjectWho took the approval back, when and why. Null unless the status is revoked.
records[].revocation.byobjectA person: id (employee id) and full_name.
records[].revocation.by.idintegerEmployee id.
records[].revocation.by.full_namestringFull name, in the requested language when known.
records[].revocation.atstring (date-time)When, in UTC.
records[].revocation.notestringThe reason given.
records[].approver_actionsobjectWhat the caller may do with this request as an approver. All false on your own requests.
records[].approver_actions.can_withdrawbooleanTrue when you may take back your manager approval with leave_requests.withdraw.
records[].approver_actions.can_revokebooleanTrue when you may take back the final approval with leave_requests.revoke.
records[].approver_actions.revoke_blocked_reasonstringWhy revoking is blocked right now although you hold the right: payroll_locked or cancellation_pending. Null otherwise.
Allowed values: payroll_locked, cancellation_pending, null
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
400bad_requestA parameter is missing or malformed.Check the parameters against this operation's documentation.
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.
422employee_requiredThe token's owner is a company user with no employee record, so they have no leave of their own.Ask HR to link your user to your employee record, or use a token of a user who has 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 →