API Reference

Customer Invoices

12 endpoints· Auth: JWT or API Key
get/api/v1/console/accounting/customer-invoices JWT API Key

The branch's receivable register

`outstanding_only` answers the question the register exists for — what is still owed — server-side, so two clients cannot reconstruct it two slightly different ways.

Capability (any)
view_glormanage_accounting
API key scope
cap:view_glorcap:manage_accounting (the key's owner must also hold the capability)
Plan feature
accounting must be on the branch's plan, or the call answers 403.

Query parameters

Status
string
One of `draft | issued | paid | void`. Optional.
From
string (date)
Inclusive lower bound on the invoice's Baghdad business day.
ToExclusive
string (date)
Exclusive upper bound on the invoice's Baghdad business day.
OutstandingOnly
boolean
Only invoices still owed — `issued` with `paidIqd < totalIqd`. <br>Kept as a flag rather than left to the caller's own filtering because "what is still owed to us" is the one question this register exists to answer, and a client that had to reconstruct it from `status` plus two money columns would each reconstruct it slightly differently.
IncludeDeleted
boolean
Include tombstoned invoices (FR-ACC-092). Honoured only for a caller holding `manage_accounting`; a read-only GL viewer never sees retired rows.
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/accounting/customer-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/accounting/customer-invoices JWT API Key

Draft an invoice.,

The request carries no subtotal, no tax figure and no total: every money figure is derived server-side from the lines, and a wire shape that cannot express a total can never disagree with the figure the ledger posts.

Capability (any)
view_glormanage_accounting and also manage_accounting
API key scope
cap:view_glorcap:manage_accounting (the key's owner must also hold the capability)
Plan feature
accounting must be on the branch's plan, or the call answers 403.

Request body

application/json
{
  "customerName": "string",
  "customerTaxId": "string",
  "businessDate": "2026-11-27",
  "dueDate": "2026-11-27",
  "currencyCode": "string",
  "notes": "string",
  "lines": [
    {
      "description": "string",
      "quantity": 0,
      "unitPriceIqd": 0,
      "taxCodeId": "00000000-0000-0000-0000-000000000000",
      "sourceOrderId": "00000000-0000-0000-0000-000000000000"
    }
  ]
}
customerName
string
—
customerTaxId
string
The customer's tax registration, as it must appear on the printed document.
businessDate
string (date)
The Baghdad business day the document is dated on. Defaults to today's business day. <br>It is a System.DateOnly and never a raw instant: the Baghdad day runs 03:00 → 03:00 local, and a document dated by a UTC timestamp lands in the wrong period for every invoice written between midnight and 03:00 (INV-024).
dueDate
string (date)
When the balance falls due. Null means on receipt (the business date).
currencyCode
string
The currency the invoice is billed in. Null means the branch's base currency, which is every invoice on a shipped install. Frozen at create — see Panoptes.Application.DTOs.Requests.Accounting.UpdateCustomerInvoiceRequest for why it is not editable afterwards.
notes
string
—
lines
CustomerInvoiceLineInput[]
Between 1 and 100 lines (FR-ACC-044).

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/accounting/customer-invoices" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "customerName": "string",
  "customerTaxId": "string",
  "businessDate": "2026-11-27",
  "dueDate": "2026-11-27",
  "currencyCode": "string",
  "notes": "string",
  "lines": [
    {
      "description": "string",
      "quantity": 0,
      "unitPriceIqd": 0,
      "taxCodeId": "00000000-0000-0000-0000-000000000000",
      "sourceOrderId": "00000000-0000-0000-0000-000000000000"
    }
  ]
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

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

One invoice with its billed lines.,

Another branch's invoice reads as `NOT_FOUND`, never `FORBIDDEN`.

Capability (any)
view_glormanage_accounting
API key scope
cap:view_glorcap:manage_accounting (the key's owner must also hold the capability)
Plan feature
accounting must be on the branch's plan, or the call answers 403.

Path parameters

idrequired
string (uuid)
—

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/accounting/customer-invoices/{id}" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Headers

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

Amend a draft

Refused once issued: the ledger holds an entry and the customer holds a copy, so the correction route is void-and-re-issue, the same reversal-not-mutation discipline the journal itself keeps.

Capability (any)
view_glormanage_accounting and also manage_accounting
API key scope
cap:view_glorcap:manage_accounting (the key's owner must also hold the capability)
Plan feature
accounting must be on the branch's plan, or the call answers 403.

Path parameters

idrequired
string (uuid)
—

Request body

application/json
{
  "customerName": "string",
  "customerTaxId": "string",
  "businessDate": "2026-11-27",
  "dueDate": "2026-11-27",
  "notes": "string",
  "lines": [
    {
      "description": "string",
      "quantity": 0,
      "unitPriceIqd": 0,
      "taxCodeId": "00000000-0000-0000-0000-000000000000",
      "sourceOrderId": "00000000-0000-0000-0000-000000000000"
    }
  ]
}
customerName
string
—
customerTaxId
string
—
businessDate
string (date)
The Baghdad business day. Null leaves the draft's existing date untouched.
dueDate
string (date)
When the balance falls due. Null means on receipt (the business date).
notes
string
—
lines
CustomerInvoiceLineInput[]
Between 1 and 100 lines. The existing set is replaced, not merged.

Responses

200Success
cURL
curl -X PUT "https://staging-api.panoptesos.com/api/v1/console/accounting/customer-invoices/{id}" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "customerName": "string",
  "customerTaxId": "string",
  "businessDate": "2026-11-27",
  "dueDate": "2026-11-27",
  "notes": "string",
  "lines": [
    {
      "description": "string",
      "quantity": 0,
      "unitPriceIqd": 0,
      "taxCodeId": "00000000-0000-0000-0000-000000000000",
      "sourceOrderId": "00000000-0000-0000-0000-000000000000"
    }
  ]
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

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

Tombstone an invoice entered in error

Refused for any invoice that reached the ledger — that one is corrected by a reversal, which is what the void endpoint is for. The reason is required and is recorded.

Capability (any)
view_glormanage_accounting and also manage_accounting
API key scope
cap:view_glorcap:manage_accounting (the key's owner must also hold the capability)
Plan feature
accounting must be on the branch's plan, or the call answers 403.

Path parameters

idrequired
string (uuid)
—

Request body

application/json
{
  "reason": "string"
}
reason
string
—

Responses

200Success
cURL
curl -X DELETE "https://staging-api.panoptesos.com/api/v1/console/accounting/customer-invoices/{id}" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/accounting/customer-invoices/{id}/issue JWT API Key

Issue a draft and post its ledger side in the same transaction.,

receivable for the total, CR revenue for the subtotal, CR VAT payable for the tax when non-zero — dated the invoice's own business day, so issuing into a locked period is `PERIOD_LOCKED` rather than quietly redated.

Capability (any)
view_glormanage_accounting and also manage_accounting
API key scope
cap:view_glorcap:manage_accounting (the key's owner must also hold the capability)
Plan feature
accounting must be on the branch's plan, or the call answers 403.
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
{
  "memo": "string"
}
memo
string
Free text carried onto the journal entry. Optional.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/accounting/customer-invoices/{id}/issue" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "memo": "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/accounting/customer-invoices/{id}/payments JWT API Key

Record a cash or bank receipt.,

Dated today's business day, not the invoice's — money arrives when it arrives. Over-collection is refused under a per-invoice advisory lock, and a cash receipt deposits into the safe in the same transaction.

Capability (any)
view_glormanage_accounting and also manage_accounting
API key scope
cap:view_glorcap:manage_accounting (the key's owner must also hold the capability)
Plan feature
accounting must be on the branch's plan, or the call answers 403.
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
{
  "amountIqd": 0,
  "method": "string",
  "reference": "string"
}
amountIqd
integer (int64)
Minor units of the invoice's currency, `>= 1` and at most the outstanding balance.
method
string
`cash` or `bank` — a closed two-value vocabulary (FR-ACC-047). <br>Deliberately not the merchant-extensible `PaymentMethod` table the point of sale uses: this value decides <b>which account the ledger debits</b> (1010 or 1030), so a rail a merchant could add at runtime would be a rail the poster has no account for.
reference
string
A cheque number, transfer reference or teller's note. Optional.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/accounting/customer-invoices/{id}/payments" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "amountIqd": 0,
  "method": "string",
  "reference": "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/accounting/customer-invoices/{id}/pdf JWT API Key

The invoice as a PDF (`?lang=ar|en`), Arabic-first

Capability (any)
view_glormanage_accounting
API key scope
cap:view_glorcap:manage_accounting (the key's owner must also hold the capability)
Plan feature
accounting must be on the branch's plan, or the call answers 403.

Path parameters

idrequired
string (uuid)
—

Query parameters

Lang
string
—

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/accounting/customer-invoices/{id}/pdf" \
  -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/accounting/customer-invoices/{id}/void JWT API Key

Void an invoice

A draft voids with no entry, because none ever existed. An issued invoice voids by posting a reversing entry dated the void day, which is what keeps it voidable after its issue month locks. Refused outright while any receipt stands.

Capability (any)
view_glormanage_accounting and also manage_accounting
API key scope
cap:view_glorcap:manage_accounting (the key's owner must also hold the capability)
Plan feature
accounting must be on the branch's plan, or the call answers 403.
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
{
  "reason": "string"
}
reason
string
Why it is being voided. Recorded on the audit row.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/accounting/customer-invoices/{id}/void" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "reason": "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/accounting/customer-invoices/billable-orders JWT API Key

POS orders that can still be billed on account — the "create from orders" picker

An order on a live (non-void) invoice, or a cancelled or refunded one, is not listed.

Capability (any)
view_glormanage_accounting and also manage_accounting
API key scope
cap:view_glorcap:manage_accounting (the key's owner must also hold the capability)
Plan feature
accounting must be on the branch's plan, or the call answers 403.

Query parameters

From
string (date)
—
To
string (date)
—
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/accounting/customer-invoices/billable-orders" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Query parameters

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/accounting/customer-invoices/statement JWT API Key

A customer's statement: opening, movements, closing and aging

Capability (any)
view_glormanage_accounting
API key scope
cap:view_glorcap:manage_accounting (the key's owner must also hold the capability)
Plan feature
accounting must be on the branch's plan, or the call answers 403.

Query parameters

Customer
string
The customer name exactly as invoiced (case-insensitive).
From
string (date)
—
To
string (date)
—
Lang
string
`ar` (default) or `en`, for the PDF.

Responses

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

Query parameters

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/accounting/customer-invoices/statement/pdf JWT API Key

The customer statement as a PDF (`?lang=ar|en`)

Capability (any)
view_glormanage_accounting
API key scope
cap:view_glorcap:manage_accounting (the key's owner must also hold the capability)
Plan feature
accounting must be on the branch's plan, or the call answers 403.

Query parameters

Customer
string
The customer name exactly as invoiced (case-insensitive).
From
string (date)
—
To
string (date)
—
Lang
string
`ar` (default) or `en`, for the PDF.

Responses

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

Query parameters

Headers

Set credentials in the “Authorize” menu