Merchant Promotions API を使用すると、Google でプロモーションを作成、管理できます。accounts.promotions リソースを使用すると、Google で販売する商品のスペシャル オファーを提示できます。詳しくは、Merchant Promotions API の概要をご覧ください。
リクエスト
リクエストを行うには、次の URL を使用します。
POST https://merchantapi.googleapis.com/promotions/v1beta/{account_name}/promotions
Content API for Shopping から移行する
以下では、プロモーション関連のリクエストについて、Content API for Shopping と Merchant Promotions API を比較します。
URL
Content API for Shopping の場合:
https://shoppingcontent.googleapis.com/content/v2.1/{merchantId}/promotions
この場合、Merchant API は次のようになります。
https://merchantapi.googleapis.com/promotions/v1beta/{parent=accounts/*}/promotions
識別子
Content API for Shopping の場合:
{merchantId}/promotions/{promotionId}
この場合、Merchant API は次のようになります。
{name}
メソッド
Merchant API は、プロモーション用に次のメソッドをサポートしています。
- プロモーションを挿入
- プロモーションを利用する
- プロモーションを一覧表示する
Content API for Shopping と Merchant API で利用できるプロモーション メソッドの比較を以下に示します。
メソッド | Content API for Shopping | 販売者 API |
---|---|---|
insert | ○ | ○ |
入手する | はい | はい |
リスト | はい | はい |
customBatch | × | × |
削除 | × | (未定) |
リソース名
次の表は、Merchant Promotions API でのプロモーションに関する変更点を示しています。
参考例については、ローカル在庫をご覧ください。
Content API for Shopping | 販売者 API | 説明 |
---|---|---|
(未対応) | custom_attributes |
カスタム(販売者指定)属性のリスト。 を使用すると、フィード仕様の任意の属性を汎用形式で登録できます。 例: { "name": "size type", "value": "regular" }これは、API で明示的に 公開されていない属性を送信する場合に便利です。 |
サポート対象外 | data_source | プロモーションを作成するには、既存のデータソースが必要です。 |
サポート対象外 | 属性 |
プロモーション固有の属性( long_tile、promotion_effective_timeperiod、 など)は属性メッセージの一部です。 |
item_id | item_id_inclusion |
プロモーションが適用される商品アイテム ID のリストが 変更されます。 |
store_id | store_id_inclusion |
プロモーションが を適用する店舗 ID のリストの名前が変更されます。 |
prduct_type | product_type_inclusion |
プロモーションが を適用する商品カテゴリのリストの名前が変更されます。 |
item_group_id | item_group_id_inclusion |
プロモーションによって が適用される商品グループ ID のリストの名前が変更されます。 |
brand | brand_inclusion |
プロモーションが を適用するブランドのリストの名前が変更されます。 |
store_code | store_codes_inclusion |
プロモーションが を適用する店舗コードのリストの名前が変更されます。 |
price: { object (Price) } |
price: { object (Price) } |
価格の定義が変更されました。
Content API for Shopping では、価格
Price の金額は
amount フィールド名が値から
currency フィールド名が |
order_limit | (未対応) | order_limit 属性はサポートされていません。 |
shippingServiceNames[] | (未対応) | shippingServiceNames[] はサポートされていません。 |
money_budget | (未対応) | money_budget はサポートされていません。 |
promotion_destination_ids | promotion_destinations | promotionDestinationIds の名前が変更されました。 |
プロモーションのステータス
{ "destinationStatuses": [ { "destination": string, "status": enum (State) } ], "promotionIssue": [ { "code": string, "detail": string } ], "creationDate": string, "lastUpdateDate": string } |
プロモーションのステータスが変更されました。
より詳細なレベルについては、問題を参照してください。 promotionStatus = { destinationStatuses = [ { reportingContext = Enum status = Enum }, ], itemLevelIssues = [ { code = String severity = Enum resolution = String reportingContext = Enum description = String detail = String documentation = String applicableCountries = [ String, ] } ] } |