L'API
Google Business Performance propose une
NOUVELLE méthode qui permet d'extraire plusieurs `DailyMetrics` avec une seule requête API.
Consultez le
planning d'abandon et les instructions pour migrer de la méthode API reportInsights v4 à l'API Google Business Profile Performance.
Method: locations.updateAttributes
Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/07/25 (UTC).
[null,null,["Dernière mise à jour le 2025/07/25 (UTC)."],[[["\u003cp\u003eUpdate location attributes using a PATCH request to the specified endpoint.\u003c/p\u003e\n"],["\u003cp\u003eSpecify the location using the \u003ccode\u003eattributes.name\u003c/code\u003e path parameter and the attributes to update using the \u003ccode\u003eattributeMask\u003c/code\u003e query parameter.\u003c/p\u003e\n"],["\u003cp\u003eProvide the updated attribute values in the request body as an \u003ccode\u003eAttributes\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eA successful response returns the updated \u003ccode\u003eAttributes\u003c/code\u003e object.\u003c/p\u003e\n"],["\u003cp\u003eRequires the \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e OAuth scope for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: locations.updateAttributes\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n\nUpdate attributes for a given location.\n\n### HTTP request\n\n`PATCH https://mybusinessbusinessinformation.googleapis.com/v1/{attributes.name=locations/*/attributes}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|-------------------|------------------------------------------------------------------------------------------------------------|\n| `attributes.name` | `string` Required. Google identifier for this location in the form of `locations/{locationId}/attributes`. |\n\n### Query parameters\n\n| Parameters ||\n|-----------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `attributeMask` | `string (`[FieldMask](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.FieldMask)` format)` Required. Attribute name of attributes that you'd like to update. Represented by `attributes/{attribute}`. Updates: All attributes provided in the attributes field that you would like to update must be set in the `attributeMask`. Attributes set in the above list but not in the `attributeMask` will be ignored. Deletes: If you'd like to delete certain attributes, they must be specified in the `attributeMask` with no matching entry in the attributes list. If you'd like to delete all attributes set on a location, you should look up all the applicable attributes for the location and then add them to the `attributeMask` with an empty attributes field. This is a comma-separated list of fully qualified names of fields. Example: `\"user.displayName,photo\"`. |\n\n### Request body\n\nThe request body contains an instance of [Attributes](/my-business/reference/businessinformation/rest/v1/Attributes).\n\n### Response body\n\nIf successful, the response body contains an instance of [Attributes](/my-business/reference/businessinformation/rest/v1/Attributes).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/business.manage`\n\nFor more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2)."]]