List payslips, grouped by payroll run
/payroll/payslipspayslip/viewRequires feature payslipAvailable in Claudepayslips.listReturns 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
| Name | In | Type | Description | Example |
|---|---|---|---|---|
payroll_id | query | integer | Only this payroll run, from payroll_runs.list. | 77 |
status | query | string | Only payslips with this payment status. Allowed values: unpaid, partial, paid, not_required | unpaid |
q[employee_id_eq] | query | integer | Only this employee, from employees.list. | 1203 |
q[employee_employee_name_cont] | query | string | Employee name contains. | Sara |
q[employee_employee_no_cont] | query | string | Employee number contains. | E-004 |
page | query | integer | Page number, starting at 1. min 1 | 1 |
per_page | query | integer | Records per page. Each list states its maximum. min 1 | 20 |
Accept-Language | header | string | Language of messages and translated labels. English when omitted. Allowed values: ar, en | ar |
Response
200 A page of payroll runs with their payslips.
| Field | Type | Description |
|---|---|---|
recordsRequired | array<object> | One entry per run. |
records[].payroll | object | A payroll run: one pay period for a group of employees, moving through its steps to finalised. |
records[].payroll.id | integer | Run id. |
records[].payroll.reference | string | Run reference, e.g. PYR-0042. |
records[].payroll.pay_cycle | string | monthly, weekly or daily. |
records[].payroll.status | string | Step: 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.description | string | Free-text description. |
records[].payroll.location_id | integer | Work location the run is limited to; null for all locations. |
records[].payroll.payment_date | string (date) | Planned pay date. |
records[].payroll.from | string (date) | First day of the period. |
records[].payroll.to | string (date) | Last day of the period. |
records[].payroll.employees_count | integer | Employees in the run. |
records[].payroll.total_due | object | Still to pay, per currency ({ "SAR": "412000.00" }). Empty before payslips exist. |
records[].payroll.totals | object | One entry per pay currency (SAR, USD…), since a run's employees may be paid in different currencies. |
records[].payslips | array<object> | The run's matching payslips, by id. |
records[].payslips[].id | integer | Payslip id. |
records[].payslips[].payroll_id | integer | The payroll run it belongs to. |
records[].payslips[].employee_id | integer | The employee. |
records[].payslips[].employee_no | string | Employee number. |
records[].payslips[].name | string | Employee's full name. |
records[].payslips[].total_incomes | string | Sum of the income lines that apply. Decimal string. |
records[].payslips[].total_deductions | string | Sum of the deduction lines that apply. Decimal string. |
records[].payslips[].net | string | Net pay: incomes minus deductions. Decimal string. |
records[].payslips[].total_paid | string | Paid so far against this payslip. Decimal string. |
records[].payslips[].due | string | Still to pay: net minus paid. Decimal string. |
records[].payslips[].payment_status | string | Payment 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[].currency | string | The employee's pay currency, ISO code. |
records[].payslips[].period | string | Month of the run, YYYY-MM. |
records[].payslips[].finalized | boolean | True once the run is finalised and the payslip can no longer change. |
paginationRequired | object | |
pagination.current_pageRequired | integer | This page's number. |
pagination.per_pageRequired | integer | Records per page. |
pagination.total_entriesRequired | integer | Records across all pages. |
pagination.pagesRequired | integer | Number of pages. |
Errors
| HTTP | Code | Meaning | How to fix |
|---|---|---|---|
| 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 | 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. |
entitlement_blocked · 429 rate_limited · 500 internal_error