סקירה כללית של Merchant promotion API

כדאי להשתמש במבצעים כדי להציג מבצעים מיוחדים על מוצרים שאתם מוכרים ב-Google. המבצעים מוצגים במוצרים שונים של Google, כולל חיפוש Google, שופינג ו-Chrome.

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

מידע נוסף זמין במאמר מידע בסיסי על מבצעים.

דרישות מוקדמות

עליכם לספק ל-Google מידע ספציפי על העסק והמוצרים שלכם לפני הצגת המבצעים. אתם צריכים:

בנוסף, אתם צריכים לרשום את חשבון המוכר שלכם לתוכנית המבצעים. אם אתם לא בטוחים שכבר נרשמתם, כדאי לעיין ב-Merchant Center.

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

מידע נוסף מופיע בקריטריונים ומדיניות להשתתפות.

יצירת מקור נתונים

משתמשים ב-API datasource.create כדי ליצור פיד מבצעים. אם יש פיד מבצעים קיים, משתמשים ב-datasource.get כדי לאחזר את הקוד datasource.name

צורת הבקשה היא:

POST https://merchantapi.googleapis.com/promotions/v1beta/accounts/{account}/dataSources/{datasource}

דוגמה

בדוגמה אפשר לראות בקשה ותגובה אופייניים.

בקשה:

POST https://merchantapi.googleapis.com/datasources/v1beta/accounts/123/dataSources {"displayName": "test api feed", "promotionDataSource":{"targetCountry":"US", "contentLanguage":"en"}}

תשובה:

{
  "name": "accounts/123/dataSources/1000000573361824",
  "dataSourceId": "1000000573361824",
  "displayName": "test api feed",
  "promotionDataSource": {
    "targetCountry": "US",
    "contentLanguage": "en"
  },
  "input": "API"
}

קידומי מכירות

אפשר להשתמש ב-method accounts.promotions.insert כדי ליצור או לעדכן מבצע. ה-method accounts.promotions.insert משתמשת במשאב promotions ובשם של מקור נתונים כקלט. הוא יחזיר את המבצע החדש או המעודכן אם הוא יסתיים בהצלחה.

כדי ליצור מבצע צריך להיכנס אל datasource.name.

Google בודקת ומאשרת את המבצעים שלכם לפני ההפצה שלהם. מידע נוסף זמין במאמר תהליך האישור של המבצעים.

צורת הבקשה:

POST https://merchantapi.googleapis.com/promotions/v1beta/{parent=accounts/*/}promotions:insert

כדאי לעיין בדוגמאות הבאות לקידומי מכירות לדוגמה.

דוגמה 1: קידום מקומי שרלוונטי לכל המוצרים ולכל החנויות

POST https://merchantapi.googleapis.com/promotions/v1beta/accounts/123/promotions:insert

{
  "promotion": {
    "promotionId": "buy_2_get_10_off",
    "contentLanguage": "en",
    "targetCountry": "US",
    "redemptionChannel": [
      "IN_STORE"
    ],
    "attributes": {
      "longTitle": "Buy 2 and get 10$ OFF purchase",
      "productApplicability": "ALL_PRODUCTS",
      "offerType": "NO_CODE",
      "couponValueType": "BUY_M_GET_MONEY_OFF",
      "promotionDisplayTimePeriod": {
        "startTime": "2024-2-06T00:47:44Z",
        "endTime": "2024-5-06T00:47:44Z"
      },
      "promotionEffectiveTimePeriod": {
        "startTime": "2024-2-06T00:47:44Z",
        "endTime": "2024-5-06T00:47:44Z"
      },
      "moneyOffAmount": {
        "amountMicros": "1000000",
        "currencyCode": "USD"
      },
      "minimum_purchase_quantity": 2,
      "storeApplicability": "ALL_STORES",
      "promotionUrl": "http://promotionnew4url.com/",
      "promotionDestinations": [
        "LOCAL_INVENTORY_ADS"
      ],
    }
  },
  "dataSource": "accounts/123/dataSources/1000000573361824"
}

