API Reference

Purchase Invoices

7 endpoints· Auth: JWT or API Key
get/api/v1/console/purchase-invoices JWT API Key

List receipts, newest first

Filterable by match status — the only surface, besides the supplier statement, on which a held bill looks different from an ordinary one ( item 17).

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

Query parameters

SupplierId
string (uuid)
—
Status
string
`open` | `partially_paid` | `paid`. Optional.
MatchStatus
string
`matched` | `exception`. Optional. The two axes are orthogonal (SRS §5.9.6): a held bill is still owed, so this filter never means "unpaid".
From
string (date)
First business day, inclusive (Asia/Baghdad). The receipt's own `businessDate` — the day the goods arrived — decides; an invoice with none falls back to the Baghdad day it was entered, the same rule the purchases-by-day summary uses.
To
string (date)
Last business day, inclusive. Either bound may be omitted.
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/purchase-invoices" \
  -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/purchase-invoices JWT API Key

Post a goods receipt

201 even when the receipt was parked for approval: something was created either way — an invoice, or an approval request — and the body says which. A direct receipt over the spend threshold posts nothing.

Capability
receive_purchase
API key scope
cap:receive_purchase (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.

Request body

application/json
{
  "supplierId": "00000000-0000-0000-0000-000000000000",
  "purchaseOrderId": "00000000-0000-0000-0000-000000000000",
  "paymentType": "string",
  "paidAmount": 0,
  "stockLocationId": "00000000-0000-0000-0000-000000000000",
  "lines": [
    {
      "inventoryItemId": "00000000-0000-0000-0000-000000000000",
      "quantity": 0,
      "unitCost": 0,
      "lotNumber": "string",
      "expiryDate": "2026-11-27",
      "purchaseOrderItemId": "00000000-0000-0000-0000-000000000000",
      "rejectedQty": 0,
      "rejectReason": "string",
      "rejectDisposition": "string",
      "temperatureC": 0,
      "qcNote": "string",
      "taxCodeId": "00000000-0000-0000-0000-000000000000"
    }
  ],
  "businessDate": "2026-11-27",
  "receiptNumber": "string",
  "notes": "string",
  "paidFrom": "string",
  "awaitingBill": false
}
supplierId
string (uuid)
—
purchaseOrderId
string (uuid)
The order being received against, or NULL for a direct receive. A direct receive over the T1 spend threshold posts nothing and files an approval instead (FR-PUR-033).
paymentType
string
`cash` | `credit` (FR-PUR-024).
paidAmount
integer (int64)
The down-payment actually handed over, in minor units. Meaningful only on a `credit` receipt; a `cash` receipt is paid in full by definition (FR-PUR-027).
stockLocationId
string (uuid)
Where the goods land. NULL uses each item's `defaultStockLocationId` (FR-PUR-030).
lines
ReceiveLineRequest[]
—
businessDate
string (date)
The day the goods arrived; defaults to today. Must be an open period, not in the future.
receiptNumber
string
The supplier's paper receipt number.
notes
string
—
paidFrom
string
For a cash purchase: which cash book paid it, `drawer` or `vault`. The book is debited in the same transaction. Omit when the money did not come from a branch cash book.
awaitingBill
boolean
Separate bill entry (PUR depth): the supplier's own bill has not arrived. The receipt posts stock and the provisional payable as usual but is HELD from payment until a supplier bill is matched to it (`POST supplier-bills`).

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/purchase-invoices" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "supplierId": "00000000-0000-0000-0000-000000000000",
  "purchaseOrderId": "00000000-0000-0000-0000-000000000000",
  "paymentType": "string",
  "paidAmount": 0,
  "stockLocationId": "00000000-0000-0000-0000-000000000000",
  "lines": [
    {
      "inventoryItemId": "00000000-0000-0000-0000-000000000000",
      "quantity": 0,
      "unitCost": 0,
      "lotNumber": "string",
      "expiryDate": "2026-11-27",
      "purchaseOrderItemId": "00000000-0000-0000-0000-000000000000",
      "rejectedQty": 0,
      "rejectReason": "string",
      "rejectDisposition": "string",
      "temperatureC": 0,
      "qcNote": "string",
      "taxCodeId": "00000000-0000-0000-0000-000000000000"
    }
  ],
  "businessDate": "2026-11-27",
  "receiptNumber": "string",
  "notes": "string",
  "paidFrom": "string",
  "awaitingBill": false
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/purchase-invoices/{id} JWT API Key

One receipt with its lines

The lines take `?sort=&dir=` (`PurchaseInvoiceLineSort`); the parameter is not named `sort` so the binder does not read that key as its prefix.

Capability
receive_purchase
API key scope
cap:receive_purchase (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/purchase-invoices/{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
get/api/v1/console/purchase-invoices/vat-codes JWT API Key

Get vat-codes

The supplier VAT codes a receipt line may carry — under `receive_purchase`, since the clerk holding the supplier's tax invoice tags the line.

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

Responses

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

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/supplier-returns JWT API Key

List returns to supplier, latest business day first

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

Query parameters

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/supplier-returns" \
  -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/supplier-returns JWT API Key

Record a return to supplier

Period-guarded on the operator's own business date, not on today: this is the only PUR header a user dates, and back-dating it into a closed month is the write the lock exists to refuse. There is no void or amend path — a wrong return is answered by a compensating receipt ( item 20).

Capability
return_to_supplier
API key scope
cap:return_to_supplier (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.

Request body

application/json
{
  "purchaseInvoiceId": "00000000-0000-0000-0000-000000000000",
  "businessDate": "2026-11-27",
  "reason": "string",
  "lines": [
    {
      "purchaseInvoiceItemId": "00000000-0000-0000-0000-000000000000",
      "quantity": 0
    }
  ]
}
purchaseInvoiceId
string (uuid)
The source receipt. Every line must belong to it.
businessDate
string (date)
The Baghdad business day the goods physically went back.
reason
string
—
lines
SupplierReturnLineRequest[]
—

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/supplier-returns" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "purchaseInvoiceId": "00000000-0000-0000-0000-000000000000",
  "businessDate": "2026-11-27",
  "reason": "string",
  "lines": [
    {
      "purchaseInvoiceItemId": "00000000-0000-0000-0000-000000000000",
      "quantity": 0
    }
  ]
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/supplier-returns/{id} JWT API Key

One return to supplier (the debit note) with its lines

The lines take `?sort=&dir=` (`SupplierReturnLineSort`).

Capability
return_to_supplier
API key scope
cap:return_to_supplier (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/supplier-returns/{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