הוספת שירותים

בעלי עסקים יכולים להוסיף את השירותים שהם מספקים לדפים העסקיים שלהם ב'פרופיל העסק ב-Google'. למשל, שירותים המסופקים בתוך חנות או שירותים המוצעים במיקום של לקוחות.

דרישות הסף ופורמט

לא כל העסקים יכולים להוסיף שירותים לדף העסקי שלהם ב'פרופיל העסק ב-Google'. כדי לבדוק את ההתאמה, צריך לבדוק את המצב של canModifyServiceList במטא-נתונים.

שירות מיוצג כ-ServiceItem, התומך בשני הפורמטים הבאים:

  • StructuredServiceItem: ניתן לייצג את השירותים המוגדרים מראש של Google כ-StructuredServiceItem, שמכיל serviceTypeId.
  • FreeFormServiceItem: כדי להציע שירותים מותאמים אישית, צריך להשתמש ב-FreeFormServiceItem שמכיל תווית.

רישום שירותים מוגדרים מראש לפי שם קטגוריה

כדי לחפש שירותים מוגדרים מראש בקטגוריה לפי שם קטגוריה, משתמשים בכתובת categories.list. בקשה לכל הקטגוריות שכוללות את השם salon בסינגפור מוצגת בקטע 'בקשה' הבא.

בקשה

הערך של CategoryView צריך להיות מוגדר ל-FULL.

HTTP
GET https://mybusinessbusinessinformation.googleapis.com/v1/categories?regionCode=SG&languageCode=EN&filter=displayname=salon&view=FULL

תשובה

התגובה החלקית הבאה מחזירה את כל סוגי ה-ServiceTypes הנתמכים.

{
    "categories": [
        {
            "name": "gcid:hair_salon",
            "displayName": "Hairdresser",
            "serviceTypes": [
                {
                    "serviceTypeId": "job_type_id:body_waxing",
                    "displayName": "Body Waxing"
                },
                {
                    "serviceTypeId": "job_type_id:hair_coloring",
                    "displayName": "Hair coloring"
                },
                {
                    "serviceTypeId": "job_type_id:hair_extensions",
                    "displayName": "Hair extensions"
                },
                {
                    "serviceTypeId": "job_type_id:hair_styling",
                    "displayName": "Hair styling"
                },
                {
                    "serviceTypeId": "job_type_id:manicures",
                    "displayName": "Manicures"
                },
                {
                    "serviceTypeId": "job_type_id:pedicures",
                    "displayName": "Pedicures"
                }
            ]
        }
}

רשימה של שירותים מוגדרים מראש לפי מזהה קטגוריה

כדי לחפש שירותים מוגדרים מראש לפי מזהה קטגוריה ספציפי, משתמשים בכתובת categories.batchGet. בקשה לקבלת פרטים תחת מזהה הקטגוריה gcid:electrician בארצות הברית מוצגת בקטע הבקשה הבא.

בקשה

הערך של CategoryView צריך להיות מוגדר ל-FULL.

HTTP
GET https://mybusinessbusinessinformation.googleapis.com/v1/categories:batchGet?regionCode=US&languageCode=en&names=gcid:electrician&view=FULL

תשובה

התגובה מכילה את כל ServiceTypes הנתמכים עבור gcid:electrician.

{
    "categories": [
        {
            "name": "gcid:electrician",
            "displayName": "Electrician",
            "serviceTypes": [
                {
                    "serviceTypeId": "job_type_id:construction",
                    "displayName": "Construction"
                },
                {
                    "serviceTypeId": "job_type_id:electric_car_charger",
                    "displayName": "Install electric car charger"
                },
                {
                    "serviceTypeId": "job_type_id:electrician_remodeling",
                    "displayName": "Remodeling"
                },
                {
                    "serviceTypeId": "job_type_id:general_repairs",
                    "displayName": "General repairs"
                },
                {
                    "serviceTypeId": "job_type_id:install_fan",
                    "displayName": "Install fan"
                },
                {
                    "serviceTypeId": "job_type_id:install_ground_wire",
                    "displayName": "Install ground wire"
                },
                {
                    "serviceTypeId": "job_type_id:install_light_fixtures",
                    "displayName": "Install light fixtures"
                },
                {
                    "serviceTypeId": "job_type_id:install_outdoor_lighting",
                    "displayName": "Install outdoor lighting"
                },
                {
                    "serviceTypeId": "job_type_id:install_outlets_switches",
                    "displayName": "Install outlets or switches"
                },
                {
                    "serviceTypeId": "job_type_id:install_security_system",
                    "displayName": "Install security system"
                },
                {
                    "serviceTypeId": "job_type_id:installation",
                    "displayName": "Installation"
                },
                {
                    "serviceTypeId": "job_type_id:relocate_outlets_switches",
                    "displayName": "Relocate outlets or switches"
                },
                {
                    "serviceTypeId": "job_type_id:repair_fan",
                    "displayName": "Repair fan"
                },
                {
                    "serviceTypeId": "job_type_id:repair_light_fixtures",
                    "displayName": "Repair light fixtures"
                },
                {
                    "serviceTypeId": "job_type_id:repair_outlets_switches",
                    "displayName": "Repair outlets or switches"
                },
                {
                    "serviceTypeId": "job_type_id:repair_panel",
                    "displayName": "Repair panel"
                },
                {
                    "serviceTypeId": "job_type_id:replace_upgrade_panel",
                    "displayName": "Replace or upgrade panel"
                },
                {
                    "serviceTypeId": "job_type_id:restore_power",
                    "displayName": "Restore power"
                }
            ]
        }
    ]
}

רישום שירותים קיימים בדף עסקי

כדי לקבל רשימת שירותים עדכנית, צריך להשתמש ב-locations.get ולהגדירreadMask=serviceItems

בקשה

HTTP
GET https://mybusinessbusinessinformation.googleapis.com/v1/locations/{locationId}?readMask=serviceItems

תשובה

בהמשך מופיעה דוגמה לתשובה

{
    "serviceItems": [
        {
            "structuredServiceItem": {
                "serviceTypeId": "job_type_id:hair_coloring"
            }
        },
        {
            "isOffered": true,
            "structuredServiceItem": {
                "serviceTypeId": "job_type_id:hair_styling"
            }
        },
        {
            "isOffered": true,
            "freeFormServiceItem": {
                "categoryId": "gcid:barber_shop",
                "label": {
                    "displayName": "Student Cuts"
                }
            }
        }
    ]
}

הגדרת שירותים של רישום

כדי לעדכן את השירותים, משתמשים ב-locations.patch וב-updateMask=serviceItems. אין תמיכה בעדכון של שירותים נפרדים.

כדי להגדיר שירותים עם StructuredServiceItem ו-FreeFormServiceItem, עיין בדוגמה הבאה:

HTTP
PATCH
https://mybusinessbusinessinformation.googleapis.com/v1/locations/{locationId}?updateMask=serviceItems
{
   "serviceItems":[
      {
         "isOffered":false,
         "structuredServiceItem":{
            "serviceTypeId":"job_type_id:hair_coloring"
         }
      },
      {
         "isOffered":true,
         "structuredServiceItem":{
            "serviceTypeId":"job_type_id:hair_styling"
         }
      },
      {
         "isOffered":true,
         "freeFormServiceItem":{
            "categoryId":"gcid:hair_salon",
            "label":{
               "displayName":"Student Cuts"
            }
         }
      }
   ]
}