דוגמה 2: מבצע באינטרנט שחל על מוצרים נבחרים עם קוד מימוש

POST https://merchantapi.googleapis.com/promotions/v1beta/accounts/123/promotions:insert

{
 "promotion": {
   "promotionId": "25_pct_off",
   "contentLanguage": "en",
   "targetCountry": "US",
   "redemptionChannel": [
     "ONLINE"
   ],
   "attributes": {
     "longTitle": "10% off on selected items",
     "productApplicability": "SPECIFIC_PRODUCTS",
     "offerType": "GENERIC_CODE",
     "genericRedemptionCode": "SPRINGSALE",
     "couponValueType": "PERCENT_OFF",
     "promotionDisplayTimePeriod": {
       "startTime": "2024-2-06T00:47:44Z",
       "endTime": "2024-5-06T00:47:44Z"
     },
     "promotionEffectiveTimePeriod": {
       "startTime": "2024-2-06T00:47:44Z",
       "endTime": "2024-5-06T00:47:44Z"
     },
     "percentOff": 25,
     "promotionDestinations": [
       "FREE_LISTINGS"
     ],
     "itemIdInclusion": [
       "1499860100",
       "1499860101",
       "1499860102",
       "1499860103",
       "1499860104"
     ],
   }
 },
 "dataSource": "accounts/123/dataSources/1000000573361824"
}

הערות מיוחדות

אחרי שיוצרים את המבצע, יכול להיות שיעברו כמה דקות עד ליצירת המבצע.

במאמר הוספת מאפיינים של נתונים מובְנים תוכלו למצוא רשימה של מאפיינים שקשורים למבצעים.

לפני שיוצרים ומנהלים מבצעים, כדאי לעיין במאמר שיטות מומלצות למבצעים.

להצגת נתוני המבצעים

כדי לצפות במבצע: accounts.promotions.get. קבלת הפריט הזה היא לקריאה בלבד. כדי להשתמש בו צריך להזין את merchantId ואת המזהה של המבצע. השיטה get מחזירה את משאב המבצעים המתאים.

למשל:

GET https://merchantapi.googleapis.com/promotions/v1beta/{name=accounts/*/promotions/*}

עיון בדוגמאות האלה.

דוגמה 1: קידום מקומי

GET https://merchantapi.googleapis.com/promotions/v1beta/accounts/123/promotions/in_store~en~US~buy_2_get_10_off

{
 "name": "accounts/123/promotions/in_store~en~US~buy_2_get_10_off",
 "promotionId": "buy_2_get_10_off",
 "contentLanguage": "en",
 "targetCountry": "US",
 "redemptionChannel": [
   "IN_STORE"
 ],
 "attributes": {
   "longTitle": "Buy 2 and get 10$ OFF purchase",
   "productApplicability": "ALL_PRODUCTS",
   "offerType": "NO_CODE",
   "couponValueType": "BUY_M_GET_MONEY_OFF",
   "promotionDisplayTimePeriod": {
     "startTime": "2024-2-06T00:47:44Z",
     "endTime": "2024-5-06T00:47:44Z"
   },
   "promotionEffectiveTimePeriod": {
     "startTime": "2024-2-06T00:47:44Z",
     "endTime": "2024-5-06T00:47:44Z"
   },
   "moneyOffAmount": {
     "amountMicros": "1000000",
     "currencyCode": "USD"
   },
   "minimum_purchase_quantity": 2,
   "storeApplicability": "ALL_STORES",
   "promotionUrl": "http://promotionnew4url.com/",
   "promotionDestinations": [
     "LOCAL_INVENTORY_ADS"
   ],
 }
 "dataSource": "accounts/123/dataSources/1000000573361824"
}

דוגמה 2. קידום מכירות אונליין

