Update Food Menus

When you have Food Menus added to your listing, customers know your restaurant’s menu choices and they can get additional information about the menu items.

To update the Food Menus of a listing, first call accounts.locations.getFoodMenus. The following is an example request:

GET
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/foodMenus

The response contains a JSON representation of the listing’s current FoodMenus. Modify the FoodMenus object as needed and call accounts.locations.updateFoodMenus. For more information, see Upload or replace Food Menus.

You can use the Google My Business API to update the following fields:

Fields
Name

Required

Name of the food item, such as Hamburger.

Price

Required

Price of the food item.

Price currency

Required

Currency of the food item price, such as U.S. dollar.

Item description

Optional

Brief description on the food item.

Menu sections

Optional

Logical groups of food items, such as Breakfast or Hamburger-Fries combo.

Nutrition

Optional (recommended)

Nutritional information, such as Total Fat=3g.

Number of people to serve

Optional

The number of people the food item can serve.

Portion size

Optional

Quantity of the food item. For example, 8-piece of nuggets.

Preparation methods

Optional

Specific methods that the food item can be prepared in.

Cuisines

Optional (recommended)

The specific cuisine of the food item.

Spiciness

Optional

Spiciness of the food item, such as none, mild, medium, and hot.

Allergen

Optional (recommended)

Food allergens in the food item, such as dairy, egg, fish, peanut, shellfish, soy, tree nut, and wheat.

Dietary

Optional (recommended)

Dietary restriction of the food item, such as halal, kosher, organic, vegan, vegetarian, and gluten free.

Options

Optional

The food option type, such as chicken Pad Thai versus veggie Pad Thai.

Food item photo

Optional

Photo of the specific food item.

Upload or replace Food Menus

Not all locations are eligible to upload Food Menus.

To determine a location's eligibility, call locations.get to check the Metadata. If canHaveFoodMenus is set to true, you're eligible to upload Food Menus.

If your location is eligible, perform a PATCH call to accounts.locations.updateFoodMenus.

The following is an example request that includes all optional fields:

PATCH
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/foodMenus

{
   "menus": [
       {
           "cuisines": [
                "AMERICAN"
            ],
           "labels": [
               {
                   "displayName": "Menu",
                   "description": "Main Menu of my Restaurant",
                   "languageCode": "en"
               }
           ],
           "sections": [
               {
                   "labels": {
                       "displayName": "Main Dishes",
                       "languageCode": "en"
                   },
                   "items": [
                       {
                           "labels": {
                               "displayName": "Dish1",
                               "description": "Dish1 - our original dish!",
                               "languageCode": "en"
                           },
                           "attributes": {
                               "price": {
                                   "currencyCode": "USD",
                                   "units": 20
                               },
                               "dietaryRestriction": "ORGANIC",
                               "nutritionFacts": {
                                   "calories": {
                                       "lowerAmount": 400,
                                       "upperAmount": 500,
                                       "unit": "CALORIE"
                                   },
                                   "totalFat": {
                                       "lowerAmount": 95,
                                       "upperAmount": 110,
                                       "unit": "GRAM"
                                   },
                                   "cholesterol": {
                                       "lowerAmount": 100,
                                       "upperAmount": 120,
                                       "unit": "MILLIGRAM"
                                   },
                                   "sodium": {
                                       "lowerAmount": 30,
                                       "upperAmount": 45,
                                       "unit": "MILLIGRAM"
                                   },
                                   "totalCarbohydrate": {
                                       "lowerAmount": 78,
                                       "upperAmount": 92,
                                       "unit": "MILLIGRAM"
                                   },
                                   "protein": {
                                       "lowerAmount": 25,
                                       "upperAmount": 35,
                                       "unit":"MILLIGRAM"
                                   }
                               },
                               "ingredients": [
                                   {
                                       "labels": [
                                           {
                                               "displayName": "Ingredient 1",
                                               "description": "Description for ingredient 1",
                                               "languageCode": "en"
                                           },
                                           {
                                               "displayName": "Ingredient 2",
                                               "languageCode": "en"
                                           }
                                       ]
                                   }
                               ],
                               "servesNumPeople": 1,
                               "preparationMethods": [
                                   "BAKED",
                                   "BOILED",
                                   "FRIED"
                               ],
                               "portionSize": {
                                   "quantity": 2,
                                   "unit": {
                                       "displayName": "Pieces",
                                       "languageCode": "en"
                                   }
                               },
                               "mediaKeys": [
                                   "AF1QipP_VOlJzXs2aOJ31234565cb2KPrvN"
                               ]
                           },
                           "options": [
                               {
                                   "labels":
                                       {
                                           "displayName": "Dish1 - spicy",
                                           "description": "Dish1 - a spicy version of our dish!",
                                           "languageCode": "en"
                                       },
                                   "attributes": {
                                       "price": {
                                           "currencyCode": "USD",
                                           "units": 20
                                       }
                                   }
                               },
                               {
                                   "labels":
                                       {
                                           "displayName": "Dish1 - mild",
                                           "description": "Dish1 - a mild spiciness version of our dish!",
                                           "languageCode": "en"
                                       },
                                   "attributes": {
                                       "price": {
                                           "currencyCode": "USD",
                                           "units": 20
                                       }
                                   }
                               }
                           ]
                       }
                   ]
               },
               {
                   "labels": {
                       "displayName": "Desserts",
                       "languageCode": "en"
                   },
                   "items": [
                       {
                           "labels": {
                               "displayName": "Ice Cream",
                               "description": "2 scoops of delicious ice cream!",
                               "languageCode": "en"
                           },
                           "attributes": {
                               "price": {
                                   "currencyCode": "USD",
                                   "units": 20
                               }
                           }
                       }
                   ]
               }
           ]
       }
   ]
}

Associate photos with a food item

To associate a photo with a food item, you must first upload the photo to your Business Profile location.

To retrieve the photos, call accounts.locations.media.list. The following is an example request:

GET
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}/media/

The response contains the MediaKey for each image on the listing, as shown in the following example:

{
 "mediaItems": [
   {
     "name": "accounts/{accountId}/locations/{locationId}/media/{mediaKey}",
     "mediaFormat": "PHOTO",
     "locationAssociation": {
       "category": "FOOD_AND_MENU"
     },
 …
}

To associate a photo with a food item, get the photo's mediaKey and provide it in the FoodMenuItemAttributes object. You can provide multiple mediaKeys. For more information, see Upload or replace Food Menus.