Method: categories.batchGet
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThis document explains how to use the \u003ccode\u003ecategories:batchGet\u003c/code\u003e endpoint to retrieve business categories.\u003c/p\u003e\n"],["\u003cp\u003eYou'll need to provide GConcept IDs and a language code as query parameters.\u003c/p\u003e\n"],["\u003cp\u003eThe response will include localized category names and other category details based on the specified \u003ccode\u003eview\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ecategories:batchGet\u003c/code\u003e endpoint requires authorization with the \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e scope.\u003c/p\u003e\n"]]],["This content describes how to retrieve business categories using a `GET` request to `https://mybusinessbusinessinformation.googleapis.com/v1/categories:batchGet`. Required query parameters include `names[]` (GConcept IDs), `languageCode` (BCP 47 code), and `view` (CategoryView enum). `regionCode` is an optional parameter. The request body is empty. The response body contains a JSON object with an array of `categories`, matching the requested GConcept IDs, under the authorization scope `https://www.googleapis.com/auth/business.manage`.\n"],null,["# Method: categories.batchGet\n\n- [HTTP request](#body.HTTP_TEMPLATE)\n- [Query parameters](#body.QUERY_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n - [JSON representation](#body.BatchGetCategoriesResponse.SCHEMA_REPRESENTATION)\n- [Authorization scopes](#body.aspect)\n\nReturns a list of business categories for the provided language and GConcept ids.\n\n### HTTP request\n\n`GET https://mybusinessbusinessinformation.googleapis.com/v1/categories:batchGet`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `names[]` | `string` Required. At least one name must be set. The GConcept ids the localized category names should be returned for. To return details for more than one category, repeat this parameter in the request. |\n| `languageCode` | `string` Required. The BCP 47 code of language that the category names should be returned in. |\n| `regionCode` | `string` Optional. The ISO 3166-1 alpha-2 country code used to infer non-standard language. |\n| `view` | `enum (`[CategoryView](/my-business/reference/businessinformation/rest/v1/CategoryView)`)` Required. Specifies which parts to the Category resource should be returned in the response. |\n\n### Request body\n\nThe request body must be empty.\n\n### Response body\n\nResponse message for BusinessCategories.BatchGetBusinessCategories.\n\nIf successful, the response body contains data with the following structure:\n\n| JSON representation |\n|------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"categories\": [ { object (/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.Category) } ] } ``` |\n\n| Fields ||\n|----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `categories[]` | `object (`[Category](/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.Category)`)` Categories that match the GConcept ids provided in the request. They will not come in the same order as category ids in the request. |\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)."]]