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.

Getting menu information from the configuration API

Important

The menus API has replaced the configuration API as the preferred mechanism for retrieving menu data for a restaurant. It is described in the Getting Menu Information from the Menus API section. This section remains for customers who have not yet transitioned to using the menus API for menu data retrieval.

This section explains how to use the Toast configuration API to get menu information for a restaurant.

The menu resources available from the configuration API provide JSON representations of the menu components for your restaurant. The JSON information includes the Toast GUIDs for menu components. You can use these GUIDs to submit pricing queries to the orders API.

Menu Resources in the Configuration API

  • /menus

  • /menus/{guid}

  • /menuGroups

  • /menuGroups/{guid}

  • /menuItems

  • /menuOptionGroups

  • /menuOptionGroups/{guid}

  • /preModifiers

  • /preModifiers/{guid}

  • /preModifierGroups

  • /preModifierGroups/{guid}

In a Toast Menu, each MenuGroup has a list of MenuItems in its items value. Each MenuItem may also have one or more MenuOptionGroups in its optionGroups value, which in turn contains further MenuItems that are modifiers for the primary item. See more information about the data objects that represent menu components in MenuItems, MenuGroups, MenuOptionGroups, and Menus.

The following example shows the JSON representations of a menu, composed from configuration API return data. You can get the JSON representations of each component from the menu resources of the configuration API. See information about composing a menu from menu resource return data in Working with the Toast menu hierarchy.

JSON Menu Composed from Configuration API Return Data

[
  {
    "entityType":"Menu",
    "name":"Lunch Menu",
    "guid":"a2a0b78a-a480-4adb-bbac-b32a7e0c2a12",
    "groups":[
      {
        "entityType":"MenuGroup",
        "name":"A Twist-On-Fries",
        "guid":"578c5e48-7d99-438f-be61-f4f972569ce6",
        "subgroups":[],
        "items":[
          {
            "entityType":"MenuItem",
            "name":"'Award Winning' Curly-Q Fries",
            "guid":"f21f2250-6f97-4a31-8a78-3283a5be0af4",
            "optionGroups":[
              {
                "entityType":"MenuOptionGroup",
                "name":"Size",
                "guid":"f63f8bd3-9764-4b1b-b3c9-40c8c104b42b",
                "items":[
                  {
                    "entityType":"MenuItem",
                    "name":"Half Basket",
                    "guid":"3c043245-3b4f-4e87-a6c9-6eeeb073518a",
                    "optionGroups":[]
                  },
                  {
                    "entityType":"MenuItem",
                    "name":"Full Basket",
                    "guid":"68343381-290b-4410-9b8a-c8d63d9c9e1a",
                    "optionGroups":[]
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
]

The following example shows a curl command that places an order for 'Award Winning' Curly-Q Fries with Full Basket modifier with the curl command and order JSON shown in the following example.

Submitting an Order Selection with a Modifier

curl -X POST \
-H "Content-Type: application/json" \
-H "Toast-Restaurant-External-ID: 93d6a5ce-395f-42ca-aa9d-d12a66a3b781" \
-H "Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJhdWQiOlsidG9hc3QiXSwic2
NvcGUiOlsiY2FyZHMiLCJjY3Byb2Nlc3NpbmciLCJkZXZpY2VzIiwic3ZjbWdtdCIsInVzZXJ
tZ210Il0sImV4cCI6MTQ2NDI4ODAwNCwianRpIjoiZWU0ODMyNzYtZmNmZC00ZmM5LThhZjAt
YTE5YzVhNzBmNzg5IiwiY2xpZW50X2lkIjoidG9hc3R3ZWIifQ.WzS6hcLrfXtcsmwXq2u0Ou
CmXBZoBRY0wVk__gNpg8TnV94zEnpB77BkBlVPqKk8YM9_ZOC1MDt4atZVAM_ImiEbtugTF9z
6YPROhhtDYx37BaDNrViUggvhY5PplZND_nSNSgA8nu6CARBIoTcfoWzSg0jj1yR8mUk2edFc
TzU" \
-d '{
    "entityType": "Order",
    "diningOption": {
      "guid": "a8512bcf-fde7-446e-ac31-7c342d4aaaff",
      "entityType": "DiningOption"
    },
    "checks": [
      {
        "entityType": "Check",
        "selections": [
          {
            "entityType": "MenuItemSelection",
            "itemGroup": {
              "guid": "578c5e48-7d99-438f-be61-f4f972569ce6",
              "entityType": "MenuGroup"
            },
            "item": {
              "guid": "f21f2250-6f97-4a31-8a78-3283a5be0af4",
              "entityType": "MenuItem"
            },
            "quantity": 1,
            "modifiers": [{
                "entityType": "MenuItemSelection",
                "optionGroup": {
                  "guid": "f63f8bd3-9764-4b1b-b3c9-40c8c104b42b",
                  "entityType": "MenuOptionGroup"
                },
                "item": {
                  "guid": "68343381-290b-4410-9b8a-c8d63d9c9e1a",
                  "entityType": "MenuItem"
                },
                "quantity": 1,
                "modifiers": []
              }
            ]
          }
        ]
      }
    ]
  }' "https://[toast-api-hostname]/orders/v2/orders"