排解 Merchant Promotions API 相關問題

本頁面說明如何排解商家促銷活動 API 相關問題。

建立促銷活動

使用 accounts.promotions.insert 要求插入促銷活動時,請務必在要求主體中加入所有必填欄位。以下為必填欄位:

  • promotion.promotionId
  • promotion.contentLanguage
  • promotion.redemptionChannel
  • promotion.targetCountry
  • promotion.attributes.longTitle
  • promotion.attributes.promotionEffectiveTimePeriod.startTime
  • promotion.attributes.promotionEffectiveTimePeriod.endTime
  • promotion.attributes.promotionDestinations
  • promotion.attributes.couponValueType
  • promotion.attributes.offerType
  • promotion.attributes.productApplicability
  • promotion.attributes.promotionUrl

無效的促銷活動有效時間

如果您在 accounts.promotions.insert 要求中提供無效的促銷活動生效日期,系統會顯示以下錯誤訊息:

Invalid value at 'promotion.attributes.promotion_effective_time_period.start_time'

如要解決這個錯誤,請確認為 promotionDisplayTimePeriod.startTime 欄位提供的值與 promotionEffectiveTimePeriod.startTime 欄位提供的值相同,或前者在後者之前。此外,請確認為 promotionDisplayTimePeriod.endTime 欄位提供的值與 promotionEffectiveTimePeriod.endTime 欄位提供的值相同或較前者。

startTimeendTime 欄位的值必須採用 RFC3339 世界標準時間格式,也就是 yyyy-mm-ddThh:mm:ssZ。例如:2024-08-15T18:20:20Z

未指定最低購買數量

如果 attributes.couponValueTypeBUY_M_GET_N_PERCENT_OFFBUY_M_GET_N_MONEY_OFF,您必須在 accounts.promotions.insert 要求中提供 attributes.minimumPurchaseQuantity 欄位的值。

如果您未在 accounts.promotions.insert 要求中提供 attributes.minimumPurchaseQuantity 欄位的值,系統會顯示以下錯誤訊息:

[minimumPurchaseQuantity] Missing benefit or restriction attributes for its type

如要解決這項錯誤,請務必在要求中提供 minimumPurchaseQuantity 欄位的值。

未指定折扣金額

如果 attributes.couponValueType 欄位的值為 MONEY_OFF,您必須在 accounts.promotions.insert 要求中提供 attributes.moneyOffAmount 欄位的值。

如果您未在 accounts.promotions.insert 要求中為 attributes.moneyOffAmount 欄位提供值,系統會顯示以下錯誤訊息:

[moneyOffAmount] Missing benefit or restriction attributes for its type

如要解決這項錯誤,請務必在要求中提供 attributes.moneyOffAmount 欄位的值。金額必須以微為單位。

未指定免費贈禮的說明

如果 attributes.couponValueType 欄位的值為 FREE_GIFT,您必須在 accounts.promotions.insert 要求中提供 attributes.freeGiftDescription 欄位的值。

如果您未在 accounts.promotions.insert 要求中提供 attributes.freeGiftDescription 欄位的值,就會看到以下錯誤訊息:

[freeGiftDescription] Missing benefit or restriction attributes for its type

如要解決這項錯誤,請務必在要求中提供 attributes.freeGiftDescription 欄位的值。

店面促銷活動不支援免運費

如果 redemptionChannel 欄位的值為 IN_STORE,而 attributes.couponValueType 欄位的值為 FREE_SHIPPING_STANDARDFREE_SHIPPING_OVERNIGHTFREE_SHIPPING_TWO_DAY,您會看到以下錯誤訊息:

[shippingServiceNames] Free shipping types are not supported for local promotions

如要解決這個錯誤,請確認 redemptionChannel 欄位的值為 ONLINE

未指定兌換管道

如果 accounts.promotions.insert 要求中未指定 redemptionChannel 欄位的值,您會看到以下錯誤訊息:

[redemptionChannel] Required parameter: redemptionChannel

如要解決這項錯誤,請務必在要求中提供 redemptionChannel 欄位的值。

促銷活動和資料來源的 contentLanguage 欄位不相符

如果 contentLanguage 欄位的值與您在 accounts.promotions.insert 要求中使用的促銷活動資料來源contentLanguage 欄位值不符,您會看到以下錯誤訊息:

[promotion] Could not find the proper data target for the provided feedLabel and contentLanguage

如要解決這個錯誤,請確認 contentLanguage 欄位的值與您使用的促銷活動資料來源的 contentLanguage 欄位值相同。

如果 targetCountry 的值與所用宣傳活動資料來源的 targetCountry 欄位值不符,也會顯示這則錯誤訊息。

瞭解詳情