API Reference

Purchase Approvals

3 endpoints· Auth: JWT or API Key
post/api/v1/console/purchase-invoices/approvals/{approvalRequestId}/apply JWT API Key

Execute an approved over-threshold direct receipt.,,

201, because nothing existed before this call: the original receive attempt posted no invoice, no stock and no debt. It is addressed by approval request id rather than by invoice id for the same reason — there is no invoice to address until this succeeds.

The body carries nothing about the goods. The delivery comes entirely from the payload filed when the receipt was refused, re-parsed and re-resolved against the branch — a field here would let an approver approve one delivery and post another.

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

approvalRequestIdrequired
string (uuid)
—

Request body

application/json
{
  "note": "string"
}
note
string
Optional decision note, recorded on the approval and its audit row.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/purchase-invoices/approvals/{approvalRequestId}/apply" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "note": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/purchase-orders/{id}/apply-approval JWT API Key

Approve a parked order and place it.,

Approval is the only transition from `pending_approval` to `ordered`, so an administrator can never walk their own over-threshold spend into the books. An order that is no longer awaiting approval is `CONFLICT`; a request the caller filed themselves is `FORBIDDEN`, refused by the approvals module's own bar.

Capability
approve_requests
API key scope
cap:approve_requests (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
{
  "approvalRequestId": "00000000-0000-0000-0000-000000000000",
  "note": "string"
}
approvalRequestId
string (uuid)
The request to consume. Optional: when absent the service resolves the order's own `purchase_order_approval` request, which is the ordinary case because a submit files exactly one. Supplying it is how a caller stays exact when an order was submitted, rejected and re-submitted.
note
string
Optional decision note. It reaches `ApprovalRequest.decisionNote` and the decision's own audit row.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/purchase-orders/{id}/apply-approval" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "approvalRequestId": "00000000-0000-0000-0000-000000000000",
  "note": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/purchase-orders/{id}/revert-approval JWT API Key

Reject the request and return the order to `draft`

No order may dangle in `pending_approval` behind a decided request: with approval the only way forward, a rejected order left parked would be unreachable forever. Back in draft it is editable and re-submittable.

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

Path parameters

idrequired
string (uuid)
—

Request body

application/json
{
  "approvalRequestId": "00000000-0000-0000-0000-000000000000",
  "note": "string"
}
approvalRequestId
string (uuid)
The request to reject and consume. Optional — see Panoptes.Application.DTOs.Requests.Purchasing.ApplyPurchaseApprovalRequest.ApprovalRequestId.
note
string
Optional rejection note.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/purchase-orders/{id}/revert-approval" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "approvalRequestId": "00000000-0000-0000-0000-000000000000",
  "note": "string"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

Set credentials in the “Authorize” menu