API Reference
Sale Invoices
/api/v1/console/pos/sale-invoices/{id} JWT API KeyGet id
One invoice with its correction posture — what is already unwound, what is not, and which reversal instrument to reach for.,.
Either owner capability opens it: a caller who may retire a row must be able to read the row they retired, and a caller who may correct one must be able to see what is in the way. The service accepts the same pair, so the two checks agree.
- Capability (any)
edit_invoiceordelete_invoice- API key scope
cap:edit_invoiceorcap:delete_invoice(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Responses
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/pos/sale-invoices/{id}" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Headers
/api/v1/console/pos/sale-invoices/{id} JWT API KeyCorrect a closed sale's header
`edit_invoice`,
`PATCH` rather than `PUT` because it is a partial, field-wise correction: an omitted field is untouched, and blanking one is an explicit flag rather than an overloaded null. Only the brand attribution and the delivery reference are correctable — the two header fields that carry no money, no stock and no ledger row.
- Capability
edit_invoice- API key scope
cap:edit_invoice(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Request body
{
"reason": "string",
"brandId": "00000000-0000-0000-0000-000000000000",
"clearBrandId": false,
"externalOrderId": "string",
"clearExternalOrderId": false
}| reason string | Why the header is being corrected. Mandatory: this is an owner-only write on the money spine, and an unexplained one is indistinguishable from tampering after the fact. |
| brandId string (uuid) | The virtual brand this sale should be attributed to. Must live in this branch. |
| clearBrandId boolean | Return the sale to the implicit "house" brand. Wins over Panoptes.Application.DTOs.Requests.Pos.CorrectSaleInvoiceRequest.BrandId. |
| externalOrderId string | The delivery platform's own order reference — the delivery-reconciliation key. Must be unique among the branch's live orders. |
| clearExternalOrderId boolean | Drop the external reference entirely. Wins over Panoptes.Application.DTOs.Requests.Pos.CorrectSaleInvoiceRequest.ExternalOrderId. |
Responses
curl -X PATCH "https://staging-api.panoptesos.com/api/v1/console/pos/sale-invoices/{id}" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"reason": "string",
"brandId": "00000000-0000-0000-0000-000000000000",
"clearBrandId": false,
"externalOrderId": "string",
"clearExternalOrderId": false
}'Path parameters
Request body (JSON)
Headers
/api/v1/console/pos/sale-invoices/{id} JWT API KeyRetire an invoice from the working set
`delete_invoice`,.
`DELETE` is the verb; a tombstone is the act. The service stamps `deletedAt`, `deletedById` and a mandatory `deleteReason` and never issues a row deletion. It refuses, with `409 CONFLICT` and a message naming the instrument to use instead, any order that still carries settled tender, an on-account accrual, an unreversed stock draw, or a cancellation disposition that feeds the owner's loss figure — because is absolute that a settled order is never soft-deleted in place of a cancel or a refund.
The body carries the reason. A `DELETE` with a body is unusual, and it is what `KdsStationsController.Delete` already does for the same reason: a retirement whose reason travelled in the query string would put it in every access log.
- Capability
delete_invoice- API key scope
cap:delete_invoice(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Request body
{
"reason": "string"
}| reason string | Why this invoice is being retired. Recorded on the row and in the audit log. |
Responses
curl -X DELETE "https://staging-api.panoptesos.com/api/v1/console/pos/sale-invoices/{id}" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Headers
/api/v1/console/pos/sale-invoices/{id}/restore JWT API KeyReturn a retired invoice to the working set
`delete_invoice`,.
Gated on the same capability as the retirement, not a wider one: un-retiring is the repair path for a mistaken tombstone, and splitting it into a second capability would mean an owner could hide a row that only somebody else could bring back.
- Capability
delete_invoice- API key scope
cap:delete_invoice(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Request body
{
"reason": "string"
}| reason string | Why this invoice is being returned to the working set. |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/pos/sale-invoices/{id}/restore" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"reason": "string"
}'Path parameters
Request body (JSON)
Headers