Merchant Promotions API の概要

プロモーションを使用して、Google で販売する商品のスペシャル オファーを紹介します。プロモーションは、Google 検索、ショッピング、Chrome などのさまざまな Google サービスに表示されます。

商品にプロモーションを追加すると、「15% オフ」や「送料無料」などのスペシャル オファーのリンクがユーザーに表示されます。特典リンクは商品の魅力を高め、買い物客に購入を促すことができます。

詳しくは、プロモーションの基本をご覧ください。

前提条件

Google では、プロモーションを表示する前に、お客様のビジネスと商品に関する具体的な情報を提供する必要があります。次のものが必要です。

また、プロモーション プログラムに販売アカウントを登録する必要があります。すでに登録されているかどうかわからない場合は、Merchant Center をご確認ください。

登録していない場合は、リクエスト フォームにご記入ください。実装を開始する準備が整うと、プロモーション チームから通知が届きます。

詳しくは、参加条件とポリシーをご覧ください。

データソースを作成する

datasource.create API を使用してプロモーション フィードを作成します。既存のプロモーション フィードが利用可能な場合は、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"
}

プロモーションを実施する

プロモーションを作成または更新するには、accounts.promotions.insert メソッドを使用します。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 を使用します。この get は読み取り専用です。これには、merchantId とプロモーションの ID が必要です。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"
}

Sample 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

プロモーション ステータス

プロモーションのステータスは、promotions.getpromotions.list から返される promotionStatus 属性で確認できます。

承認プロセスについては、プロモーションの承認プロセスをご覧ください。

プロモーション ステータスの例

次のサンプルは、成功したリクエストと失敗したリクエストの違いを示しています。

例 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"
        ]
      }
    ]
  }

Sample 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 からの移行について詳しくは、プロモーション管理の移行をご覧ください。