Google Business Performance API 的新 API 方法可通过单个 API 请求提取多个 `DailyMetrics`。 请查看弃用时间表和相关说明,并从 v4 reportInsights API 方法迁移至 Google Business Profile Performance API。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[[["\u003cp\u003eListing attributes provide additional business information like accessibility options and amenities, which are dynamic and vary by category and country.\u003c/p\u003e\n"],["\u003cp\u003eYou can retrieve a list of attributes for a specific category and country using the \u003ccode\u003eattributes.list\u003c/code\u003e endpoint with the \u003ccode\u003eregionCode\u003c/code\u003e, \u003ccode\u003elanguageCode\u003c/code\u003e, and \u003ccode\u003ecategoryName\u003c/code\u003e parameters.\u003c/p\u003e\n"],["\u003cp\u003eTo set or update listing attributes, use the \u003ccode\u003elocations.updateAttributes\u003c/code\u003e endpoint, specifying the attributes to modify in the \u003ccode\u003eattributeMask\u003c/code\u003e and providing the new values in the request body.\u003c/p\u003e\n"],["\u003cp\u003eWhen setting attributes, ensure they are supported by referencing the \u003ccode\u003eattributes.list\u003c/code\u003e endpoint to avoid errors.\u003c/p\u003e\n"]]],[],null,["# Add attributes\n\n\u003cbr /\u003e\n\n| **Note:** Attributes available to listings differ based on the category and country. They are dynamic and can change at any time.\n\nAttributes allow businesses to include additional information, such as accessibility options and amenities.\n| **Note:** To add or modify place action links, use the [Place Actions API](/my-business/reference/placeactions/rest), and for attributes specific to lodging, use the [Lodging API](/my-business/reference/lodging/rest).\n\nListing attributes\n------------------\n\nTo see a list of attributes for a primary category and country, request [`attributes.list`](/my-business/reference/businessinformation/rest/v1/attributes/list). Attributes are dynamic and should be retrieved often. See the example shown in the following section.\n\n### Request\n\nTo list attributes for a particular listing based on a listing's category, region code and language code, refer to the below sample request:\nHTTP \n\n```verilog\nGET https://mybusinessbusinessinformation.googleapis.com/v1/attributes?regionCode=US&languageCode=EN&categoryName=gcid:restaurant\n```\n\nTo list attributes for a particular listing using its location ID, refer to the below sample request:\nHTTP \n\n```text\nGET https://mybusinessbusinessinformation.googleapis.com/v1/attributes?parent=locations/{locationId}\n```\n\n### Response\n\nThe following partial response returns attributes with various [`AttributeValueType`](/my-business/reference/businessinformation/rest/v1/AttributeValueType) values. \n\n```carbon\n{\n {\n \"attributeId\": \"has_live_music\",\n \"valueType\": \"BOOL\",\n \"displayName\": \"Live music\",\n \"groupDisplayName\": \"Highlights\",\n \"valueMetadata\": [\n {\n \"value\": true,\n \"displayName\": \"Live music\"\n }\n ],\n \"displayStrings\": {\n \"uiText\": \"Live music\",\n \"standaloneText\": \"Has live music\",\n \"negativeText\": \"No live music\"\n }\n },\n {\n \"attributeId\": \"has_wheelchair_accessible_entrance\",\n \"valueType\": \"BOOL\",\n \"displayName\": \"Wheelchair accessible entrance\",\n \"groupDisplayName\": \"Accessibility\",\n \"valueMetadata\": [\n {\n \"value\": true,\n \"displayName\": \"Wheelchair accessible entrance\"\n },\n {\n \"value\": false,\n \"displayName\": \"No wheelchair accessible entrance\"\n }\n ],\n \"displayStrings\": {\n \"uiText\": \"Wheelchair accessible entrance\",\n \"standaloneText\": \"Has wheelchair accessible entrance\",\n \"negativeText\": \"No wheelchair accessible entrance\"\n }\n },\n {\n \"attributeId\": \"has_braille_menu\",\n \"valueType\": \"BOOL\",\n \"displayName\": \"Braille menu\",\n \"groupDisplayName\": \"Offerings\",\n \"valueMetadata\": [\n {\n \"value\": true,\n \"displayName\": \"Braille menu\"\n }\n ],\n \"displayStrings\": {\n \"uiText\": \"Braille menu\",\n \"standaloneText\": \"Has braille menu\",\n \"negativeText\": \"No braille menu\"\n }\n },\n {\n \"attributeId\": \"has_no_contact_delivery\",\n \"valueType\": \"BOOL\",\n \"displayName\": \"No-contact delivery\",\n \"groupDisplayName\": \"Offerings\",\n \"valueMetadata\": [\n {\n \"value\": true,\n \"displayName\": \"No-contact delivery\"\n }\n ],\n \"displayStrings\": {\n \"uiText\": \"No-contact delivery\",\n \"standaloneText\": \"Has no-contact delivery\",\n \"negativeText\": \"No no-contact delivery\"\n }\n },\n {\n \"attributeId\": \"welcomes_lgbtq\",\n \"valueType\": \"BOOL\",\n \"displayName\": \"LGBTQ friendly\",\n \"groupDisplayName\": \"Planning\",\n \"valueMetadata\": [\n {\n \"value\": true,\n \"displayName\": \"LGBTQ friendly\"\n }\n ],\n \"displayStrings\": {\n \"uiText\": \"LGBTQ friendly\",\n \"standaloneText\": \"LGBTQ friendly\",\n \"negativeText\": \"Not showing LGBT friendly\"\n }\n },\n {\n \"attributeId\": \"wi_fi\",\n \"valueType\": \"ENUM\",\n \"displayName\": \"Wi-Fi\",\n \"groupDisplayName\": \"Amenities\",\n \"valueMetadata\": [\n {\n \"value\": \"free_wi_fi\",\n \"displayName\": \"Free\"\n },\n {\n \"value\": \"paid_wi_fi\",\n \"displayName\": \"Paid\"\n }\n ],\n \"displayStrings\": {\n \"uiText\": \"Wi-Fi\",\n \"standaloneText\": \"Has Wi-Fi\",\n \"negativeText\": \"No Wi-Fi\"\n }\n },\n {\n \"attributeId\": \"pay_credit_card_types_accepted\",\n \"valueType\": \"REPEATED_ENUM\",\n \"displayName\": \"Credit cards\",\n \"groupDisplayName\": \"Payments\",\n \"isRepeatable\": true,\n \"valueMetadata\": [\n {\n \"value\": \"american_express\",\n \"displayName\": \"American Express\"\n },\n {\n \"value\": \"china_union_pay\",\n \"displayName\": \"China Union Pay\"\n },\n {\n \"value\": \"diners_club\",\n \"displayName\": \"Diners Club\"\n },\n {\n \"value\": \"discover\",\n \"displayName\": \"Discover\"\n },\n {\n \"value\": \"jcb\",\n \"displayName\": \"JCB\"\n },\n {\n \"value\": \"mastercard\",\n \"displayName\": \"MasterCard\"\n },\n {\n \"value\": \"visa\",\n \"displayName\": \"VISA\"\n }\n ],\n \"displayStrings\": {\n \"uiText\": \"Credit cards\",\n \"standaloneText\": \"Credit cards accepted\",\n \"negativeText\": \"Credit cards not accepted\"\n }\n }\n ]\n}\n```\n\nSet attributes for a listing\n----------------------------\n\n| **Note:** To add a menu url to a listing, first confirm that a listing has the following attribute supported - `attributes/url_menu using` [`attributes.list`](/my-business/reference/businessinformation/rest/v1/attributes/list) and then set the attribute for the listing using the below method.\n\nTo set attributes with\n[`locations.updateAttributes`](/my-business/reference/businessinformation/rest/v1/locations/updateAttributes),\nset the `attributeMask` parameter with the attributes you want to update.\n\nThe following example sets the accepted credit card types and delivery option attributes for a listing.\n| **Important:** Only use attributes supported in [`attributes.list`](/my-business/reference/businessinformation/rest/v1/attributes/list).\nHTTP \n\n```carbon\nPATCH\nhttps://mybusinessbusinessinformation.googleapis.com/v1/locations/\u003cvar translate=\"no\"\u003e{locationId}\u003c/var\u003e?attributeMask=pay_credit_card_types_accepted,has_no_contact_delivery\n{\n \"name\": \"locations/\u003cvar translate=\"no\"\u003e{locationId}\u003c/var\u003e/attributes\n \"attributes\": [\n {\n \"name\": \"has_no_contact_delivery\",\n \"values\": [ true ]\n },\n {\n \"name\": \"pay_credit_card_types_accepted\",\n \"repeatedEnumValue\": {\n \"setValues\": [\n \"american_express\",\n \"visa\"\n ]\n }\n }\n ]\n}\n```"]]