Get the weekly schedule of employees
/attendance_scheduleattendance_profile/viewRequires feature attendance_profileAvailable in Claudeattendance_profiles.scheduleReturns 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
| Name | In | Type | Description | Example |
|---|---|---|---|---|
page | query | integer | Page number, starting at 1. min 1 | 1 |
per_page | query | integer | Records per page. Each list states its maximum. min 1 | 20 |
week_start | query | string (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_id | query | integer | Only employees at this location, main or additional (id from employees.meta_data). | 2 |
department_id | query | integer | Only this department (id from employees.meta_data). | 4 |
attendance_setting_id | query | integer | Only employees on this profile at the start of the week (id from attendance_profiles.list). | 3 |
q[employee_name_or_employee_no_cont] | query | string | Name or employee number contains. | Sara |
Accept-Language | header | string | Language of messages and translated labels. English when omitted. Allowed values: ar, en | ar |
Response
200 One week of the schedule.
| Field | Type | Description |
|---|---|---|
week_startRequired | string (date) | The Sunday the week starts on. |
recordsRequired | array<object> | One row per employee, ordered by name. |
records[].employee | object | The employee: id, name, employee_no. |
records[].cells | array<object> | Seven days, Sunday to Saturday. |
records[].cells[].date | string (date) | The day. |
records[].cells[].profile | object | The profile in force that day (id, name). |
records[].cells[].kind | string | working, day_off, holiday or leave (approved leave).Allowed values: working, day_off, holiday, leave |
records[].cells[].window | object | Shift window { start, end } (HH:MM, company time); null on a non-working or flexible day. |
records[].cells[].shift_kind | string | rigid or flexible when the weekday has a day shift; null otherwise. |
records[].cells[].scheduled_hours | number | Hours scheduled; null when the day owes none. |
records[].cells[].location_id | integer | Location of the day shift, if any. |
records[].cells[].locked | boolean | True for today, past days and days of approved leave: they can no longer change. |
records[].cells[].required_hours | number | Hours owed at work (hours permission only). |
records[].cells[].worked_hours | number | Hours worked; so far for today; null for future days (hours permission only). |
records[].cells[].status | string | Attendance status of the day, e.g. present, late, absent, incomplete, not_started (hours permission only). |
records[].cells[].met | boolean | Whether the required hours were met; null for today and future days (hours permission only). |
records[].hours | object | Week totals over completed days: worked_hours, required_hours, full_week_required_hours, percent, status (under, met, over). Only with the hours permission. |
page_summary | object | This page's totals: worked_hours, required_hours, percent. Only with the hours permission. |
paginationRequired | object | |
pagination.current_pageRequired | integer | This page's number. |
pagination.per_pageRequired | integer | Records per page. |
pagination.total_entriesRequired | integer | Records across all pages. |
pagination.pagesRequired | integer | Number of pages. |
Errors
| HTTP | Code | Meaning | How to fix |
|---|---|---|---|
| 400 | bad_request | A parameter is missing or malformed. | Check the parameters against this operation's documentation. |
| 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