Step 2: Update an Existing List

Now that you’ve created a few Lists, let’s try updating the content of the first breakfast Menu you created. To update a Menu, you must make a Menus: Update request. The request body for this request will once again contain all the Menu data. In the example below, we will add an additional item to the “Pancakes” section.

Example Request:

Example Response:

{
  "id": "breakfast01",
  "name": "Breakfast",
  "title": "Breakfast Menu",
  "publish": true,
  "language": "en",
  "currency": "USD",
  "sections": [
    {
      "id": "breakfastSubsection01",
      "name": "Pancakes",
      "description": "Enjoy our delicious pancake offerings",
      "items": [
        {
          "id": "pancake01",
          "name": "Buttermilk Pancakes",
          "description": "Our delicious flaky, buttermilk pancakes",
          "photo": {
            "url": "https:\/\/image.shutterstock.com\/z\/stock-photo-high-stack-of-oatmeal-pancakes-the-rustic-style-with-copy-space-shallow-dof-540640885.jpg",
            "height": 150,
            "width": 150
          },
          "calories": {
            "type": "FIXED",
            "calorie": 200
          },
          "cost": {
            "type": "PRICE",
            "price": "3.00",
            "unit": "Each"
          }
        },
        {
          "id": "pancake02",
          "name": "Blueberry Pancakes",
          "description": "Our delicious flaky, blueberry pancakes",
          "calories": {
            "type": "FIXED",
            "calorie": 275
          },
          "cost": {
            "type": "PRICE",
            "price": "3.75",
            "unit": "Each"
          }
        }
      ]
    }
  ]
}

You should receive a 200 response with the following information in the response field:

{
  "id": "breakfast01",
  "accountId": accountId from URL,
  "name": "Breakfast",
  "title": "Breakfast Menu",
  "publish": true,
  "language": "en",
  "currency": "USD",
  "size": 2,
  "sections": [
    {
      "id": "breakfastSubsection01",
      "name": "Pancakes",
      "description": "Enjoy our delicious pancake offerings",
      "items": [
        {
          "id": "pancake01",
          "name": "Buttermilk Pancakes",
          "description": "Our delicious flaky, buttermilk pancakes",
          "photo": {
            "url": "https:\/\/image.shutterstock.com\/z\/stock-photo-high-stack-of-oatmeal-pancakes-the-rustic-style-with-copy-space-shallow-dof-540640885.jpg",
            "height": 150,
            "width": 150
          },
          "calories": {
            "type": "FIXED",
            "calorie": 200
          },
          "cost": {
            "type": "PRICE",
            "price": "3.00",
            "unit": "Each"
          }
        },
        {
          "id": "pancake02",
          "name": "Blueberry Pancakes",
          "description": "Our delicious flaky, blueberry pancakes",
          "calories": {
            "type": "FIXED",
            "calorie": 275
          },
          "cost": {
            "type": "PRICE",
            "price": "3.75",
            "unit": "Each"
          }
        }
      ]
    }
  ]
}
Feedback