本页介绍了如何排查与促销活动子 API 相关的问题。
创建促销活动
使用 accounts.promotions.insert 请求
插入促销活动时,请确保在
请求正文中添加了所有必填字段。以下字段是必填字段:
promotion.promotionIdpromotion.contentLanguagepromotion.redemptionChannelpromotion.targetCountrypromotion.attributes.longTitlepromotion.attributes.promotionEffectiveTimePeriod.startTimepromotion.attributes.promotionEffectiveTimePeriod.endTimepromotion.attributes.promotionDestinationspromotion.attributes.couponValueTypepromotion.attributes.offerTypepromotion.attributes.productApplicabilitypromotion.attributes.promotionUrl
促销活动有效期无效
如果您在
accounts.promotions.insert请求中提供的促销活动有效期无效,您将看到以下错误消息:
Invalid value at 'promotion.attributes.promotion_effective_time_period.start_time'
如需解决此错误,请确保为 promotionDisplayTimePeriod.startTime 字段提供的值与为
promotionEffectiveTimePeriod.startTime 字段提供的值相同或早于后者。另请确保为
promotionDisplayTimePeriod.endTime 字段提供的值与为 promotionEffectiveTimePeriod.endTime
字段提供的值相同或早于后者。
startTime 和 endTime 字段的值必须采用
RFC3339 UTC 格式,即
yyyy-mm-ddThh:mm:ssZ。例如,2024-08-15T18:20:20Z。
未指定最低购买数量
如果您的 attributes.couponValueType 为 BUY_M_GET_N_PERCENT_OFF 或
BUY_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_STANDARD、FREE_SHIPPING_OVERNIGHT 或 FREE_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 字段的值不同,您也会看到此错误。