API Reference
Advances
6 endpoints· Auth: JWT or API Key
get
/api/v1/console/hr/advances JWT API KeyThe advance subledger.,
- 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
| EmployeeId string (uuid) | — |
| Status string | `pending | approved | rejected | recovered`. |
| 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/advances" \
-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/advances JWT API KeyRequest a salary advance
L3,.
Lands `pending`, which payroll cannot see: draws only `approved` advances, so an undecided request can never reach a payslip.
- 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.
Request body
application/json
{
"employeeId": "00000000-0000-0000-0000-000000000000",
"amount": 0,
"reason": "string"
}| employeeId string (uuid) | — |
| amount integer (int64) | Whole IQD. Never a decimal: the dinar has no minor unit, and a fractional advance is a rounding argument on somebody's wages. |
| reason string | — |
Responses
200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/advances" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"employeeId": "00000000-0000-0000-0000-000000000000",
"amount": 0,
"reason": "string"
}' Try itagainst staging · https://staging-api.panoptesos.com
Request body (JSON)
Headers
Set credentials in the “Authorize” menu
post
/api/v1/console/hr/advances/{id}/decision JWT API KeyApprove or reject it
Its own endpoint rather than a field on the create, because it is its own act by its own person and it audits under its own verb. A row that is not `pending` is a `CONFLICT`.
- 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) | — |
Request body
application/json
{
"decision": "string",
"note": "string",
"payFrom": "string"
}| decision string | `approved` or `rejected`. |
| note string | — |
| payFrom string | On an approval only: the advance is handed to the employee now, from the safe (`vault`, with its custody withdrawal) or the `bank`. The ledger books DR 1170 employee advances / CR that book, and the payroll payment that recovers it relieves 1170 instead of labour (final audit ACC-F5). Omitted: approved, not yet handed over through the product. |
Responses
200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/advances/{id}/decision" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"decision": "string",
"note": "string",
"payFrom": "string"
}' Try itagainst staging · https://staging-api.panoptesos.com
Path parameters
Request body (JSON)
Headers
Set credentials in the “Authorize” menu
get
/api/v1/console/hr/loans JWT API KeyThe loan subledger.,
- 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
| EmployeeId string (uuid) | — |
| Status string | `pending | active | paid | rejected`. |
| 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/loans" \
-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/loans JWT API KeyOriginate a loan
L3,.
Lands `pending` with the balance already seeded, so approval is a single status flip into `active` — the one status payroll draws instalments from.
- 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.
Request body
application/json
{
"employeeId": "00000000-0000-0000-0000-000000000000",
"principal": 0,
"installment": 0,
"reason": "string"
}| employeeId string (uuid) | — |
| principal integer (int64) | Whole IQD, the amount handed over. |
| installment integer (int64) | Whole IQD withheld per payroll month. Must be at least 1 and at most the principal — an instalment larger than the balance would make the first payslip settle the whole loan, which is a lump-sum deduction wearing an instalment's name. |
| reason string | — |
Responses
200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/loans" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"employeeId": "00000000-0000-0000-0000-000000000000",
"principal": 0,
"installment": 0,
"reason": "string"
}' Try itagainst staging · https://staging-api.panoptesos.com
Request body (JSON)
Headers
Set credentials in the “Authorize” menu
post
/api/v1/console/hr/loans/{id}/decision JWT API KeyApprove or reject it
An `active` loan may already carry `LoanPayment` receipts, so re-deciding one is a `CONFLICT`.
- 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) | — |
Request body
application/json
{
"decision": "string",
"note": "string",
"payFrom": "string"
}| decision string | `approved` or `rejected`. An approval moves the row to `active`, which is the vocabulary payroll consumes. |
| note string | — |
| payFrom string | `vault` or `bank`: the principal is handed over now, from that book (comeback r2-acc5, final audit ACC-F5 for loans). The approval then books DR 1170 employee advances / CR the book, and each payroll instalment relieves 1170 instead of crediting labour. Omitted: approved, not handed over through the product — nothing posts, exactly as before. |
Responses
200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/hr/loans/{id}/decision" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"decision": "string",
"note": "string",
"payFrom": "string"
}' Try itagainst staging · https://staging-api.panoptesos.com
Path parameters
Request body (JSON)
Headers
Set credentials in the “Authorize” menu