API Reference
Batch Capacity
/api/v1/console/production/batches/{id}/outputs JWT API KeyDeposit a stocked output produced by the batch into the kitchen book
Gated on `create_batch`, which borrows deliberately: there is no `manage_production` capability in the closed 70-capability catalogue, and depositing what a run produced is part of running it.
- Capability
create_batch- API key scope
cap:create_batch(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Request body
{
"inventoryItemId": "00000000-0000-0000-0000-000000000000",
"outputQty": 0,
"shareIqd": 0,
"allocationWeight": 0,
"expiresAt": "2026-11-27T14:05:12.020Z"
}| inventoryItemId string (uuid) | The stocked node the deposit lands on — an `InventoryItem` of this branch. Resolved with a compound branch predicate, so an item of another branch reads as `NOT_FOUND`. |
| outputQty number (double) | The quantity produced, in the item's stock unit. `numeric(18,6)` and strictly positive — a non-positive output is refused at the boundary and again in the service (FR-PRD-067). |
| shareIqd integer (int64) | The run cost allocated to this output, in base-currency minor units. Zero is legal (a by-product carrying no cost); negative is not. |
| allocationWeight integer (int32) | The output's weight in a multi-output allocation, defaulting to 1 (FR-PRD-067). It is recorded here for the run-cost allocator's benefit; it does not re-derive Panoptes.Application.DTOs.Requests.Production.RecordProductionOutputRequest.ShareIqd, which arrives already allocated. |
| expiresAt string (date-time) | Shelf life, as an instant (FR-PRD-068). It rides onto the deposited `StockLot`, so a later kitchen draw takes the earliest-expiring layer first. Null deposits an undated lot, which FEFO orders <b>last</b>. |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/production/batches/{id}/outputs" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"inventoryItemId": "00000000-0000-0000-0000-000000000000",
"outputQty": 0,
"shareIqd": 0,
"allocationWeight": 0,
"expiresAt": "2026-11-27T14:05:12.019Z"
}'Path parameters
Request body (JSON)
Headers
/api/v1/console/production/batches/{id}/outputs/{outputId} JWT API KeyReverse a stocked output., and the reversal records as owed
A tombstone plus the compensating stock draw, with a mandatory reason. Gated on `edit_batch` rather than the `create_batch` the deposit borrows: depositing belongs to whoever cooked the run, unwinding a booked stock movement is a correction, and keeps corrections with the Owner and the Admin.
- Capability
edit_batch- API key scope
cap:edit_batch(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
| outputIdrequired string (uuid) | — |
Request body
{
"reason": "string"
}| reason string | — |
Responses
curl -X DELETE "https://staging-api.panoptesos.com/api/v1/console/production/batches/{id}/outputs/{outputId}" \
-H "X-Api-Key: <YOUR_API_KEY>"Path parameters
Headers
/api/v1/console/production/batches/{id}/waste JWT API KeyRecord capacity waste or an end-of-day leftover against one pool
This is the route that closes `record_waste` — one of the capabilities the catalogue declared and nothing exercised — and, with it, the second input to the owner's daily loss board: `DailyControlLedgerWriter.FromCapacityAsync` has always reduced `BatchCapacity.wastedUnits` into the day's `capacity_pool` row, and until now nothing anywhere wrote that counter.
It is a `POST` and not a `PUT` on purpose: each capture is an event that increments a counter, not a statement of what the counter should be. A client that could set the total could unset it.
- Capability
record_waste- API key scope
cap:record_waste(the key's owner must also hold the capability)
Path parameters
| idrequired string (uuid) | — |
Request body
{
"capacityTypeId": "00000000-0000-0000-0000-000000000000",
"units": 0,
"kind": "string",
"reason": "string"
}| capacityTypeId string (uuid) | The pool this happened to. A `capacity_type` row id, branch-scoped reference data (FR-PRD-114) — never the legacy `CHICKEN_QUARTER` string, because the next customer sells kebab. |
| units integer (int32) | Whole units. A pool is a countable thing — plates, not kilograms — so this is an `int` and at least 1 (FR-PRD-055). |
| kind string | `waste` | `leftover` (FR-PRD-054). Both land in the <b>same</b> counter: they are two names for capacity that was cooked and never sold. The word is kept because it is the only place the kitchen's own account of what happened survives. |
| reason string | Required, free text (FR-PRD-054). An unreasoned write-off of a day's cooked portions is indistinguishable from a cover-up, and this string is what the audit row carries. |
Responses
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/production/batches/{id}/waste" \
-H "Content-Type: application/json" \
-H "X-Api-Key: <YOUR_API_KEY>" \
-d '{
"capacityTypeId": "00000000-0000-0000-0000-000000000000",
"units": 0,
"kind": "string",
"reason": "string"
}'Path parameters
Request body (JSON)
Headers