API docs
Sous Chef Management API
Request access

Set item availability

POST/management/item-availability/setItemAvailability

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

application/json
required
  • locationIdstring

    The location (kitchen) to change availability at. Required; absent is 400. Not yours, or not existing, is 404.

  • itemIdstring

    The item to change, by ItemAvailability.itemId. Set exactly one of itemId / sku: both or neither is 400. An item whose brand your organization does not own is 404.

  • 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 is 409, and nothing is written.

  • availableboolean

    The availability to set: true puts the item back in stock, false marks it unavailable at the location. Required; absent is 400.

Responses

200: The item's resulting availability at the location.

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. setItemAvailability addresses items by it.

    The id space is the same whether or not isModifier is 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

    true when 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.

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.