Perhatian: Postingan yang terkait dengan COVID-19 sekarang diizinkan sementara untuk jaringan gerai. Selain itu, Google Bisnisku saat ini beroperasi dengan fungsi terbatas. Pelajari perubahan produk sementara lebih lanjut.

Menambahkan atribut

Atribut memungkinkan bisnis menyertakan informasi tambahan, seperti opsi aksesibilitas dan menempatkan link tindakan.

Screenshot berikut adalah contoh bagaimana atribut ditampilkan di Google Penelusuran. Opsi Makan di Tempat, Bawa Pulang, dan Pesan-antar adalah atribut. Atribut lainnya mencakup link pesanan dan menu.

Menguji Tempatkan Link Tindakan

Atribut listingan

Untuk melihat daftar atribut untuk kategori dan negara utama, minta attributes.list. Atribut bersifat dinamis dan harus sering diambil. Lihat contoh yang ditampilkan di bagian berikut.

Permintaan

HTTP
GET https://mybusiness.googleapis.com/v4/attributes?country=US&languageCode=EN&categoryId=gcid:restaurant

Respons

Respons parsial berikut menampilkan atribut dengan berbagai nilai AttributeValueType.

{
    {
      "attributeId": "has_live_music",
      "valueType": "BOOL",
      "displayName": "Live music",
      "groupDisplayName": "Highlights",
      "valueMetadata": [
        {
          "value": true,
          "displayName": "Live music"
        }
      ],
      "displayStrings": {
        "uiText": "Live music",
        "standaloneText": "Has live music",
        "negativeText": "No live music"
      }
    },
    {
      "attributeId": "has_wheelchair_accessible_entrance",
      "valueType": "BOOL",
      "displayName": "Wheelchair accessible entrance",
      "groupDisplayName": "Accessibility",
      "valueMetadata": [
        {
          "value": true,
          "displayName": "Wheelchair accessible entrance"
        },
        {
          "value": false,
          "displayName": "No wheelchair accessible entrance"
        }
      ],
      "displayStrings": {
        "uiText": "Wheelchair accessible entrance",
        "standaloneText": "Has wheelchair accessible entrance",
        "negativeText": "No wheelchair accessible entrance"
      }
    },
    {
      "attributeId": "has_braille_menu",
      "valueType": "BOOL",
      "displayName": "Braille menu",
      "groupDisplayName": "Offerings",
      "valueMetadata": [
        {
          "value": true,
          "displayName": "Braille menu"
        }
      ],
      "displayStrings": {
        "uiText": "Braille menu",
        "standaloneText": "Has braille menu",
        "negativeText": "No braille menu"
      }
    },
    {
      "attributeId": "has_no_contact_delivery",
      "valueType": "BOOL",
      "displayName": "No-contact delivery",
      "groupDisplayName": "Offerings",
      "valueMetadata": [
        {
          "value": true,
          "displayName": "No-contact delivery"
        }
      ],
      "displayStrings": {
        "uiText": "No-contact delivery",
        "standaloneText": "Has no-contact delivery",
        "negativeText": "No no-contact delivery"
      }
    },
    {
      "attributeId": "welcomes_lgbtq",
      "valueType": "BOOL",
      "displayName": "LGBTQ friendly",
      "groupDisplayName": "Planning",
      "valueMetadata": [
        {
          "value": true,
          "displayName": "LGBTQ friendly"
        }
      ],
      "displayStrings": {
        "uiText": "LGBTQ friendly",
        "standaloneText": "LGBTQ friendly",
        "negativeText": "Not showing LGBT friendly"
      }
    },
    {
      "attributeId": "wi_fi",
      "valueType": "ENUM",
      "displayName": "Wi-Fi",
      "groupDisplayName": "Amenities",
      "valueMetadata": [
        {
          "value": "free_wi_fi",
          "displayName": "Free"
        },
        {
          "value": "paid_wi_fi",
          "displayName": "Paid"
        }
      ],
      "displayStrings": {
        "uiText": "Wi-Fi",
        "standaloneText": "Has Wi-Fi",
        "negativeText": "No Wi-Fi"
      }
    },
    {
      "attributeId": "pay_credit_card_types_accepted",
      "valueType": "REPEATED_ENUM",
      "displayName": "Credit cards",
      "groupDisplayName": "Payments",
      "isRepeatable": true,
      "valueMetadata": [
        {
          "value": "american_express",
          "displayName": "American Express"
        },
        {
          "value": "china_union_pay",
          "displayName": "China Union Pay"
        },
        {
          "value": "diners_club",
          "displayName": "Diners Club"
        },
        {
          "value": "discover",
          "displayName": "Discover"
        },
        {
          "value": "jcb",
          "displayName": "JCB"
        },
        {
          "value": "mastercard",
          "displayName": "MasterCard"
        },
        {
          "value": "visa",
          "displayName": "VISA"
        }
      ],
      "displayStrings": {
        "uiText": "Credit cards",
        "standaloneText": "Credit cards accepted",
        "negativeText": "Credit cards not accepted"
      }
    },
    {
      "attributeId": "url_menu",
      "valueType": "URL",
      "displayName": "Menu link",
      "groupDisplayName": "Place page URLs",
      "displayStrings": {
        "uiText": "Menu link",
        "standaloneText": "Menu link",
        "negativeText": "No online menu"
      }
    },
    {
      "attributeId": "url_reservations",
      "valueType": "URL",
      "displayName": "Reservations links",
      "groupDisplayName": "Place page URLs",
      "displayStrings": {
        "uiText": "Reservations links",
        "standaloneText": "Reservations links",
        "negativeText": "Table booking not available"
      }
    }
  ]
}

Menetapkan atribut untuk listingan

Untuk menetapkan atribut dengan accounts.location.patch, tambahkan parameter kueri dengan updateMask=attributes dan tetapkan parameter 'attributeMask'' dengan atribut yang ingin Anda perbarui. Atribut yang ada di attributeMask diabaikan jika tidak ada di lokasi. Untuk memperbarui semua atribut, biarkan attributeMask kosong.

Contoh berikut menetapkan atribusi opsi pesan-antar dan link reservasi untuk listingan.

HTTP
PATCH
https://mybusiness.googleapis.com/v4/accounts/{accountId}/locations/{locationId}?updateMask=attributes&attributeMask=url_reservations,has_no_contact_delivery
{
  "attributes": [
        {
            "attributeId": "has_no_contact_delivery",
            "values": [ true ]
        },
        {
            "attributeId": "url_reservations",
            "urlValues": [
                {
                    "url": "www.abcreservations.com"
                }
            ]
        }
    ]
}