REST Resource: categories
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.
Tài nguyên: Danh mục
Danh mục mô tả doanh nghiệp này là gì (không phải doanh nghiệp hoạt động ở đâu). Để xem danh sách mã danh mục hợp lệ và mối liên kết với tên của các danh mục đó, hãy truy cập vào categories.list.
Biểu diễn dưới dạng JSON |
{
"displayName": string,
"categoryId": string,
"serviceTypes": [
{
object (ServiceType )
}
],
"moreHoursTypes": [
{
object (MoreHoursType )
}
]
} |
Trường |
displayName |
string
của Google. Tên danh mục mà con người có thể đọc được. Tuỳ chọn này được đặt khi đọc vị trí. Khi sửa đổi vị trí, bạn phải đặt categoryId . Lưu ý: Trường này chỉ dùng trong câu trả lời. Mọi giá trị được chỉ định ở đây trong yêu cầu đều bị bỏ qua.
|
categoryId |
string
của Google. Mã ổn định (do Google cung cấp) cho danh mục này. Bạn phải chỉ định categoryId khi sửa đổi danh mục (khi tạo hoặc cập nhật vị trí). Lưu ý: Trường này chỉ dùng trong câu trả lời. Mọi giá trị được chỉ định ở đây trong yêu cầu đều bị bỏ qua.
|
serviceTypes[] |
object (ServiceType )
của Google. Danh sách tất cả các loại dịch vụ có sẵn cho danh mục kinh doanh này. Lưu ý: Trường này chỉ dùng trong câu trả lời. Mọi giá trị được chỉ định ở đây trong yêu cầu đều bị bỏ qua.
|
moreHoursTypes[] |
object (MoreHoursType )
Chỉ có đầu ra. Các loại giờ khác có sẵn cho danh mục kinh doanh này.
|
ServiceType
Thông báo mô tả loại dịch vụ mà doanh nghiệp cung cấp.
Biểu diễn dưới dạng JSON |
{
"serviceTypeId": string,
"displayName": string
} |
Trường |
serviceTypeId |
string
Chỉ có đầu ra. Mã ổn định (do Google cung cấp) cho loại dịch vụ này.
|
displayName |
string
Chỉ có đầu ra. Tên hiển thị mà con người có thể đọc được cho loại dịch vụ.
|
MoreHoursType
Ngoài giờ làm việc thông thường, doanh nghiệp có thể cung cấp các loại giờ khác.
Biểu diễn dưới dạng JSON |
{
"hoursTypeId": string,
"displayName": string,
"localizedDisplayName": string
} |
Trường |
hoursTypeId |
string
Chỉ có đầu ra. Mã ổn định do Google cung cấp cho loại giờ này.
|
displayName |
string
Chỉ có đầu ra. Tên hiển thị bằng tiếng Anh mà con người có thể đọc được cho loại giờ.
|
localizedDisplayName |
string
Chỉ có đầu ra. Tên hiển thị đã bản địa hoá mà con người có thể đọc được cho loại giờ.
|
Phương thức |
|
Trả về danh sách các danh mục kinh doanh bằng ngôn ngữ và mã GConcept được cung cấp. |
|
Trả về một danh sách các danh mục kinh doanh. |
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\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. |"]]