REST Resource: categories
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
- 资源:类别
<ph type="x-smartling-placeholder">
- 方法
资源:类别
JSON 表示法 |
{
"displayName": string,
"categoryId": string,
"serviceTypes": [
{
object (ServiceType )
}
],
"moreHoursTypes": [
{
object (MoreHoursType )
}
]
} |
字段 |
displayName |
string
,了解所有最新动态。人类可读的类别名称。这是在读取位置信息时设置的。修改位置时,必须设置 categoryId 。 注意:此字段只能在响应中使用。请求中指定的任何值都会被忽略。
|
categoryId |
string
,了解所有最新动态。此类别的稳定 ID(由 Google 提供)。修改类别(创建或更新营业地点)时必须指定 categoryId 。 注意:此字段只能在响应中使用。请求中指定的任何值都会被忽略。
|
serviceTypes[] |
object (ServiceType )
,了解所有最新动态。适用于此业务类别的所有服务类型的列表。 注意:此字段只能在响应中使用。请求中指定的任何值都会被忽略。
|
moreHoursTypes[] |
object (MoreHoursType )
仅限输出。更多适用于此业务类别的营业时间类型。
|
ServiceType
JSON 表示法 |
{
"serviceTypeId": string,
"displayName": string
} |
字段 |
serviceTypeId |
string
仅限输出。此服务类型的稳定 ID(由 Google 提供)。
|
displayName |
string
仅限输出。人类可读的服务类型的显示名称。
|
MoreHoursType
除了正常营业时间外,商家可以提供的其他营业时间类型。
JSON 表示法 |
{
"hoursTypeId": string,
"displayName": string,
"localizedDisplayName": string
} |
字段 |
hoursTypeId |
string
仅限输出。Google 针对此营业时间类型提供的稳定 ID。
|
displayName |
string
仅限输出。营业时间类型的直观易懂的英文显示名。
|
localizedDisplayName |
string
仅限输出。简单易懂的营业时间类型的本地化显示名。
|
方法 |
|
返回所提供的语言和 GConcept ID 对应的业务类别列表。 |
|
返回业务类别列表。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003e\u003cstrong\u003eCategory\u003c/strong\u003e resource describes a business's type using a stable \u003ccode\u003ecategoryId\u003c/code\u003e and provides human-readable names (\u003ccode\u003edisplayName\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eEach \u003cstrong\u003eCategory\u003c/strong\u003e can optionally include \u003cstrong\u003eServiceType\u003c/strong\u003e and \u003cstrong\u003eMoreHoursType\u003c/strong\u003e information detailing the services offered and special hours.\u003c/p\u003e\n"],["\u003cp\u003e\u003cstrong\u003eServiceType\u003c/strong\u003e objects provide specific service details with unique IDs (\u003ccode\u003eserviceTypeId\u003c/code\u003e) and human-readable names (\u003ccode\u003edisplayName\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003e\u003cstrong\u003eMoreHoursType\u003c/strong\u003e objects specify additional hours beyond regular business hours using an ID (\u003ccode\u003ehoursTypeId\u003c/code\u003e) and localized display names.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access and utilize Category data using the \u003ccode\u003ebatchGet\u003c/code\u003e and \u003ccode\u003elist\u003c/code\u003e methods documented in the \u003cstrong\u003eMethods\u003c/strong\u003e section.\u003c/p\u003e\n"]]],[],null,["# REST Resource: categories\n\n- [Resource: Category](#Category)\n - [JSON representation](#Category.SCHEMA_REPRESENTATION)\n - [ServiceType](#Category.ServiceType)\n - [JSON representation](#Category.ServiceType.SCHEMA_REPRESENTATION)\n - [MoreHoursType](#Category.MoreHoursType)\n - [JSON representation](#Category.MoreHoursType.SCHEMA_REPRESENTATION)\n- [Methods](#METHODS_SUMMARY)\n\nResource: Category\n------------------\n\nA category describing what this business is (not what it does). For a list of valid category IDs, and the mappings to their human-readable names, see [categories.list](https://developers.google.com/my-business/reference/rest/v4/categories/list).\n\n| JSON representation ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"displayName\": string, \"categoryId\": string, \"serviceTypes\": [ { object (/my-business/reference/rest/v4/categories#Category.ServiceType) } ], \"moreHoursTypes\": [ { object (/my-business/reference/rest/v4/categories#Category.MoreHoursType) } ] } ``` |\n\n| Fields ||\n|--------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `displayName` | `string` . The human-readable name of the category. This is set when reading the location. When modifying the location, `categoryId` must be set. Note: This field is used in responses only. Any value specified here in a request is ignored. |\n| `categoryId` | `string` . A stable ID (provided by Google) for this category. The `categoryId` must be specified when modifying the category (when creating or updating a location). Note: This field is used in responses only. Any value specified here in a request is ignored. |\n| `serviceTypes[]` | `object (`[ServiceType](/my-business/reference/rest/v4/categories#Category.ServiceType)`)` . A list of all the service types that are available for this business category. Note: This field is used in responses only. Any value specified here in a request is ignored. |\n| `moreHoursTypes[]` | `object (`[MoreHoursType](/my-business/reference/rest/v4/categories#Category.MoreHoursType)`)` Output only. More hours types that are available for this business category. |\n\n### ServiceType\n\nA message describing a service type that the business offers.\n\n| JSON representation ||\n|------------------------------------------------------------|---|\n| ``` { \"serviceTypeId\": string, \"displayName\": string } ``` |\n\n| Fields ||\n|-----------------|-------------------------------------------------------------------------------|\n| `serviceTypeId` | `string` Output only. A stable ID (provided by Google) for this service type. |\n| `displayName` | `string` Output only. The human-readable display name for the service type. |\n\n### MoreHoursType\n\nMore hours types that a business can offers, in addition to its regular hours.\n\n| JSON representation ||\n|------------------------------------------------------------------------------------------|---|\n| ``` { \"hoursTypeId\": string, \"displayName\": string, \"localizedDisplayName\": string } ``` |\n\n| Fields ||\n|------------------------|-------------------------------------------------------------------------------------|\n| `hoursTypeId` | `string` Output only. A stable ID provided by Google for this hours type. |\n| `displayName` | `string` Output only. The human-readable English display name for the hours type. |\n| `localizedDisplayName` | `string` Output only. The human-readable localized display name for the hours type. |\n\n| Methods ------- ||\n|--------------------------------------------------------------------|-----------------------------------------------------------------------------------|\n| ### [batchGet](/my-business/reference/rest/v4/categories/batchGet) | Returns a list of business categories for the provided language and GConcept ids. |\n| ### [list](/my-business/reference/rest/v4/categories/list) | Returns a list of business categories. |"]]