This guide will be removed on April 29, 2022. Please use our new, easier-to-use Toast technical documentation site. All updated content is on the new site.

Using the Stock API

You can use the stock API to retrieve inventory information for menu items and for modifier options (via their underlying menu item references).

The stock API has the following endpoints:

  • /inventory gets inventory information for all menu items in a restaurant that have an inventory status of OUT_OF_STOCK or QUANTITY.

    An optional status query parameter lets you retrieve inventory information for menu items that have a specified inventory status of either OUT_OF_STOCK or QUANTITY.

  • /inventory/search retrieves inventory information for the menu items in a list that you provide in the request body. The returned inventory information for each menu item in the list will have an inventory status of OUT_OF_STOCK, QUANTITY, or IN_STOCK.

The inventory information for each menu item is returned in a MenuItemInventory object, which has the following properties:

  • guid: The GUID of the menu item.

  • itemGuidValidity: This value is only returned in the MenuItemInventory object when the /inventory/search endpoint is queried. It indicates whether the menu item GUID is valid or not. A menu item GUID is invalid if it does not exist or has been archived at the restaurant being queried. itemGuidValidity is set to VALID if the menu item GUID is valid or INVALID if the menu item GUID is invalid. If a menu item GUID is invalid, the status for that menu item is set to OUT_OF_STOCK.

  • status: The inventory status of the menu item. This value will be one of the following:

    • OUT_OF_STOCK: The menu item is not in stock in the restaurant.

    • QUANTITY: The menu item is in limited supply (1 or more items left).

    • IN_STOCK: The menu item is in stock in the restaurant.

  • quantity: The amount of stock remaining for the menu item. For menu items with an inventory status of QUANTITY, the quantity value will be a number that is greater than 0 (such as 0.5, 7.0, or 10.75). The quantity value will be null for menu items with a status of IN_STOCK or OUT_OF_STOCK.

For more information on how to change a menu item's inventory status from the Toast administration back-end, see Menu item inventory overview.

The following sections provide more information about retrieving inventory information for menu items.