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