Set item availability
Mark one item available or unavailable at one kitchen.
itemId/sku must resolve to an item whose brand your organization owns, and locationId must be one your organization owns or operates a brand out of. Anything that does not resolve is an HTTP error: 404 for an item or location that does not exist or is not yours (the two are indistinguishable, as on fetchLocationItems), 400 for a malformed request, 409 for an ambiguous sku. A failure is never reported inside a 200.
To change an item across many kitchens, discover the scope with fetchLocationItems / fetchStores and call this once per (item, location).
Safe to retry: this operation changes state but is idempotent.
Request
- locationIdstring
The location (kitchen) to change availability at. Required; absent is
400. Not yours, or not existing, is404. - itemIdstring
The item to change, by
ItemAvailability.itemId. Set exactly one ofitemId/sku: both or neither is400. An item whose brand your organization does not own is404. - skustring
The item to change, by SKU. This is the alternate key to
itemId; set exactly one of the two. SKUs are not unique: a SKU matching more than one of your items is409, and nothing is written. - availableboolean
The availability to set:
trueputs the item back in stock,falsemarks it unavailable at the location. Required; absent is400.
{
"locationId": "00000000-0000-0000-0000-000000000000",
"itemId": "00000000-0000-0000-0000-000000000000",
"sku": "<sku>",
"available": true
}Responses
Headers
- x-mealco-tx-idstringoptional
The correlation id for this call, returned on every response that an operation produces, successful or not. Quote it when you report a problem so that we can trace the request. You may send your own x-mealco-tx-id on the request and it is used as the id. It is optional in the schema because a request with a malformed JSON body is rejected before an id is assigned, so that one response carries neither this header nor the txId field of the error body.
- itemIdstring
Sous Chef's identifier for the item. It is brand-scoped and stable for that brand's catalogue across every location.
setItemAvailabilityaddresses items by it.The id space is the same whether or not
isModifieris set: a modifier option is addressed exactly like any other item. - skustring
Stock-keeping unit. Not unique. An alternate lookup key on
setItemAvailability. - namestring
The item's display name.
- isModifierboolean
truewhen this item is configured as a modifier option (e.g. a side or topping added to another item) rather than a standalone menu item. Availability works identically for both. - availableboolean
Current availability at the requested location.
{
"itemId": "00000000-0000-0000-0000-000000000000",
"sku": "<sku>",
"name": "<name>",
"isModifier": true,
"available": true
}About Item availability
Item availability: mark one item available or unavailable at one kitchen.
fetchLocationItems and setItemAvailability work as a pair: the write needs the discovery read, because Sous Chef's item ids cannot be known in advance.
There is no Idempotency-Key replay on this API: a retried setItemAvailability call re-applies the same value rather than de-duplicating.