API Reference

Price Variance

6 endpoints· Auth: JWT or API Key
get/api/v1/console/purchase-invoices/loss-slices JWT API Key

Get loss-slices

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

Query parameters

BusinessDate
string (date)
The Baghdad business day to compute. Defaults to today.

Responses

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

One item's supplier price history

Date-ascending, with each line's change against the same supplier's previous purchase — comparing against the previous purchase from any supplier would report a switch between two vendors as a price rise. The per-supplier statistics use a quantity-weighted average, so a single small sample at a silly price cannot outweigh a tonne bought at the real one.

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

Query parameters

InventoryItemId
string (uuid)
The stockable whose price is being traced. Required.
SupplierId
string (uuid)
Narrow the timeline to one supplier. The per-supplier statistics still cover every supplier that appears in the returned window, so a filtered timeline is not a filtered comparison.
Limit
integer (int32)
How many of the most recent purchase lines to trace. Default 100, clamped 1 … 500.
Format
string
Export only: `pdf` draws the timeline as a PDF; anything else streams the CSV.
Lang
string
—
Digits
string
—

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/purchase-invoices/price-history" \
  -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/purchase-invoices/price-history/export JWT API Key

The `price_variance` and `receiving_short` rows for one business day.,,

Read from the daily control ledger. Posting a receipt rebuilds the day's `price_variance` slice and closing an order short or capturing a shortage rebuilds its `receiving_short` slice, each through the single ledger writer; this returns the rows those rebuilds persisted, which are the rows the owner's loss number counts (`ledgerPersisted: true`).

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

Query parameters

InventoryItemId
string (uuid)
The stockable whose price is being traced. Required.
SupplierId
string (uuid)
Narrow the timeline to one supplier. The per-supplier statistics still cover every supplier that appears in the returned window, so a filtered timeline is not a filtered comparison.
Limit
integer (int32)
How many of the most recent purchase lines to trace. Default 100, clamped 1 … 500.
Format
string
Export only: `pdf` draws the timeline as a PDF; anything else streams the CSV.
Lang
string
—
Digits
string
—

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/purchase-invoices/price-history/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/purchase-invoices/price-variance JWT API Key

Purchase price variance over a business-day window.,

Every line is scored against the contract when the line is PO-linked and against the item's live moving average otherwise, and each line is labelled with which. A line for which neither basis resolves is labelled `invoiced` — variance 0, but visibly unchecked rather than confidently clean.

The total overpaid figure is a sum of the leak and is never netted against favourable lines: an overcharge on Tuesday is not undone by a discount on Thursday.

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

Query parameters

From
string (date)
Inclusive first business day. Defaults to 29 days before Panoptes.Application.DTOs.Requests.Purchasing.PriceVarianceReportRequest.To.
To
string (date)
Inclusive last business day. Defaults to today's Baghdad day.
SupplierId
string (uuid)
Narrow to one supplier. Optional — the per-supplier cut is the one that exposes the "quietly buying from the expensive friend" pattern.
ThresholdPct
number (double)
Breach threshold in percent. Default 10 (B8), clamped 0 … 1000.
TopN
integer (int32)
How many top movers to report. Default 5 (B8), clamped 1 … 100.
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/purchase-invoices/price-variance" \
  -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/purchase-invoices/price-variance/export JWT API Key

Every scored line of the window as a file — `?format=csv`, else XLSX (C12)

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

Query parameters

From
string (date)
Inclusive first business day. Defaults to 29 days before Panoptes.Application.DTOs.Requests.Purchasing.PriceVarianceReportRequest.To.
To
string (date)
Inclusive last business day. Defaults to today's Baghdad day.
SupplierId
string (uuid)
Narrow to one supplier. Optional — the per-supplier cut is the one that exposes the "quietly buying from the expensive friend" pattern.
ThresholdPct
number (double)
Breach threshold in percent. Default 10 (B8), clamped 0 … 1000.
TopN
integer (int32)
How many top movers to report. Default 5 (B8), clamped 1 … 100.
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.
Format
string
—
Lang
string
—
Digits
string
—

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/purchase-invoices/price-variance/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/reports/price-variance JWT API Key

The same report at the route names for it

An alias, not a second implementation. It calls the same service method, so the two URLs cannot drift. The literal `price-variance` segment outranks the reporting controller's `{key}` parameter in attribute-route precedence, so this is a deterministic match rather than an ambiguity — and it is the URL a console built from the SRS will request.

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

Query parameters

From
string (date)
Inclusive first business day. Defaults to 29 days before Panoptes.Application.DTOs.Requests.Purchasing.PriceVarianceReportRequest.To.
To
string (date)
Inclusive last business day. Defaults to today's Baghdad day.
SupplierId
string (uuid)
Narrow to one supplier. Optional — the per-supplier cut is the one that exposes the "quietly buying from the expensive friend" pattern.
ThresholdPct
number (double)
Breach threshold in percent. Default 10 (B8), clamped 0 … 1000.
TopN
integer (int32)
How many top movers to report. Default 5 (B8), clamped 1 … 100.
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/reports/price-variance" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Query parameters

Headers

Set credentials in the “Authorize” menu