API Reference
Payroll
/api/v1/console/hr/payroll JWT API KeyRun history
- Capability
manage_payroll- API key scope
cap:manage_payroll(the key's owner must also hold the capability)- Plan feature
hr_payrollmust be on the branch's plan, or the call answers 403.
Query parameters
| Year integer (int32) | — |
| Status string | `draft | approved | paid`. |
| Page integer (int32) | — |
| PerPage integer (int32) | — |
| Search string | Free-text filter. Its meaning is per-resource and documented on the endpoint. |
| Skip integer (int32) | Rows to skip, derived — never sent by the caller on this surface. |
| Sort string | A snake_case column key from the endpoint's allow-list (`created_at`, `gross_total`, `status` …). Absent or blank → the endpoint's default order. |
| Dir string | `asc` (the default when Panoptes.Application.Common.SortableRequest.Sort is present) or `desc`. Ignored without a sort. |
Responses
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/hr/payroll" \
-H "X-Api-Key: <YOUR_API_KEY>"Query parameters
Headers
/api/v1/console/hr/payroll JWT API KeyGenerate the month
The request carries a month and nothing else — every payslip figure is derived server-side from live rows, because a client-supplied payslip figure is a client-supplied wage. A second run for the same branch-month is a `CONFLICT` (I-6).
- Capability
manage_payroll- API key scope
cap:manage_payroll(the key's owner must also hold the capability)- Plan feature
hr_payrollmust be on the branch's plan, or the call answers 403.
Request body
{
"month": 0,
"year": 0
}| month integer (int32) | 1–12. |
| year integer (int32) | 2020–2100. An out-of-range year is a visible validation error rather than a silent coercion — L30 records that every other numeric input in the reference module quietly became 0, and the payroll period is the one place the reference got that right. |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/payroll" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"month": 0,
"year": 0
}'Request body (JSON)
Headers
/api/v1/console/hr/payroll/{id} JWT API KeyOne run with its payslips
A run in another branch is a 404.,.
- Capability
manage_payroll- API key scope
cap:manage_payroll(the key's owner must also hold the capability)- Plan feature
hr_payrollmust be on the branch's plan, or the call answers 403.
Path parameters
| idrequired string (uuid) | — |
Query parameters
| Sort string | A snake_case column key from the endpoint's allow-list (`created_at`, `gross_total`, `status` …). Absent or blank → the endpoint's default order. |
| Dir string | `asc` (the default when Panoptes.Application.Common.SortableRequest.Sort is present) or `desc`. Ignored without a sort. |
Responses
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/hr/payroll/{id}" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Query parameters
Headers
/api/v1/console/hr/payroll/{id}/approve JWT API KeyApprove.,,
Freezes every payslip amount and the FX triple, and re-checks the period lock — a month that was open at generation can be closed before approval, and the accrual is dated the period end.
- Capability
manage_payroll- API key scope
cap:manage_payroll(the key's owner must also hold the capability)- Plan feature
hr_payrollmust be on the branch's plan, or the call answers 403.
Path parameters
| idrequired string (uuid) | — |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/payroll/{id}/approve" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Headers
/api/v1/console/hr/payroll/{id}/pay JWT API KeyPay
…,.
Terminal. There is no un-pay and no reversal path (I-7, L9). One transaction collects the loan instalments, recovers the advances, withdraws the run's net from the branch vault and flips the status — a locked today rolls all four back together.
- Capability
manage_payroll- API key scope
cap:manage_payroll(the key's owner must also hold the capability)- Plan feature
hr_payrollmust be on the branch's plan, or the call answers 403.- Idempotency
- Send an
Idempotency-Keyheader (a UUID you mint). A retry with the same key replays the first answer.
Path parameters
| idrequired string (uuid) | — |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/payroll/{id}/pay" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Headers
/api/v1/console/hr/payroll/payslips/{payslipId} JWT API KeyAdjust one payslip.,
Four fields, draft runs only. A non-draft edit is a `CONFLICT`: the approval is the accrual event, and an amount changed after it would make the general ledger disagree with the payslip it was posted from (I-4).
- Capability
manage_payroll- API key scope
cap:manage_payroll(the key's owner must also hold the capability)- Plan feature
hr_payrollmust be on the branch's plan, or the call answers 403.
Path parameters
| payslipIdrequired string (uuid) | — |
Request body
{
"bonuses": 0,
"commissions": 0,
"deductions": 0,
"note": "string"
}| bonuses integer (int64) | — |
| commissions integer (int64) | — |
| deductions integer (int64) | — |
| note string | — |
Responses
curl -X PUT "https://staging-api.panoptesos.com/api/v1/console/hr/payroll/payslips/{payslipId}" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"bonuses": 0,
"commissions": 0,
"deductions": 0,
"note": "string"
}'Path parameters
Request body (JSON)
Headers