Skip to content

失效商品券

品牌方可以通过该接口使某个商品券失效。注意:失效商品券会失效商品券所有批次。失效商品券会同步终止该商品券所有投放渠道和活动,不会有新的用户领券事件,但历史已经通过该商品券对应的批次发放的用户商品券仍然有效。

请求参数类型描述
product_coupon_idstring商品券ID
jsonobject声明请求的JSON数据结构
brand_idstring品牌ID
out_request_nostring失效请求单号
deactivate_reasonstring失效原因
php
$instance->v3->marketing->partner->productCoupon->productCoupons->_product_coupon_id_->deactivate->postAsync([
  'product_coupon_id' => '1000000013',
  'json' => [
    'brand_id'          => '120344',
    'out_request_no'    => '34657_20250101_123456',
    'deactivate_reason' => '批次信息有误,重新创建',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/partner/product-coupon/product-coupons/{product_coupon_id}/deactivate')->postAsync([
  'product_coupon_id' => '1000000013',
  'json' => [
    'brand_id'          => '120344',
    'out_request_no'    => '34657_20250101_123456',
    'deactivate_reason' => '批次信息有误,重新创建',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/partner/product-coupon/product-coupons/{product_coupon_id}/deactivate']->postAsync([
  'product_coupon_id' => '1000000013',
  'json' => [
    'brand_id'          => '120344',
    'out_request_no'    => '34657_20250101_123456',
    'deactivate_reason' => '批次信息有误,重新创建',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->partner->productCoupon->productCoupons->_product_coupon_id_->deactivate->post([
  'product_coupon_id' => '1000000013',
  'json' => [
    'brand_id'          => '120344',
    'out_request_no'    => '34657_20250101_123456',
    'deactivate_reason' => '批次信息有误,重新创建',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/partner/product-coupon/product-coupons/{product_coupon_id}/deactivate')->post([
  'product_coupon_id' => '1000000013',
  'json' => [
    'brand_id'          => '120344',
    'out_request_no'    => '34657_20250101_123456',
    'deactivate_reason' => '批次信息有误,重新创建',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/partner/product-coupon/product-coupons/{product_coupon_id}/deactivate']->post([
  'product_coupon_id' => '1000000013',
  'json' => [
    'brand_id'          => '120344',
    'out_request_no'    => '34657_20250101_123456',
    'deactivate_reason' => '批次信息有误,重新创建',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
product_coupon_idstring商品券ID
statestring商品券状态
AUDITING | EFFECTIVE | DEACTIVATED 枚举值之一
brand_idstring品牌ID
scopestring优惠范围
ALL | SINGLE 枚举值之一
typestring商品券类型
NORMAL | DISCOUNT | EXCHANGE 枚举值之一
usage_modestring使用模式
SINGLE | SEQUENTIAL 枚举值之一
single_usage_infoobject单券模式信息
normal_couponobject满减券使用规则
thresholdinteger门槛金额
discount_amountinteger固定减免金额
discount_couponobject折扣券使用规则
thresholdinteger门槛金额
percent_offinteger固定减免百分比
sequential_usage_infoobject多次优惠模式信息
typestring多次优惠规则类型
INCREMENTAL | EQUAL 枚举值之一
countinteger可使用次数
available_daysinteger多次优惠有效天数
interval_daysinteger多次优惠使用间隔天数
display_infoobject展示信息
namestring商品券名称
image_urlstring商品券图片
background_urlstring商品券背景图
detail_image_url_liststring[]商品券详情图列表
original_priceinteger商品原价
combo_package_listobject[]套餐组合
namestring套餐名
pick_countinteger可选单品数量
choice_listobject[]单品列表
namestring单品名称
priceinteger单品价格
countinteger单品数量
image_urlstring单品图片
mini_program_appidstring单品跳转小程序AppID
mini_program_pathstring单品跳转小程序路径
out_product_nostring外部商品ID
deactivate_request_nostring失效请求单号
deactivate_timestring失效时间
deactivate_reasonstring失效原因

参阅 官方文档

Published on the GitHub by TheNorthMemory