QHR Developers

Check a day before asking for a permission

GET/permission_requests/day_context
Read token is enoughCheck in/out and view own attendance history attendance/view_ownRequires feature attendanceAvailable in Claudepermission_requests.day_context

Describes one date for the token owner before they ask for an hourly leave of absence on it: whether their attendance profile allows permission requests (enabled), whether it is a working day, the shift (shift_start / shift_end in the profile's timezone, and the same as UTC instants), the required minutes, the grace period, the approval route a new request would follow (manager, hr or manager_and_hr), and the owner's pending or approved requests already on that day (existing).

When to use: before permission_requests.create, to choose a window inside the shift that does not overlap existing. A window that starts at the shift start is a late arrival, one that ends at the shift end is an early leave. Display only: create checks every rule again.

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

Side effects: none.

Parameters

NameInTypeDescriptionExample
dateRequiredquerystring (date)The date to describe, YYYY-MM-DD.2026-11-30
Accept-LanguageheaderstringLanguage of messages and translated labels. English when omitted.
Allowed values: ar, en
ar

Response

200 The day, as the request form needs it.

FieldTypeDescription
datestring (date)The date.
enabledbooleanThe profile allows permission requests on that date.
working_daybooleanIt is a working day for the owner.
day_typestringworking_day, weekend, holiday, leave…
flexiblebooleanA flexible day: no fixed hours, only required minutes.
shift_startstringShift start, HH:MM.
shift_endstringShift end, HH:MM.
shift_starts_atstringShift start, in UTC.
shift_ends_atstringShift end, in UTC.
required_minutesintegerMinutes the owner must work that day.
grace_period_minutesintegerGrace minutes before a late arrival counts; 0 when off.
approval_routestringWho would approve a new request: manager, hr or manager_and_hr.
profile_namestringAttendance profile name.
existingarray<object>The owner's pending and approved requests that day.
existing[].idintegerRequest id.
existing[].kindstringKind.
existing[].statusstringStatus.
existing[].start_timestringStart, HH:MM.
existing[].end_timestringEnd, HH:MM.

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.
422invalid_datedate is not a real date.Send the date as YYYY-MM-DD.
422employee_requiredThe token's owner is a company user with no employee record, so they have no permission requests.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 →