Method: accounts.locations.create
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eCreates a new Location within a specified account, owned by the logged-in user, using an HTTP POST request.\u003c/p\u003e\n"],["\u003cp\u003eThe request requires specifying the parent account in the path and can include optional query parameters for validation and request deduplication.\u003c/p\u003e\n"],["\u003cp\u003eThe request body should contain a Location object, and a successful response will return the newly created Location object.\u003c/p\u003e\n"],["\u003cp\u003eAuthorization requires the \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e OAuth scope for managing business information.\u003c/p\u003e\n"]]],["This content outlines creating a new location via a POST request to `https://mybusinessbusinessinformation.googleapis.com/v1/{parent=accounts/*}/locations`. The `parent` path parameter, representing the account name, is required. Optional query parameters include `validateOnly` (boolean) and `requestId` (string). The request and response bodies both utilize the `Location` resource. Successful creation returns a new `Location` instance. Authorization requires the `https://www.googleapis.com/auth/business.manage` OAuth scope.\n"],null,["# Method: accounts.locations.create\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\nCreates a new Location that will be owned by the logged in user.\n\n### HTTP request\n\n`POST https://mybusinessbusinessinformation.googleapis.com/v1/{parent=accounts/*}/locations`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------|\n| `parent` | `string` Required. The name of the account in which to create this location. |\n\n### Query parameters\n\n| Parameters ||\n|----------------|---------------------------------------------------------------------------------------------------------------------------------------------|\n| `validateOnly` | `boolean` Optional. If true, the request is validated without actually creating the location. |\n| `requestId` | `string` Optional. A unique request ID for the server to detect duplicated requests. We recommend using UUIDs. Max length is 50 characters. |\n\n### Request body\n\nThe request body contains an instance of [Location](/my-business/reference/businessinformation/rest/v1/accounts.locations#Location).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Location](/my-business/reference/businessinformation/rest/v1/accounts.locations#Location).\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)."]]