GET https://merchantapi.googleapis.com/promotions/v1beta/accounts/123/promotions/online~en~US~25_pct_off
{
 "name": "accounts/123/promotions/online~en~US~25_pct_off",
 "promotionId": "25_pct_off",
 "contentLanguage": "en",
 "targetCountry": "US",
 "redemptionChannel": [
   "ONLINE"
 ],
 "attributes": {
   "longTitle": "10% off on selected items",
   "productApplicability": "SPECIFIC_PRODUCTS",
   "offerType": "GENERIC_CODE",
   "genericRedemptionCode": "WINTERGIFT",
   "couponValueType": "PERCENT_OFF",
   "promotionDisplayTimePeriod": {
     "startTime": "2024-2-06T00:47:44Z",
     "endTime": "2024-5-06T00:47:44Z"
   },
   "promotionEffectiveTimePeriod": {
     "startTime": "2024-2-06T00:47:44Z",
     "endTime": "2024-5-06T00:47:44Z"
   },
   "percentOff": 25,
   "promotionDestinations": [
     "FREE_LISTINGS"
   ],
   "itemIdInclusion": [
     "1499860100",
     "1499860101",
     "1499860102",
     "1499860103",
     "1499860104"
   ],
 }
 "dataSource": "accounts/{account}/dataSources/{dataSource}"
}

הצגת רשימה של מבצעים

אפשר להשתמש בשיטה promotions.list כדי לראות את כל המבצעים שנוצרו.

GET https://merchantapi.googleapis.com/promotions/v1beta/{parent=accounts/*}/promotions

סטטוס מבצע

אפשר לראות את סטטוס המבצע באמצעות המאפיין promotionStatus שהוחזר על ידי promotions.get ו-promotions.list.

למידע על תהליך האישור, ראו תהליך האישור של המבצעים.

סטטוס מבצע לדוגמה

הדוגמאות הבאות ממחישות את ההבדל בין בקשות שנכשלו לבין בקשות שנכשלו.

דוגמה 1. בגוף התגובה הבא מוצג מבצע באינטרנט שיידחה כי חסר מיפוי של מוצרים.

  "promotionStatus": {
    "destinationStatuses": [
      {
        "reportingContext": "FREE_LISTINGS",
        "status": "REJECTED"
      }
    ],
    "itemLevelIssues": [
      {
        "code": "promotion_sku_unmapped",
        "severity": "DISAPPROVED",
        "resolution": "merchant_action",
        "reportingContext": "FREE_LISTINGS",
        "description": "Unmapped",
        "detail": "This promotion couldn't be tested during review because it doesn't apply to any products that are currently in your Products feed",
        "documentation": "https://support.google.com/merchants/answer/2906014",
        "applicableCountries": [
          "US"
        ]
      },
      {
        "code": "promotion_sku_additional_requirements",
        "severity": "DISAPPROVED",
        "resolution": "merchant_action",
        "reportingContext": "FREE_LISTINGS",
        "description": "Promotion conditions not allowed",
        "detail": "This promotion has additional requirements that are not allowed such as requiring customers to verify additional details like phone number or ID before showing the promotion details",
        "documentation": "https://support.google.com/merchants/answer/2906014",
        "applicableCountries": [
          "US"
        ]
      }
    ]
  }

דוגמה 2. בגוף התגובה הבא מוצג קידום מכירות שאושר.

  "promotionStatus": {
    "destinationStatuses": [
      {
        "reportingContext": "FREE_LISTINGS",
        "status": "PENDING"
      },
      {
        "destination": "SHOPPING_ADS",
        "status": "PENDING"
      }
    ],
    "itemLevelIssues": []
  }

דוגמה 3. קידום מכירות מאושר ופעיל

  "promotionStatus": {
    "destinationStatuses": [
      {
        "reportingContext": "FREE_LISTINGS",
        "status": "LIVE"
      },
      {
        "destination": "SHOPPING_ADS",
        "status": "LIVE"
 }  ],
    "itemLevelIssues": []
  }

מידע נוסף

פרטים נוספים זמינים במרכז העזרה בנושא מבצעים.

מידע נוסף על המעבר מ-Content API for Shopping מופיע במאמר העברת ניהול מבצעים.