API Reference

Payroll

6 endpoints· Auth: JWT or API Key
get/api/v1/console/hr/payroll JWT API Key

Run history

Capability
manage_payroll
API key scope
cap:manage_payroll (the key's owner must also hold the capability)
Plan feature
hr_payroll must 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

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/hr/payroll" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Query parameters

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/hr/payroll JWT API Key

Generate 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_payroll must be on the branch's plan, or the call answers 403.

Request body

application/json
{
  "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

200Success
cURL
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
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/hr/payroll/{id} JWT API Key

One 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_payroll must 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

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/hr/payroll/{id}" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Query parameters

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/hr/payroll/{id}/approve JWT API Key

Approve.,,

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_payroll must be on the branch's plan, or the call answers 403.

Path parameters

idrequired
string (uuid)
—

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/payroll/{id}/approve" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/hr/payroll/{id}/pay JWT API Key

Pay

…,.

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_payroll must be on the branch's plan, or the call answers 403.
Idempotency
Send an Idempotency-Key header (a UUID you mint). A retry with the same key replays the first answer.

Path parameters

idrequired
string (uuid)
—

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/payroll/{id}/pay" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Headers

Set credentials in the “Authorize” menu
put/api/v1/console/hr/payroll/payslips/{payslipId} JWT API Key

Adjust 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_payroll must be on the branch's plan, or the call answers 403.

Path parameters

payslipIdrequired
string (uuid)
—

Request body

application/json
{
  "bonuses": 0,
  "commissions": 0,
  "deductions": 0,
  "note": "string"
}
bonuses
integer (int64)
—
commissions
integer (int64)
—
deductions
integer (int64)
—
note
string
—

Responses

200Success
cURL
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"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

Set credentials in the “Authorize” menu