Download my team's attendance report as Excel or CSV
/team_attendance_reports/exportexports/hr_dataRequires feature attendanceNot available in Claudeteam_attendance_reports.export- It also needs: View team attendance
attendance/view_team
Builds a spreadsheet of the rows of team_attendance_reports.employees for a period: the same figures as the HR report, for the token owner's direct reports only. Choose the file with format (xlsx for Excel, csv) and the columns with columns[], in the order you want them.
When to use: when a manager wants a file of their team's month. To answer a question, team_attendance_reports.employees is lighter.
Prerequisites: at least one column key from team_attendance_reports.export_columns. Needs the HR data export permission. A token created by a manager linked to an employee record. The period defaults to the current month.
Side effects: each attempt is recorded in your exports history and the audit log. Up to 10,000 file rows the file comes straight back; above that the answer is 202, the file is built in the background and you are emailed when it is ready (fetch it with exports.list and exports.download). Rows are counted in the file, not in records: the work schedule has one row per employee per day, so 400 employees over 30 days is 12,000 rows. At most 20,000 rows, and one export of this page at a time per person. Not offered to Claude: it returns a file, not JSON.
Not available in Claude: it returns a file, not JSON.
Before you call this
You will need ids that come from these operations:
Parameters
| Name | In | Type | Description | Example |
|---|---|---|---|---|
formatRequired | query | string | File format: xlsx (Excel) or csv.Allowed values: xlsx, csv | xlsx |
columns[]Required | query | array<string> | Column keys from team_attendance_reports.export_columns, in order. Repeat the parameter for each column. | employee_no,name,attendance_days,absent_days,delay_days,commitment_percentage |
from | query | string (date) | First day of the period, YYYY-MM-DD, included. A calendar date in the company's timezone (the timezone set on the company, e.g. Asia/Riyadh), not UTC. Defaults to the first day of the current month in that timezone. from to to may span at most 366 days. | 2026-07-01 |
to | query | string (date) | Last day of the period, YYYY-MM-DD, included, in the company's timezone. Defaults to the last day of the current month (a future date for most of the month; future days hold no attendance yet, so they change no number). Must be on or after from. | 2026-07-31 |
search | query | string | Name or employee number contains this text, case-insensitive. The name matched is the full name in the request's language (Accept-Language): the English name for en, the Arabic name for ar. | Sara |
sort | query | string | Order of the rows: name (default, the full name in the request's language), employee_no or department (department name). The metrics cannot be sorted on. Any other value sorts by name.Allowed values: name, employee_no, department | name |
direction | query | string | asc (default) or desc.Allowed values: asc, desc | asc |
Accept-Language | header | string | Language of messages and translated labels. English when omitted. Allowed values: ar, en | ar |
Response
200 The file (Excel, or CSV with `format=csv`).
Returns a file, not JSON: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Errors
| HTTP | Code | Meaning | How to fix |
|---|---|---|---|
| 400 | bad_format | format is missing or not xlsx / csv. | Send format=xlsx or format=csv. |
| 400 | no_columns | No columns[] was sent. | Send at least one column key from the export's columns operation. |
| 400 | unknown_column | A columns[] key is not one you may export (error names it). | Use only keys from the export's columns operation. |
| 400 | bad_filters | A filter cannot be read (a bad date, or a period the page refuses). | Fix the filter named in error and send again. |
| 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 | token_read_only | This token can only read; the operation makes changes. | Use a token created with "Allow changes". |
| 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. |
| 409 | export_in_progress | Your previous export of this page is still being built; export describes it. | Wait for it to finish (it is emailed to you), then export again. |
| 422 | no_data | Nothing matches the filters. | Widen the filters or the period. |
| 422 | too_large | More than 20,000 rows; row_count and max_rows give the numbers. | Narrow the filters or shorten the period. |
entitlement_blocked · 429 rate_limited · 500 internal_error