Google Business Performance API 的新 API 方法可通过单个 API 请求提取多个 `DailyMetrics`。 请查看弃用时间表和相关说明,并从 v4 reportInsights API 方法迁移至 Google Business Profile Performance API。
[null,null,["最后更新时间 (UTC):2025-08-29。"],[[["\u003cp\u003eBusinesses can add predefined and custom services to their Google Business Profile to showcase their offerings to customers.\u003c/p\u003e\n"],["\u003cp\u003eBusinesses must check the \u003ccode\u003ecanModifyServiceList\u003c/code\u003e metadata to confirm eligibility for adding services to their profile.\u003c/p\u003e\n"],["\u003cp\u003eGoogle provides structured and free-form service item formats to accommodate predefined and custom services, respectively.\u003c/p\u003e\n"],["\u003cp\u003eBusinesses can use APIs to discover predefined services by category name or ID and to manage existing services in their listing.\u003c/p\u003e\n"],["\u003cp\u003eUpdating services requires replacing the entire service list, with individual service updates not being supported.\u003c/p\u003e\n"]]],[],null,["# Add Services\n\n\u003cbr /\u003e\n\nBusinesses can add services they provide to their Business Profile listings. This could include services provided within a store or those offered at customer locations.\n| **Note:** Predefined services listed might differ based on the category and country. They are dynamic and can change at any time.\n\nEligibility and Format\n----------------------\n\nNot all businesses can add services to their Business Profile listing. To check the eligibilty, check the state of `canModifyServiceList` in [Metadata](/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.Metadata).\n\nA service is represented as a [ServiceItem](/my-business/reference/businessinformation/rest/v1/accounts.locations#serviceitem), which supports the following two formats:\n\n- [StructuredServiceItem](/my-business/reference/businessinformation/rest/v1/accounts.locations#structuredserviceitem): Google's predefined services can be represented as a `StructuredServiceItem`, which contains a `serviceTypeId`.\n- [FreeFormServiceItem](/my-business/reference/businessinformation/rest/v1/accounts.locations#freeformserviceitem): To offer custom services, use a `FreeFormServiceItem` which contains a [Label](/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.Label).\n\nListing predefined services by category name\n--------------------------------------------\n\nTo search for predefined services under a category by category name, use [categories.list](/my-business/reference/businessinformation/rest/v1/categories/list). A request for all categories that includes the name `salon` in Singapore is shown in the following Request section.\n\n### Request\n\nThe [CategoryView](https://developers.google.com/my-business/reference/businessinformation/rest/v1/CategoryView) must be set to `FULL`.\nHTTP \n\n```verilog\nGET https://mybusinessbusinessinformation.googleapis.com/v1/categories?regionCode=SG&languageCode=EN&filter=displayname=salon&view=FULL\n```\n\n### Response\n\nThe following partial response returns all supported [ServiceTypes](/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.ServiceType). \n\n```carbon\n{\n \"categories\": [\n {\n \"name\": \"gcid:hair_salon\",\n \"displayName\": \"Hairdresser\",\n \"serviceTypes\": [\n {\n \"serviceTypeId\": \"job_type_id:body_waxing\",\n \"displayName\": \"Body Waxing\"\n },\n {\n \"serviceTypeId\": \"job_type_id:hair_coloring\",\n \"displayName\": \"Hair coloring\"\n },\n {\n \"serviceTypeId\": \"job_type_id:hair_extensions\",\n \"displayName\": \"Hair extensions\"\n },\n {\n \"serviceTypeId\": \"job_type_id:hair_styling\",\n \"displayName\": \"Hair styling\"\n },\n {\n \"serviceTypeId\": \"job_type_id:manicures\",\n \"displayName\": \"Manicures\"\n },\n {\n \"serviceTypeId\": \"job_type_id:pedicures\",\n \"displayName\": \"Pedicures\"\n }\n ]\n }\n}\n```\n\nList predefined services by category ID\n---------------------------------------\n\nTo search for predefined services by specific category ID, use [categories.batchGet](/my-business/reference/businessinformation/rest/v1/categories/batchGet). A request for details under the category ID `gcid:electrician` in the United States is shown in the following Request section.\n\n### Request\n\nThe [CategoryView](https://developers.google.com/my-business/reference/businessinformation/rest/v1/CategoryView) must be set to `FULL`.\nHTTP \n\n```verilog\nGET https://mybusinessbusinessinformation.googleapis.com/v1/categories:batchGet?regionCode=US&languageCode=en&names=gcid:electrician&view=FULL\n```\n\n### Response\n\nThe response contains all supported [ServiceTypes](/my-business/reference/businessinformation/rest/v1/accounts.locations#Location.ServiceType) for `gcid:electrician`. \n\n```gdscript\n{\n \"categories\": [\n {\n \"name\": \"gcid:electrician\",\n \"displayName\": \"Electrician\",\n \"serviceTypes\": [\n {\n \"serviceTypeId\": \"job_type_id:construction\",\n \"displayName\": \"Construction\"\n },\n {\n \"serviceTypeId\": \"job_type_id:electric_car_charger\",\n \"displayName\": \"Install electric car charger\"\n },\n {\n \"serviceTypeId\": \"job_type_id:electrician_remodeling\",\n \"displayName\": \"Remodeling\"\n },\n {\n \"serviceTypeId\": \"job_type_id:general_repairs\",\n \"displayName\": \"General repairs\"\n },\n {\n \"serviceTypeId\": \"job_type_id:install_fan\",\n \"displayName\": \"Install fan\"\n },\n {\n \"serviceTypeId\": \"job_type_id:install_ground_wire\",\n \"displayName\": \"Install ground wire\"\n },\n {\n \"serviceTypeId\": \"job_type_id:install_light_fixtures\",\n \"displayName\": \"Install light fixtures\"\n },\n {\n \"serviceTypeId\": \"job_type_id:install_outdoor_lighting\",\n \"displayName\": \"Install outdoor lighting\"\n },\n {\n \"serviceTypeId\": \"job_type_id:install_outlets_switches\",\n \"displayName\": \"Install outlets or switches\"\n },\n {\n \"serviceTypeId\": \"job_type_id:install_security_system\",\n \"displayName\": \"Install security system\"\n },\n {\n \"serviceTypeId\": \"job_type_id:installation\",\n \"displayName\": \"Installation\"\n },\n {\n \"serviceTypeId\": \"job_type_id:relocate_outlets_switches\",\n \"displayName\": \"Relocate outlets or switches\"\n },\n {\n \"serviceTypeId\": \"job_type_id:repair_fan\",\n \"displayName\": \"Repair fan\"\n },\n {\n \"serviceTypeId\": \"job_type_id:repair_light_fixtures\",\n \"displayName\": \"Repair light fixtures\"\n },\n {\n \"serviceTypeId\": \"job_type_id:repair_outlets_switches\",\n \"displayName\": \"Repair outlets or switches\"\n },\n {\n \"serviceTypeId\": \"job_type_id:repair_panel\",\n \"displayName\": \"Repair panel\"\n },\n {\n \"serviceTypeId\": \"job_type_id:replace_upgrade_panel\",\n \"displayName\": \"Replace or upgrade panel\"\n },\n {\n \"serviceTypeId\": \"job_type_id:restore_power\",\n \"displayName\": \"Restore power\"\n }\n ]\n }\n ]\n}\n```\n\nList existing services in a listing\n-----------------------------------\n\nTo get a current list of services, use [locations.get](/my-business/reference/businessinformation/rest/v1/locations/get) and set`readMask=serviceItems`\n\n### Request\n\nHTTP \n\n```text\nGET https://mybusinessbusinessinformation.googleapis.com/v1/locations/{locationId}?readMask=serviceItems\n```\n\n### Response\n\nBelow is a sample response \n\n```carbon\n{\n \"serviceItems\": [\n {\n \"structuredServiceItem\": {\n \"serviceTypeId\": \"job_type_id:hair_coloring\"\n }\n },\n {\n \"isOffered\": true,\n \"structuredServiceItem\": {\n \"serviceTypeId\": \"job_type_id:hair_styling\"\n }\n },\n {\n \"isOffered\": true,\n \"freeFormServiceItem\": {\n \"categoryId\": \"gcid:barber_shop\",\n \"label\": {\n \"displayName\": \"Student Cuts\"\n }\n }\n }\n ]\n}\n```\n\nSet services for a listing\n--------------------------\n\nTo update services, use [locations.patch](/my-business/reference/businessinformation/rest/v1/locations/patch) and `updateMask=serviceItems`. Updating individual services is not supported.\n\nTo set services with a [StructuredServiceItem](/my-business/reference/businessinformation/rest/v1/accounts.locations#structuredserviceitem) and a [FreeFormServiceItem](/my-business/reference/businessinformation/rest/v1/accounts.locations#freeformserviceitem), see the following example:\n| **Important:** For StructuredServiceItems, use only services supported in [categories](/my-business/reference/businessinformation/rest/v1/categories).\nHTTP \n\n```carbon\nPATCH\nhttps://mybusinessbusinessinformation.googleapis.com/v1/locations/\u003cvar translate=\"no\"\u003e{locationId}\u003c/var\u003e?updateMask=serviceItems\n{\n \"serviceItems\":[\n {\n \"isOffered\":false,\n \"structuredServiceItem\":{\n \"serviceTypeId\":\"job_type_id:hair_coloring\"\n }\n },\n {\n \"isOffered\":true,\n \"structuredServiceItem\":{\n \"serviceTypeId\":\"job_type_id:hair_styling\"\n }\n },\n {\n \"isOffered\":true,\n \"freeFormServiceItem\":{\n \"categoryId\":\"gcid:hair_salon\",\n \"label\":{\n \"displayName\":\"Student Cuts\"\n }\n }\n }\n ]\n}\n```"]]