QHR Developers

Get the weekly schedule of employees

GET/attendance_schedule
Read token is enoughView attendance profiles attendance_profile/viewRequires feature attendance_profileAvailable in Claudeattendance_profiles.schedule

Returns the schedule grid: one page of active employees, ordered by name, across one week from Sunday to Saturday. Each day says which profile applies, whether it is a working day, a day off, a public holiday or approved leave, the shift window or scheduled hours, and whether it is locked (today, past days and days of approved leave cannot be changed any more).

With the "View attendance reports" permission each day also carries the hours worked against the hours required, and each row and the page carry week totals (hours, page_summary) over the days already completed. Without it those keys are left out.

When to use: to see who works when in a given week, or to check a team's hours against their schedule. For one employee's profile and its next change, attendance_profiles.employee_profile is lighter.

Prerequisites: none. Filter ids come from employees.meta_data (locations, departments) and attendance_profiles.list.

Side effects: none. Up to 50 employees 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
week_startquerystring (date)Any date in the week to show (YYYY-MM-DD); the grid starts on that week's Sunday. This week when omitted.2026-11-22
location_idqueryintegerOnly employees at this location, main or additional (id from employees.meta_data).2
department_idqueryintegerOnly this department (id from employees.meta_data).4
attendance_setting_idqueryintegerOnly employees on this profile at the start of the week (id from attendance_profiles.list).3
q[employee_name_or_employee_no_cont]querystringName or employee number contains.Sara
Accept-LanguageheaderstringLanguage of messages and translated labels. English when omitted.
Allowed values: ar, en
ar

Response

200 One week of the schedule.

FieldTypeDescription
week_startRequiredstring (date)The Sunday the week starts on.
recordsRequiredarray<object>One row per employee, ordered by name.
records[].employeeobjectThe employee: id, name, employee_no.
records[].cellsarray<object>Seven days, Sunday to Saturday.
records[].cells[].datestring (date)The day.
records[].cells[].profileobjectThe profile in force that day (id, name).
records[].cells[].kindstringworking, day_off, holiday or leave (approved leave).
Allowed values: working, day_off, holiday, leave
records[].cells[].windowobjectShift window { start, end } (HH:MM, company time); null on a non-working or flexible day.
records[].cells[].shift_kindstringrigid or flexible when the weekday has a day shift; null otherwise.
records[].cells[].scheduled_hoursnumberHours scheduled; null when the day owes none.
records[].cells[].location_idintegerLocation of the day shift, if any.
records[].cells[].lockedbooleanTrue for today, past days and days of approved leave: they can no longer change.
records[].cells[].required_hoursnumberHours owed at work (hours permission only).
records[].cells[].worked_hoursnumberHours worked; so far for today; null for future days (hours permission only).
records[].cells[].statusstringAttendance status of the day, e.g. present, late, absent, incomplete, not_started (hours permission only).
records[].cells[].metbooleanWhether the required hours were met; null for today and future days (hours permission only).
records[].hoursobjectWeek totals over completed days: worked_hours, required_hours, full_week_required_hours, percent, status (under, met, over). Only with the hours permission.
page_summaryobjectThis page's totals: worked_hours, required_hours, percent. Only with the hours permission.
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.
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 →