QHR Developers

Download my attendance history as Excel or CSV

GET/attendances/export
Needs a read & write tokenExport Employees, Documents, Leaves and Attendance lists to Excel/CSV exports/hr_dataRequires feature attendanceNot available in Claudeattendances.export
  • It also needs: Check in/out and view own attendance history attendance/view_own

Builds a spreadsheet of the token owner's own attendance days, the same rows attendances.my_history returns for the same filters: date, status, check-in and check-out (in the company's timezone), hours worked and the approved permissions of each day. Choose the file with format (xlsx for Excel, csv) and the columns with columns[], in the order you want them.

When to use: when the person wants a file of their attendance, e.g. for a month. To answer a question, attendances.my_history is lighter.

Prerequisites: at least one column key from attendances.export_columns. Needs the HR data export permission. A token created by a user linked to an employee record.

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

NameInTypeDescriptionExample
formatRequiredquerystringFile format: xlsx (Excel) or csv.
Allowed values: xlsx, csv
xlsx
columns[]Requiredqueryarray<string>Column keys from attendances.export_columns, in order. Repeat the parameter for each column.date,status,check_in_at,check_out_at,hours_worked
q[date_gteq]querystring (date)From this work date (inclusive).2026-10-01
q[date_lteq]querystring (date)Up to this work date (inclusive).2026-10-31
q[status_eq]querystringOnly days with this status.
Allowed values: present, late, incomplete, absent, on_leave, holiday, weekend
late
Accept-LanguageheaderstringLanguage 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

HTTPCodeMeaningHow to fix
400bad_formatformat is missing or not xlsx / csv.Send format=xlsx or format=csv.
400no_columnsNo columns[] was sent.Send at least one column key from the export's columns operation.
400unknown_columnA columns[] key is not one you may export (error names it).Use only keys from the export's columns operation.
400bad_filtersA filter cannot be read (a bad date, or a period the page refuses).Fix the filter named in error and send again.
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.
403token_read_onlyThis token can only read; the operation makes changes.Use a token created with "Allow changes".
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.
409export_in_progressYour 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.
422no_dataNothing matches the filters.Widen the filters or the period.
422too_largeMore than 20,000 rows; row_count and max_rows give the numbers.Narrow the filters or shorten the period.
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 →