本页介绍了如何排查与促销活动子 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 字段的值不一致,您也会看到此错误。