Get my work schedule for a week
GET
/attendances/my_scheduleRead token is enoughCheck in/out and view own attendance history
attendance/view_ownRequires feature attendanceAvailable in Claudeattendances.my_scheduleReturns the token owner's planned schedule for one week, Sunday to Saturday: for each day whether it is a working day, a day off, a public holiday or approved leave, the attendance profile in force, the shift window (09:00–17:00, company time) or flexible with its hours, and the scheduled hours. It also gives the profile's weekly target hours, days off and grace period, and any profile change already scheduled for the future (next_change).
When to use: to answer "what time do I start tomorrow?", "am I working on Thursday?" or "when does my new schedule start?". Any week can be asked for, past or future.
Prerequisites: a token created by a user linked to an employee record.
Side effects: none.
Parameters
| Name | In | Type | Description | Example |
|---|---|---|---|---|
week_start | query | string (date) | Any date in the week wanted; the week starts on the Sunday on or before it. The current week when omitted. | 2026-11-04 |
Accept-Language | header | string | Language of messages and translated labels. English when omitted. Allowed values: ar, en | ar |
Response
200 The week.
| Field | Type | Description |
|---|---|---|
week_start | string (date) | The Sunday the week starts on. |
days | array<object> | Seven days, Sunday first. |
days[].date | string (date) | Date. |
days[].profile | object | Attendance profile in force: id, name. |
days[].kind | string | working, day_off, holiday or leave.Allowed values: working, day_off, holiday, leave |
days[].window | object | Shift window, company time: start, end (HH:MM). Null on flexible and non-working days. |
days[].shift_kind | string | rigid (fixed hours) or flexible; null on non-working days. |
days[].scheduled_hours | number | Hours owed that day; null when nothing is owed. |
days[].location_id | integer | Location of that day's shift, when set. |
days[].locked | boolean | True for today and past days, and leave days: no longer changeable in the schedule. |
summary | object | Today's profile (profile), weekly_target_hours, days_off (0 = Sunday … 6 = Saturday) and grace_period_minutes. |
next_change | object | A scheduled profile change: effective_from, profile, days_off; null when none. |
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. |
| 422 | employee_required | The token's owner is a company user with no employee record, so they have no attendance. | Use a token created by a user who is linked to an employee, or ask HR to link this user to their employee record. |
entitlement_blocked · 429 rate_limited · 500 internal_error