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.
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\u003eThis document outlines how to update a specified Google My Business account using the \u003ccode\u003eaccounts.patch\u003c/code\u003e method.\u003c/p\u003e\n"],["\u003cp\u003eOnly the \u003ccode\u003eaccountName\u003c/code\u003e field of an account is editable; other fields are ignored during updates.\u003c/p\u003e\n"],["\u003cp\u003eThe request should be a \u003ccode\u003ePUT\u003c/code\u003e request to the specified URL with the account name as a path parameter.\u003c/p\u003e\n"],["\u003cp\u003eYou can validate the request without updating the account by setting the \u003ccode\u003evalidateOnly\u003c/code\u003e query parameter to \u003ccode\u003etrue\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eplus.business.manage\u003c/code\u003e or \u003ccode\u003ebusiness.manage\u003c/code\u003e OAuth scopes are required for authorization.\u003c/p\u003e\n"]]],[],null,["# Method: accounts.update\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\n| Deprecated. Please use the [Account Management API](https://developers.google.com/my-business/reference/accountmanagement/rest/v1/accounts/patch) instead.\nUpdates the specified business account. Personal accounts cannot be updated using this method.\n| **Note:** The only editable field for an account is `accountName`. Any other fields passed in (such as `type` or `role`) are ignored.\n\n\u003cbr /\u003e\n\n### HTTP request\n\n`PUT https://mybusiness.googleapis.com/v4/{name=accounts/*}`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------|---------------------------------------------|\n| `name` | `string` The name of the account to update. |\n\n### Query parameters\n\n| Parameters ||\n|----------------|------------------------------------------------------------------------------------|\n| `validateOnly` | `boolean` If true, the request is validated without actually updating the account. |\n\n### Request body\n\nThe request body contains an instance of [Account](/my-business/reference/rest/v4/accounts#Account).\n\n### Response body\n\nIf successful, the response body contains an instance of [Account](/my-business/reference/rest/v4/accounts#Account).\n\n### Authorization Scopes\n\nRequires one of the following OAuth scopes:\n\n- `https://www.googleapis.com/auth/plus.business.manage`\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)."]]