Method: categories.batchGet
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
返回所提供的语言和 GConcept ID 对应的业务类别列表。
HTTP 请求
GET https://mybusiness.googleapis.com/v4/categories:batchGet
网址采用 gRPC 转码语法。
查询参数
参数 |
languageCode |
string
必需。返回类别名称时应使用的 BCP 47 语言代码。
|
categoryIds[] |
string
必需。必须至少设置一个名称。应返回已本地化的类别名称的 GConcept ID。
|
regionCode |
string
可选。用于推断非标准语言的 ISO 3166-1 alpha-2 国家/地区代码。
|
view |
enum (CategoryView )
必需。指定应在响应中返回类别资源的哪些部分。
|
响应正文
如果成功,响应正文将包含结构如下的数据:
BusinessCategories.BatchGetBusinessCategories 的响应消息。
JSON 表示法 |
{
"categories": [
{
object (Category )
}
]
} |
字段 |
categories[] |
object (Category )
与请求中提供的 GConcept ID 相匹配的类别。它们的顺序与请求中类别 ID 的顺序不同。
|
授权范围
需要以下 OAuth 范围之一:
https://www.googleapis.com/auth/plus.business.manage
https://www.googleapis.com/auth/business.manage
如需了解详情,请参阅 OAuth 2.0 概览。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eReturns localized business category names for specified GConcept IDs and language.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing GConcept IDs and language code as query parameters in a GET request.\u003c/p\u003e\n"],["\u003cp\u003eResponse includes a list of categories matching the provided GConcept IDs.\u003c/p\u003e\n"],["\u003cp\u003eRequires \u003ccode\u003ehttps://www.googleapis.com/auth/plus.business.manage\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/business.manage\u003c/code\u003e scope for authorization.\u003c/p\u003e\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.BatchGetBusinessCategoriesResponse.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://mybusiness.googleapis.com/v4/categories:batchGet`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|-----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `languageCode` | `string` Required. The BCP 47 code of language that the category names should be returned in. |\n| `categoryIds[]` | `string` Required. At least one name must be set. The GConcept ids the localized category names should be returned for. |\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/rest/v4/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\nIf successful, the response body contains data with the following structure:\nResponse message for BusinessCategories.BatchGetBusinessCategories.\n\n| JSON representation ||\n|-----------------------------------------------------------------------------------------------|---|\n| ``` { \"categories\": [ { object (/my-business/reference/rest/v4/categories#Category) } ] } ``` |\n\n| Fields ||\n|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `categories[]` | `object (`[Category](/my-business/reference/rest/v4/categories#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 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)."]]