QHR Developers

Upload an edited bulk-edit sheet to preview its changes

POST/employees/bulk_updates
Needs a read & write tokenEdit other profiles employee/edit_othersRequires feature employeeNot available in Claudeemployee_bulk_updates.create

Uploads the bulk-edit sheet after editing it (.xlsx or .csv, at most 5 MB and 500 rows, with an employee_no column) and starts building its preview in the background. Nothing changes on any employee yet: the preview lists, per row, what would change, what is unchanged and what is invalid. The answer is 202 with the bulk_update_id.

When to use: after editing the file from employee_bulk_updates.export. Any column can be left out; only the columns present are compared.

Prerequisites: the edited file. Follow the preview with employee_bulk_updates.show until status is awaiting_confirmation, then apply it with employee_bulk_updates.confirm or drop it with employee_bulk_updates.cancel.

Side effects: stores the uploaded rows until the bulk edit is confirmed, cancelled, or 24 hours pass.

Not offered to Claude: it is a file upload, and the start of a change to many employees at once.

Not available in Claude: file uploads are API-only.

Before you call this

You will need ids that come from these operations:

Parameters

NameInTypeDescriptionExample
Accept-LanguageheaderstringLanguage of messages and translated labels. English when omitted.
Allowed values: ar, en
ar

Request body

multipart/form-data

FieldTypeDescription
fileRequiredfileThe spreadsheet, sent as the multipart field file, at most 5 MB and 500 rows.

Response

202 The file was accepted; the preview is being built.

FieldTypeDescription
bulk_update_idRequiredintegerThe bulk edit's id, for employee_bulk_updates.show.

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.
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.
422validation_failedThe file is over 5 MB or 500 rows, cannot be read, has no employee_no column, or has no rows.Start from employee_bulk_updates.export, keep employee_no, and stay within 500 rows.
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 →