API Reference

Consumable BOM

3 endpoints· Auth: JWT or API Key
get/api/v1/console/products/{productId}/consumables JWT API Key

Get consumables

The product's consumable and packaging edges, priced against the `takeaway` reference channel.,,.

Capability (any)
view_profitoredit_recipe
API key scope
cap:view_profitorcap:edit_recipe (the key's owner must also hold the capability)

Path parameters

productIdrequired
string (uuid)
—

Responses

200Success
cURL
curl -X GET "https://staging-api.panoptesos.com/api/v1/console/products/{productId}/consumables" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Headers

Set credentials in the “Authorize” menu
post/api/v1/console/products/{productId}/consumables JWT API Key

Attach a consumable or packaging edge.,,

The API scope `write:catalog` maps to `edit_recipe`, so an API credential can never do more here than an Owner could. Effective permission is scope AND capability.

Capability
edit_recipe
API key scope
cap:edit_recipe (the key's owner must also hold the capability)
Public scope
write:catalog

Path parameters

productIdrequired
string (uuid)
—

Request body

application/json
{
  "inventoryItemId": "00000000-0000-0000-0000-000000000000",
  "qtyPerParentUnit": 0,
  "unit": "string",
  "channelScope": "string",
  "required": false,
  "kind": "string",
  "sortOrder": 0
}
inventoryItemId
string (uuid)
The warehouse item consumed. Must belong to the caller's branch.
qtyPerParentUnit
number (double)
Units of the child consumed per one unit of the product, `numeric(18,6)`, strictly positive. <br>A `decimal`, never a `double`: a binary float cannot represent 0.1 kg, and a portion wrong in the sixth decimal is wrong on every plate ever costed.
unit
string
The unit Panoptes.Application.DTOs.Requests.Catalog.AddProductConsumableRequest.QtyPerParentUnit is expressed in. Null defaults to the item's own stock unit (FR-CAT-026). <br>Only two units are ever legal for an item — the one it is stocked in and the finer one it may be consumed in — and FR-CAT-100 requires the conversion back to the stock unit to <b>fail</b> rather than guess. A unit that will not convert is refused here, not silently costed as zero.
channelScope
string
`all` | `dine_in` | `takeaway`. Anything else is coerced to `all` (FR-CAT-026). <br>Coercion and not rejection is the specified behaviour, and it is the right one: a menu template applied across branches carries scopes a release may not know yet, and the conservative reading — "this applies everywhere" — never under-deducts. FR-CAT-027 turns the scope into the sale-time test: `dine_in` applies only to a dine-in channel, `takeaway` applies to every non-dine-in channel.
required
boolean
Whether a sale is blocked when this line is short or unconvertible (FR-CAT-028). <br>Defaults to <b>true</b>, which is the safe direction: a required consumable that is missing stops the sale, and a non-required one is silently skipped. Defaulting to false would let a takeaway box quietly not be deducted, and the loss would surface a month later as an unexplained variance.
kind
string
The path the caller believes they are on: `consumable` (the default) or `packaging`. <br><b>It is a check, not the classification.</b> FR-CAT-029 classifies "purely by the linked inventory item's `category = "packaging"`", and the service stamps the edge from the item. Declaring `packaging` for an item that is not one is refused with "That item is not a packaging item."; declaring `consumable` for an item that <i>is</i> packaging still stores `lineKind = packaging`, because the classification is the item's and not the caller's. Without this field the packaging screen would have no way to be told it picked the wrong item.
sortOrder
integer (int32)
Display order on the product's consumables panel. Ties break on the item name.

Responses

200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/products/{productId}/consumables" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: <YOUR_API_KEY>" \
  -d '{
  "inventoryItemId": "00000000-0000-0000-0000-000000000000",
  "qtyPerParentUnit": 0,
  "unit": "string",
  "channelScope": "string",
  "required": false,
  "kind": "string",
  "sortOrder": 0
}'
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Request body (JSON)

Headers

Set credentials in the “Authorize” menu
delete/api/v1/console/products/{productId}/consumables/{bomLineId} JWT API Key

Tombstone an edge and stamp `supersededAt`

Never a hard delete: `BomLine` is effective-dated, and re-costing an order from last week has to resolve the edges that were in force that day.

Capability
edit_recipe
API key scope
cap:edit_recipe (the key's owner must also hold the capability)
Public scope
write:catalog

Path parameters

productIdrequired
string (uuid)
—
bomLineIdrequired
string (uuid)
—

Responses

200Success
cURL
curl -X DELETE "https://staging-api.panoptesos.com/api/v1/console/products/{productId}/consumables/{bomLineId}" \
  -H "X-Api-Key: <YOUR_API_KEY>"
Try itagainst staging · https://staging-api.panoptesos.com

Path parameters

Headers

Set credentials in the “Authorize” menu