QHR Developers

List payslips, grouped by payroll run

GET/payroll/payslips
Read token is enoughView payslips and earnings payslip/viewRequires feature payslipAvailable in Claudepayslips.list

Returns payslips grouped by payroll run, newest run first: each record is a run's summary (payroll) with its matching payslips (payslips) — totals, net, what was paid and what is still due. Draft payslips of runs still being prepared are included; employees cannot see those yet.

When to use: to answer "what did we pay in October?", "who is still unpaid?" (status=unpaid) or "what was Sara's net last month?" (q[employee_id_eq]). For one payslip's lines use payslips.show.

Prerequisites: none. payroll_id comes from payroll_runs.list, employee_id from employees.list.

Side effects: none. A page holds up to 20 runs; a run with no matching payslip is left out.

Before you call this

You will need ids that come from these operations:

Parameters

NameInTypeDescriptionExample
payroll_idqueryintegerOnly this payroll run, from payroll_runs.list.77
statusquerystringOnly payslips with this payment status.
Allowed values: unpaid, partial, paid, not_required
unpaid
q[employee_id_eq]queryintegerOnly this employee, from employees.list.1203
q[employee_employee_name_cont]querystringEmployee name contains.Sara
q[employee_employee_no_cont]querystringEmployee number contains.E-004
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 A page of payroll runs with their payslips.

FieldTypeDescription
recordsRequiredarray<object>One entry per run.
records[].payrollobjectA payroll run: one pay period for a group of employees, moving through its steps to finalised.
records[].payroll.idintegerRun id.
records[].payroll.referencestringRun reference, e.g. PYR-0042.
records[].payroll.pay_cyclestringmonthly, weekly or daily.
records[].payroll.statusstringStep: verify_info, verify_time, verify_earnings, verify_payments, pending_accounting (waiting for approval in Qoyod accounting) or finalized.
Allowed values: verify_info, verify_time, verify_earnings, verify_payments, pending_accounting, finalized
records[].payroll.descriptionstringFree-text description.
records[].payroll.location_idintegerWork location the run is limited to; null for all locations.
records[].payroll.payment_datestring (date)Planned pay date.
records[].payroll.fromstring (date)First day of the period.
records[].payroll.tostring (date)Last day of the period.
records[].payroll.employees_countintegerEmployees in the run.
records[].payroll.total_dueobjectStill to pay, per currency ({ "SAR": "412000.00" }). Empty before payslips exist.
records[].payroll.totalsobjectOne entry per pay currency (SAR, USD…), since a run's employees may be paid in different currencies.
records[].payslipsarray<object>The run's matching payslips, by id.
records[].payslips[].idintegerPayslip id.
records[].payslips[].payroll_idintegerThe payroll run it belongs to.
records[].payslips[].employee_idintegerThe employee.
records[].payslips[].employee_nostringEmployee number.
records[].payslips[].namestringEmployee's full name.
records[].payslips[].total_incomesstringSum of the income lines that apply. Decimal string.
records[].payslips[].total_deductionsstringSum of the deduction lines that apply. Decimal string.
records[].payslips[].netstringNet pay: incomes minus deductions. Decimal string.
records[].payslips[].total_paidstringPaid so far against this payslip. Decimal string.
records[].payslips[].duestringStill to pay: net minus paid. Decimal string.
records[].payslips[].payment_statusstringPayment status: unpaid, partial (part of the net was paid), paid, or not_required (net is zero, nothing to transfer).
Allowed values: unpaid, partial, paid, not_required
records[].payslips[].currencystringThe employee's pay currency, ISO code.
records[].payslips[].periodstringMonth of the run, YYYY-MM.
records[].payslips[].finalizedbooleanTrue once the run is finalised and the payslip can no longer change.
paginationRequiredobject
pagination.current_pageRequiredintegerThis page's number.
pagination.per_pageRequiredintegerRecords per page.
pagination.total_entriesRequiredintegerRecords across all pages.
pagination.pagesRequiredintegerNumber of pages.

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.
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 →