List the leave requests waiting on my team
/team_leaves/pending_requestsleave_request/view_othersRequires feature leave_requestAvailable in Claudeteam_leaves.pending_requestsReturns every leave request waiting for a decision that concerns the token owner as a manager: the pending requests and cancellation requests of their direct reports, plus any request escalated to them because the employee's own manager is on leave today. Newest submitted first. can_act says whether the owner can decide it now (false when it waits for HR or another manager). Not paginated: the whole list comes back.
When to use: for "what do I need to approve?" and to get the id for leave_requests.approve, leave_requests.reject, leave_requests.approve_cancellation or leave_requests.withdraw. scope=mine keeps only those the owner can decide. Totals alone come from team_leaves.stat_cards.
Prerequisites: none — the manager is the token's owner. Empty when they have no team.
Side effects: none.
Parameters
| Name | In | Type | Description | Example |
|---|---|---|---|---|
scope | query | string | all (every waiting request) or mine (only those you can decide now).Allowed values: all, mine | mine |
sort | query | string | Newest (submission_date_desc) or oldest (submission_date_asc) submitted first.Allowed values: submission_date_desc, submission_date_asc | submission_date_asc |
Accept-Language | header | string | Language of messages and translated labels. English when omitted. Allowed values: ar, en | ar |
Response
200 The waiting requests.
| Field | Type | Description |
|---|---|---|
recordsRequired | array<object> | Every waiting request (not paginated). |
records[].id | integer | Leave request id, for leave_requests.show, leave_requests.approve and leave_requests.reject. |
records[].employee_id | integer | Id of the employee taking the leave. |
records[].employee_no | string | Their employee number. |
records[].employee_name | string | Their full name, in the requested language. |
records[].employee_image | string | Reserved; always null for now. |
records[].start_date | string (date) | First day of leave. |
records[].end_date | string (date) | Last day of leave. |
records[].balance | string | Working days the request charges, as a decimal string. |
records[].leave_type_name | string | Leave category name (Annual, Sick…). |
records[].compensation_type | string | fully_paid, tiered_pay or unpaid. |
records[].compensation_type_label | string | The same, translated. |
records[].submission_date | string (date-time) | When it was submitted, in UTC. |
records[].current_stage | string | awaiting_manager, awaiting_hr or cancellation_review (the employee asked to cancel an approved leave). |
records[].can_act | boolean | True when you can decide it now. False when it waits for HR, or for another manager. |
records[].approver_actions | object | What the caller may do with this request as an approver. All false on your own requests. |
records[].approver_actions.can_withdraw | boolean | True when you may take back your manager approval with leave_requests.withdraw. |
records[].approver_actions.can_revoke | boolean | True when you may take back the final approval with leave_requests.revoke. |
records[].approver_actions.revoke_blocked_reason | string | Why revoking is blocked right now although you hold the right: payroll_locked or cancellation_pending. Null otherwise.Allowed values: payroll_locked, cancellation_pending, null |
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