QHR Developers

List team permissions I can still take back

GET/team_permissions/decided_requests
Read token is enoughView team attendance attendance/view_teamRequires feature attendanceAvailable in Claudepermission_requests.team_decided

Returns the token owner's direct reports' permission requests (hourly leaves of absence) that the manager can still take back: those the manager approved on the manager_and_hr route that now wait for HR (actions.can_withdraw), and approved requests whose window has not started yet (actions.can_revoke), earliest window first.

When to use: to answer "which permissions have I approved that are still coming up?", or before permission_requests.withdraw / permission_requests.revoke.

Prerequisites: a token created by a manager who is linked to an employee record.

Side effects: none. Up to 50 per page.

Parameters

NameInTypeDescriptionExample
pagequeryintegerPage number, starting at 1.
min 1
1
per_pagequeryintegerRecords per page. Each list states its maximum.
min 1
20
Accept-LanguageheaderstringLanguage of messages and translated labels. English when omitted.
Allowed values: ar, en
ar

Response

200 A page of requests the manager can still take back.

FieldTypeDescription
recordsRequiredarray<object>The requests on this page.
records[].idRequiredintegerPermission request id.
records[].referencestringReference shown to people, PRM-<id>.
records[].employee_idRequiredintegerThe employee who asked.
records[].employee_nostringTheir employee number.
records[].employee_namestringTheir full name.
records[].dateRequiredstring (date)The working day the permission is for.
records[].start_timeRequiredstringStart, wall-clock time HH:MM in the attendance profile's timezone.
records[].end_timeRequiredstringEnd, wall-clock time HH:MM in the attendance profile's timezone.
records[].starts_atstring (date-time)Absolute start, in UTC. For an overnight shift it may fall on the next calendar day.
records[].ends_atstring (date-time)Absolute end, in UTC.
records[].minutesintegerLength in minutes.
records[].hoursnumberLength in hours, two decimals.
records[].kindstringWhat the window is, worked out by QHR from the shift: late_arrival (starts when the shift starts), early_leave (ends when the shift ends), mid_shift (inside the shift) or flexible (a day with no fixed hours).
Allowed values: late_arrival, early_leave, mid_shift, flexible
records[].notestringThe employee's reason (up to 500 characters).
records[].statusRequiredstringpending_manager (waiting for the employee's manager), pending_hr (waiting for HR), approved, rejected, cancelled (by the employee) or revoked (an approval taken back).
Allowed values: pending_manager, pending_hr, approved, rejected, cancelled, revoked
records[].approval_routestringWho approves, fixed when the request was filed from the attendance profile: manager, hr, or manager_and_hr (the manager first, then HR).
Allowed values: manager, hr, manager_and_hr
records[].revoke_typestringFor a revoked request: withdrawn (the manager took back their approval before HR decided) or revoked (a final approval taken back). Null otherwise.
records[].current_approver_namestringWho must decide now: the manager's name, or "HR". Null once decided.
records[].attachmentobjectSupporting file, if one was added in the QHR app: filename, content_type, byte_size and a temporary download url.
records[].actionsobjectWhat the token owner may do with this request now. blocked_reason explains why approve is off for an approver: payroll_locked or incident_decided.
records[].actions.can_editbooleanMay edit it (permission_requests.update).
records[].actions.can_cancelbooleanMay cancel it (permission_requests.cancel).
records[].actions.can_approvebooleanMay approve it (permission_requests.approve).
records[].actions.can_rejectbooleanMay reject it (permission_requests.reject).
records[].actions.can_withdrawbooleanMay withdraw their approval (permission_requests.withdraw).
records[].actions.can_revokebooleanMay revoke the approval (permission_requests.revoke).
records[].actions.blocked_reasonstringWhy approving is blocked, or null.
records[].managerobjectThe manager's decision, once they acted.
records[].manager.idintegerEmployee id of the person who acted.
records[].manager.namestringTheir full name.
records[].manager.acted_atstring (date-time)When, in UTC.
records[].manager.notestringThe note they left.
records[].hrobjectHR's decision, once HR acted.
records[].hr.idintegerEmployee id of the person who acted.
records[].hr.namestringTheir full name.
records[].hr.acted_atstring (date-time)When, in UTC.
records[].hr.notestringThe note they left.
records[].revokedobjectWho withdrew or revoked the approval, and why.
records[].revoked.idintegerEmployee id of the person who acted.
records[].revoked.namestringTheir full name.
records[].revoked.acted_atstring (date-time)When, in UTC.
records[].revoked.notestringThe note they left.
records[].cancelled_atstring (date-time)When the employee cancelled it, in UTC.
records[].created_atstring (date-time)When it was filed, in UTC.
records[].attendance_profileobjectOnly on permission_requests.show: the employee's shift that day (shift_start, shift_end, day_type, flexible, scheduled_hours, grace_period_minutes).
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.
422employee_requiredThe token's owner is a company user with no employee record, so they cannot act as a manager or HR approver.Use a token created by a user who is linked to an employee, or ask HR to link this user to their employee record.
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 →