Set menu item availability
biz_set_item_availabilityMarks one item on a business menu as sold out for today, or puts it back on. Anyone reading that menu afterwards sees the change, and an order for a sold-out item is refused. Needs a personal connector token (a shared token reads but changes nothing), business, soldOut, and the item as itemId from biz_menu or as itemName. Only a business the person is seated on as an owner or a manager can be changed, checked against live records on every call. An itemName is matched against that menu, and a name that fits more than one item is refused with the names it fits, because several items on one menu can share a word. It works in two steps: a call without confirm returns a preview of which item will change and what it will read as, plus a confirmToken, and changes nothing; a call with confirm true and that token makes the change. The token lasts two minutes, works once, and stops working if any argument changes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| itemId | No | The menu item id, as biz_menu returned it. An id matches exactly one item. | |
| confirm | No | Absent on the first call, which changes nothing. true, together with confirmToken, makes the change. | |
| soldOut | Yes | true to mark the item sold out for today, false to put it back on the menu. | |
| business | Yes | Which business, by name or by id, as biz_menu returned it. Only a business the person is seated on can be changed. | |
| itemName | No | The item by name, when no id is at hand. Matched against that menu; a name that fits more than one item is refused with the names it fits. | |
| requestId | No | An id for this change chosen by the caller, at least 8 characters. A repeat with the same id and the same arguments returns the first result without changing anything a second time. | |
| confirmToken | No | The token the first call returned. Needed when confirm is true. |