遷移促銷活動管理

您可以使用 Merchant Promotions API 在 Google 上建立及管理促銷活動。accounts.promotions 資源可讓您在 Google 上展示產品的特價優惠。詳情請參閱「商家宣傳 API 總覽」。

要求

如要提出要求,請使用下列網址。

POST https://merchantapi.googleapis.com/promotions/v1beta/{ACCOUNT_NAME}/promotions

從 Content API for Shopping 遷移

以下比較 Content API for Shopping 與 Merchant Promotions API 的促銷活動相關要求。

網址

在 Content API for Shopping 中:

https://shoppingcontent.googleapis.com/content/v2.1/{MERCHANT_ID}/promotions

在 Merchant API 中變成:

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

ID

在 Content API for Shopping 中:

{MERCHANT_ID}/promotions/{PROMOTION_ID}

在 Merchant API 中變成:

{NAME}

方法

Merchant API 支援下列促銷活動方法:

  • 插入促銷活動
  • 取得促銷活動
  • 列出促銷活動

以下比較 Content API for Shopping 和 Merchant API 中可用的宣傳方法:

方法 Content API for Shopping Merchant API
插入
get
list
customBatch
刪除 (待定)

資源名稱

下表說明 Merchant Promotions API 中的促銷活動有哪些異動。

如需參考範例,請參閱「店面商品目錄」。

Content API for Shopping Merchant API 說明
(不支援) custom_attributes 自訂 (商家提供) 屬性清單。您也可以使用
提交動態饋給
規格的任何屬性,並以通用格式提交。
例如:
{
  "name": "size type", "value": "regular"
}
對於提交 API 未明確公開的屬性時非常實用。
不支援 data_source 建立促銷活動時,必須使用現有的資料來源。
不支援 屬性 促銷活動專屬屬性 (例如
long_tilepromotion_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)
}
Price 的定義已變更。

在 Content API for Shopping 中,Price
是字串格式的小數。

價格金額現在會以微量單位
記錄,其中 100 萬微量單位等於所用貨幣的
標準單位。

amount 欄位名稱已從 value 變更為
amountMicros.

currency 欄位名稱已變更為
currencyCode。格式仍為
ISO 4217。(維基百科)

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,
    ]
    }
  ]
}