API Reference

Supplier Payments

5 endpoints· Auth: JWT or API Key
get/api/v1/console/suppliers/{id}/payable JWT API Key

What may actually be paid.,

Read before paying. The figure is re-derived under the branch lock inside the payment itself — a screen's copy can go stale between the form and the write, so this informs the operator and never authorises the write.

The open bills take `?sort=&dir=` (`PayableInvoiceSort`); no sort keeps the FIFO order a payment consumes them in.

Capability
register_supplier_payment
API key scope
cap:register_supplier_payment (the key's owner must also hold the capability)

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/suppliers/{id}/payable" \
  -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
get/api/v1/console/suppliers/{id}/payments JWT API Key

The supplier's outbound payment stream, newest first

Unnetted on purpose: it is the stream the independent aging reconstruction replays to cross-check the `dueAmount` column, and a netted view cannot do that.

Capability
register_supplier_payment
API key scope
cap:register_supplier_payment (the key's owner must also hold the capability)

Path parameters

idrequired
string (uuid)
—

Query parameters

PurchaseInvoiceId
string (uuid)
Restrict to one settled bill. Optional; a payment against another supplier's invoice is filtered out by the supplier predicate regardless of what is asked for here.
Method
string
`CASH` | `SUPPLIER_CREDIT` | `RETURN_CREDIT`. Optional, case-insensitive.
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/suppliers/{id}/payments" \
  -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/suppliers/{id}/payments JWT API Key

Settle the account

…,.

201: a payment is a document that did not exist before. The body carries an amount and nothing else — which bills it lands on is the server's decision (oldest clean bill first, stored credit before cash), because a client that could nominate the invoice could pay one the three-way match is holding.

A dated financial write: a locked business day returns `PERIOD_LOCKED`.

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

Request body

application/json
{
  "amount": 0,
  "note": "string",
  "paidFrom": "string"
}
amount
integer (int64)
Minor units of the supplier's own `currencyCode`, strictly positive. `long`, never `decimal`: this is the figure that leaves the safe, and a fractional dinar is not a thing that can leave a safe.
note
string
Optional operator context — a transfer reference, a cheque number. It reaches the audit row and the cash-ledger note, which is the only place a payment carries prose at all.
paidFrom
string
The cash book the money left (comeback acc-fixes, ACC-7): `vault` (the safe — the default, and the reference's only book) or `bank`. A safe payment writes the safe's withdrawal and credits 1020; a bank transfer touches no custody book and credits 1030, so the bank reconciliation can match it to the statement line it produced.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/suppliers/{id}/payments" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "amount": 0,
  "note": "string",
  "paidFrom": "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/suppliers/{id}/statement JWT API Key

The accounts-payable statement, aged by DUE date

`manage_suppliers`, deliberately — see the class summary. The response states plainly whether the recomputed balance agrees with the cached `totalDebt`; a statement that could not disagree with the cache could not detect the one failure it exists to detect.

Capability
manage_suppliers
API key scope
cap:manage_suppliers (the key's owner must also hold the capability)

Path parameters

idrequired
string (uuid)
—

Query parameters

AsOf
string (date)
The Baghdad business day the aging is measured from. Null means today.
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/suppliers/{id}/statement" \
  -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
get/api/v1/console/suppliers/{id}/statement/export JWT API Key

The statement as a file — `?format=csv`, else XLSX (benchmark PUR/RPT C12)

Capability
manage_suppliers
API key scope
cap:manage_suppliers (the key's owner must also hold the capability)

Path parameters

idrequired
string (uuid)
—

Query parameters

AsOf
string (date)
The Baghdad business day the aging is measured from. Null means today.
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.
Format
string
—
Lang
string
—
Digits
string
—

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/suppliers/{id}/statement/export" \
  -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