QHR Developers

Preview who a new payroll run would pay

GET/payroll/payrolls/employees_info
Read token is enoughView payroll runs payroll_run/viewRequires feature payroll_runAvailable in Claudepayroll_runs.roster_preview

For a period and a pay cycle, returns the employees a new run would pay (records: name, basic salary, currency, location, department), and separately the ones it may not (excluded) because an overlapping run of the same pay cycle, or a termination package paying their final salary, already covers them.

When to use: before payroll_runs.create, to check the roster and pick employee_ids or excluded_employee_ids. Send payroll_id when re-picking the roster of an existing run, so its own employees still show.

Prerequisites: location_id and department_id (optional filters) from employees.meta_data.

Side effects: none. Up to 50 candidates per page; excluded is never paginated.

Before you call this

You will need ids that come from these operations:

Parameters

NameInTypeDescriptionExample
periodRequiredquerystringA month YYYY-MM, or a range YYYY-MM-DD,YYYY-MM-DD.2026-11
pay_cycleRequiredquerystringPay cycle of the run.
Allowed values: monthly, weekly, daily
monthly
location_idqueryintegerOnly employees of this work location.2
department_idqueryintegerOnly employees of this department.4
payroll_idqueryintegerThe run whose roster is being re-picked, from payroll_runs.list.77
pagequeryintegerPage number, starting at 1.
min 1
1
per_pagequeryintegerRecords per page. Each list states its maximum.
min 1
20
Accept-LanguageheaderstringLanguage of messages and translated labels. English when omitted.
Allowed values: ar, en
ar

Response

200 The candidates, and who is already covered.

FieldTypeDescription
recordsRequiredarray<object>Employees the run may pay.
records[].idintegerEmployee id.
records[].employee_nostringEmployee number.
records[].namestringFull name.
records[].location_idintegerWork location id.
records[].department_idintegerDepartment id.
records[].basic_salary_amountstringActive basic salary, decimal string.
records[].currencystringPay currency.
records[].includedbooleanAlways true: candidates start included.
paginationRequiredobject
pagination.current_pageRequiredintegerThis page's number.
pagination.per_pageRequiredintegerRecords per page.
pagination.total_entriesRequiredintegerRecords across all pages.
pagination.pagesRequiredintegerNumber of pages.
excludedRequiredarray<object>Employees already covered, and by what.
excluded[].employee_idintegerEmployee id.
excluded[].employee_nostringEmployee number.
excluded[].namestringFull name.
excluded[].reasonstringpayroll_run or termination_package.
excluded[].payroll_idintegerThe overlapping run.
excluded[].payroll_referencestringIts reference.
excluded[].termination_package_referencestringThe termination package's reference.
excluded[].messagestringExplanation for a termination package.

Errors

HTTPCodeMeaningHow to fix
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.
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_failedperiod is missing or not a month or date range, or pay_cycle is not monthly, weekly or daily.Send period=2026-11 (or 2026-11-01,2026-11-30) and a valid pay_cycle.
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 →