API Reference

Loss Capture

4 endpoints· Auth: JWT or API Key
get/api/v1/console/production/portion-checks JWT API Key

The branch's portion-check log, newest business day first

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

Query parameters

From
string (date)
Inclusive business-day floor.
To
string (date)
Inclusive business-day ceiling.
ProductId
string (uuid)
Narrow to one menu item.
InventoryItemId
string (uuid)
Narrow to one tracked ingredient.
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/production/portion-checks" \
  -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/production/portion-checks JWT API Key

Record a measured portion against its recipe spec.,,

A read-time capture: it mutates no stock and rebuilds no ledger slice. A spec of zero or below is refused — it would make every measurement an infinite over-portion.

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

Request body

application/json
{
  "productId": "00000000-0000-0000-0000-000000000000",
  "inventoryItemId": "00000000-0000-0000-0000-000000000000",
  "specQty": 0,
  "measuredQty": 0,
  "sampleSize": 0,
  "evidenceSourceId": "00000000-0000-0000-0000-000000000000",
  "businessDate": "2026-11-27"
}
productId
string (uuid)
The menu item whose portion was measured. Must belong to the caller's branch.
inventoryItemId
string (uuid)
The tracked ingredient measured. Must belong to the caller's branch.
specQty
number (double)
The recipe spec portion per unit. <b>Strictly positive</b> (FR-PRD-083): a spec of zero makes every measurement an infinite over-portion, which would price the whole day's sales of that product into the loss number.
measuredQty
number (double)
The measured actual portion per unit — a sample average, never a single scoop.
sampleSize
integer (int32)
How many portions the average was taken over. At least 1 (FR-PRD-099).
evidenceSourceId
string (uuid)
Optional link to the photograph or camera record backing the measurement (FR-PRD-099). It is checked branch-scoped: an evidence row from another branch reads as `NOT_FOUND`.
businessDate
string (date)
Defaults to today's Baghdad business day. A locked day is refused, not redated.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/production/portion-checks" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "productId": "00000000-0000-0000-0000-000000000000",
  "inventoryItemId": "00000000-0000-0000-0000-000000000000",
  "specQty": 0,
  "measuredQty": 0,
  "sampleSize": 0,
  "evidenceSourceId": "00000000-0000-0000-0000-000000000000",
  "businessDate": "2026-11-27"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
get/api/v1/console/production/staff-meals JWT API Key

The branch's staff-meal log, newest business day first

Filterable by business-day range, book and item — the drill an owner follows from an AvT line that says "12 kg unexplained" to the four meals that explain nine of them.

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

Query parameters

From
string (date)
Inclusive business-day floor. Null means "no floor".
To
string (date)
Inclusive business-day ceiling. Null means "no ceiling".
Location
StockBook
Narrow to one book. The two are never blended, so this is a real filter and not a cosmetic one.
InventoryItemId
string (uuid)
Narrow to one ingredient — the drill from an AvT line.
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/production/staff-meals" \
  -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/production/staff-meals JWT API Key

Log a staff or family meal.,,

Writes only a `StaffMealEvent` — never a stock movement — so the quantity is netted out of the unexplained bucket exactly once, and rebuilds the inventory ledger slice for the meal's own shift so an already-approved count's persisted shortage drops immediately instead of waiting for the next recount. A locked business day is `PERIOD_LOCKED`.

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

Request body

application/json
{
  "inventoryItemId": "00000000-0000-0000-0000-000000000000",
  "location": "Warehouse",
  "shift": "Morning",
  "qty": 0,
  "reason": "string",
  "businessDate": "2026-11-27"
}
inventoryItemId
string (uuid)
The tracked ingredient consumed. Must belong to the caller's branch.
location
StockBook
—
shift
OperatingShift
—
qty
number (double)
Strictly positive, in the item's stock unit. `numeric(18,6)` on the row.
reason
string
Family meal, tasting, staff comp. Free text, optional, bounded by the validator.
businessDate
string (date)
Defaults to today's Baghdad business day. A locked day is refused, not redated.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/production/staff-meals" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "inventoryItemId": "00000000-0000-0000-0000-000000000000",
  "location": "Warehouse",
  "shift": "Morning",
  "qty": 0,
  "reason": "string",
  "businessDate": "2026-11-27"
}'
Try itagainst staging · https://staging-api.panoptesos.com

Request body (JSON)

Headers

Set credentials in the “Authorize” menu