Method: categories.batchGet
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-07-25 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[[["\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)."]]