API Reference

Statements

7 endpoints· Auth: JWT or API Key
get/api/v1/console/accounting/statements/balance-sheet JWT API Key

The balance sheet as of an inclusive business day

A closed fiscal year's result sits in 3000 (its closing entry); the posted P&L of every year not yet closed rolls into one synthetic retained-earnings line, and the response carries the note that explains it.

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

AsOf
string (date)
The inclusive last business day; null means today's Baghdad business day.

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/accounting/statements/balance-sheet" \
  -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/statements/cash-flow JWT API Key

Get cash-flow

The cash-flow statement over a half-open window — indirect method, from GL lines only, with its derived net change proved against the cash accounts' actual movement.

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

From
string (date)
Inclusive lower bound. Null means the first day of the current Baghdad month.
ToExclusive
string (date)
Exclusive upper bound. Null means the day after today's Baghdad business day.

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/accounting/statements/cash-flow" \
  -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/statements/export JWT API Key

Stream a statement as a file

`?statement=tb|bs|gl|pnl|reconciliation|cf` (the P&L takes `from`/`toExclusive`, the reconciliation one `date`); `?format=csv` is honoured for the GL detail alone. A failure returns the envelope rather than a zero-byte download, so a client that asked for a spreadsheet and hit a refusal gets a code it can act on.

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

Statement
string
`tb`, `bs`, `gl`, `pnl` or `reconciliation`. Anything else is `VALIDATION`.
AsOf
string (date)
The inclusive as-of day for `tb` and `bs`.
From
string (date)
Inclusive lower bound for `gl` and `pnl`.
ToExclusive
string (date)
Exclusive upper bound for `gl` and `pnl`.
Date
string (date)
The one business day for `reconciliation` — never a range (FR-ACC-075).
AccountCode
string
Account-code filter for `gl`.
Source
string
Source filter for `gl`.
Format
string
`csv` selects the raw CSV; anything else, including nothing, streams the XLSX workbook (FR-ACC-076). A bookmarked export URL must not break on a typo, so an unrecognised value degrades to the default rather than failing. <br>CSV is offered for `gl` only: the trial balance and the balance sheet are statements with sections and totals, and flattening them to a headerless row list would ship a file whose numbers are right and whose meaning is gone.<br>`pdf` draws any statement server-side, Arabic or English (RPT C12).
Lang
string
—
Digits
string
—

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/accounting/statements/export" \
  -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/statements/gl-detail JWT API Key

The drillable general-ledger detail at line grain

Capped and disclosed: the response says how many rows matched before the cap, so a short answer is visibly short.

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

From
string (date)
Inclusive lower bound on the entry's business day.
ToExclusive
string (date)
Exclusive upper bound on the entry's business day.
AccountCode
string
Only lines on this account code. Optional.
Source
string
Only entries from this ratified journal source. Optional.
Limit
integer (int32)
Row cap, clamped to 1..2000 with a default of 500 (FR-ACC-072). A cap is not a page: the response says how many rows <i>matched</i> before it was applied, so a truncated read is visibly truncated rather than quietly short.

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/accounting/statements/gl-detail" \
  -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/statements/pnl JWT API Key

The GL-derived profit and loss over a half-open window.,

Signed once, at the formula: `creditBase − debitBase`, so revenue is positive and cost negative, and cash over/short is presented as `other` rather than an operating expense.

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

From
string (date)
Inclusive lower bound. Null means the first day of the current Baghdad month.
ToExclusive
string (date)
Exclusive upper bound. Null means the day after today's Baghdad business day.

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/accounting/statements/pnl" \
  -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/statements/reconciliation JWT API Key

The posted daily entry against the live operational projection

The statement that proves the ledger is a projection of the truth rather than a second opinion about it. In the reference this comparison was implemented, database-tested and reachable from nothing; this route is the point of that work.

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

Date
string (date)
The business day to reconcile; null means today's Baghdad business day.

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/accounting/statements/reconciliation" \
  -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/statements/trial-balance JWT API Key

The trial balance as of an inclusive business day.,

The payload carries `balanced` and a signed `imbalanceBase`. A ledger that does not foot still renders — an accountant cannot repair what a stack trace hid, and this statement is the tool for finding where it broke.

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

AsOf
string (date)
The inclusive last business day. Null means today's Baghdad business day, derived from the clock — never `IClock.Today`, which does not exist (SRS §2.5 constraint 5).

Responses

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

Query parameters

Headers

Set credentials in the “Authorize” menu