API Reference
Cost Recalculation
2 endpoints· Auth: JWT or API Key
post
/api/v1/console/costing/recalculate JWT API KeyCreate recalculate
Recompute a scope of products — one product, every product drawing one inventory item (the price-change trigger), or the whole branch's menu.
Idempotent: a second call over unchanged inputs reports zero updates and writes no audit row, because nothing was mutated.
- Capability
edit_recipe- API key scope
cap:edit_recipe(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",
"reason": "string"
}| productId string (uuid) | Recompute this product only. A product outside the caller's branch reads as NOT_FOUND. |
| inventoryItemId string (uuid) | Recompute every product whose live `lineKind = ingredient` edges reference this item — the price-change trigger, driven by whatever moved the item's average. |
| reason string | Why the recompute was asked for. Carried onto the audit row, because "the cost of forty dishes changed at 02:14" is only answerable if the cause travelled with it. |
Responses
200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/costing/recalculate" \
-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",
"reason": "string"
}' Try itagainst staging · https://staging-api.panoptesos.com
Request body (JSON)
Headers
Set credentials in the “Authorize” menu
post
/api/v1/console/costing/recalculate/products/{productId} JWT API KeyRecompute one product's cached cost — the recipe-change trigger
A product outside the caller's branch reads as `NOT_FOUND`.
- Capability
edit_recipe- API key scope
cap:edit_recipe(the key's owner must also hold the capability)
Path parameters
| productIdrequired string (uuid) | — |
Query parameters
| reason string | — |
Responses
200Success
cURL
curl -X POST "https://staging-api.panoptesos.com/api/v1/console/costing/recalculate/products/{productId}" \
-H "X-Api-Key: <YOUR_API_KEY>" Try itagainst staging · https://staging-api.panoptesos.com
Path parameters
Query parameters
Headers
Set credentials in the “Authorize” menu