API Reference

Loss Summary

4 endpoints· Auth: JWT or API Key
get/api/v1/console/loss/breakdown JWT API Key

The unified per-channel breakdown — the "total leakage, all channels" card.,

Nine channels, each counted exactly once, summing exactly to the headline. The ninth, `standard_cost_variance`, is the G-16 fix: the reference build counted those rows in the total and omitted them from the drill-down, so the two disagreed on any branch running standard costing.

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

Query parameters

From
string (date)
—
To
string (date)
—
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/loss/breakdown" \
  -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/loss/completeness JWT API Key

Data completeness on its own.,

Measured over every row in range, including the ones the totals exclude, so a console can render the "N slices are not closed yet" banner without pulling a roll-up.

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

Query parameters

From
string (date)
—
To
string (date)
—

Responses

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

One slice, row by row.,

The drill-down behind a summary line. It returns the DRAFT and PENDING rows too, each flagged with whether it counted — so an operator can see why a visible variance is not in the headline instead of concluding the headline is wrong.

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

Query parameters

BusinessDate
string (date)
—
Shift
LedgerShift
The slice's shift tag. `all` is the whole-day rollup slice, not a wildcard.
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/loss/slice" \
  -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/loss/summary JWT API Key

The grouped loss summary.,

Totals over the financially-final rows, grouped rows most-negative first, and the completeness banner that says how much of the range is not closed yet. The default range is the last seven Baghdad business days — not the last seven UTC days, which is defect 11.

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

Query parameters

From
string (date)
First business day, inclusive. Absent means "the last seven Baghdad business days", anchored on the business day rather than on a raw UTC instant — §5.10.11 defect 11 records the two disagreeing near the UTC/Baghdad boundary as a live drift in the reference build.
To
string (date)
Last business day, inclusive. Absent means today's Baghdad business day.
GroupBy
LossSummaryGrouping
—
Shift
LedgerShift
Restrict to rows carrying this ledger shift tag. <br><b>A trap worth naming.</b>Panoptes.Domain.Enums.LedgerShift.All is <i>not</i> "every shift" — it is the ledger's own whole-day rollup tag, a distinct row of the unique key (FR-LCT-101). Filtering on it returns the day-level channels (capacity, PPV, delivery, receiving, standard PPV) and <b>excludes</b> the per-shift ones. Leave this null to see the whole day.
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/loss/summary" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Query parameters

Headers

Set credentials in the “Authorize” menu