Aggiungere dati strutturati relativi alle offerte

I listini prezzi consentono alle attività di condividere facilmente tutto ciò che hanno da offrire direttamente sulla Ricerca Google e su Maps. Puoi creare listini prezzi utilizzando i dati di offerta strutturati, che ti consentono di aggiungere dati aziendali alla tua scheda. Dai menù ai servizi offerti, fai vedere ai clienti che cosa offri prima che varchino la soglia.

Di seguito è riportato un esempio di dati strutturati del menu nella Ricerca Google:

Menù da McDonald's.

Puoi aggiungere dati strutturati al menu, ad esempio un menu di piatti, a una sede utilizzando l'oggetto PriceList.

La seguente richiesta JSON mostra come pubblicare un menu per la colazione in una posizione. La risposta contiene un'istanza dell'oggetto Location aggiornato.

HTTP
PATCH
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}?updateMask=priceLists
 {
  "priceLists": [
    {
      "priceListId": "Breakfast",
      "labels": [
        {
          "displayName": "Breakfast",
          "description": "Tasty Google Breakfast",
          "languageCode": "en"
        }
      ],
      "sourceUrl": "http://www.google.com/todays_menu",
      "sections": [
        {
          "sectionId": "entree_menu",
          "sectionType":"FOOD",
          "labels": [
            {
              "displayName": "Entrées",
              "description": "Breakfast Entrées",
              "languageCode": "en"
            }
          ],
          "items": [
            {
              "itemId": "scramble",
              "labels": [
                {
                  "displayName": "Big Scramble",
                  "description": "A delicious scramble filled with Potatoes, Eggs, 
                  Bell Peppers, and Sausage",
                  "languageCode": "en"
                }
              ],
              "price": {
                "currencyCode": "USD",
                "units": "12",
                "nanos": "200000000"
              }
            },
            {
              "itemId": "steak_omelette",
              "labels": [
                {
                  "displayName": "Steak Omelette",
                  "description": "Three egg omelette with grilled prime rib, 
                   fire-roasted bell peppers and onions, saut\u00e9ed mushrooms
                   and melted Swiss cheese",
                  "languageCode": "en"
                }
              ],
              "price": {
                "currencyCode": "USD",
                "units": "15",
                "nanos": "750000000"
              }
            }
          ]
        }
      ]
    }
  ]
}

Dati di servizio

Se la tua attività offre diverse opzioni di servizi, puoi aggiungere dati di servizi strutturati a una località utilizzando l'oggetto PriceList.

La seguente richiesta JSON mostra come pubblicare un'offerta di servizi in una località. La risposta contiene un'istanza dell'oggetto Location aggiornato.

HTTP
PATCH
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}?updateMask=priceLists
 {
  "priceLists": [
    {
      "priceListId": "Oil Change",
      "labels": [
        {
          "displayName": "Oil Change",
          "description": "Caseys Qwik Oil Change",
          "languageCode": "en"
        }
      ],
      "sourceUrl": "http://www.google.com/todays_services",
      "sections": [
        {
          "sectionId": "oil_services",
          "sectionType":”SERVICES”,
          "labels": [
            {
              "displayName": "Services",
              "description": "Oil Changes",
              "languageCode": "en"
            }
          ],
          "items": [
            {
              "itemId": "20-minute-oil-change",
              "labels": [
                {
                  "displayName": "20 Minute Oil Change",
                  "description": "Quick oil change and filter service.",
                  "languageCode": "en"
                }
              ],
              "price": {
                "currencyCode": "USD",
                "units": "30",
                "nanos": "200000000"
              }
            },
            {
              "itemId": "full_service_oil_change",
              "labels": [
                {
                  "displayName": "Full Service Oil Change",
                  "description": "Quick oil change, filter service, and brake inspection.",
                  "languageCode": "en"
                }
              ],
              "price": {
                "currencyCode": "USD",
                "units": "45",
                "nanos": "750000000"
              }
            }
          ]
        }
      ]
    }
  ]
}