失效商品券
品牌方可以通过该接口使某个商品券失效。注意:失效商品券会失效商品券所有批次。失效商品券会同步终止该商品券所有投放渠道和活动,不会有新的用户领券事件,但历史已经通过该商品券对应的批次发放的用户商品券仍然有效。
请求参数 | 类型 | 描述 |
---|---|---|
product_coupon_id | string | 商品券ID |
json | object | 声明请求的JSON 数据结构 |
brand_id | string | 品牌ID |
out_request_no | string | 失效请求单号 |
deactivate_reason | string | 失效原因 |
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_id | string | 商品券ID |
state | string | 商品券状态AUDITING | EFFECTIVE | DEACTIVATED 枚举值之一 |
brand_id | string | 品牌ID |
scope | string | 优惠范围ALL | SINGLE 枚举值之一 |
type | string | 商品券类型NORMAL | DISCOUNT | EXCHANGE 枚举值之一 |
usage_mode | string | 使用模式SINGLE | SEQUENTIAL 枚举值之一 |
single_usage_info | object | 单券模式信息 |
normal_coupon | object | 满减券使用规则 |
threshold | integer | 门槛金额 |
discount_amount | integer | 固定减免金额 |
discount_coupon | object | 折扣券使用规则 |
threshold | integer | 门槛金额 |
percent_off | integer | 固定减免百分比 |
sequential_usage_info | object | 多次优惠模式信息 |
type | string | 多次优惠规则类型INCREMENTAL | EQUAL 枚举值之一 |
count | integer | 可使用次数 |
available_days | integer | 多次优惠有效天数 |
interval_days | integer | 多次优惠使用间隔天数 |
display_info | object | 展示信息 |
name | string | 商品券名称 |
image_url | string | 商品券图片 |
background_url | string | 商品券背景图 |
detail_image_url_list | string[] | 商品券详情图列表 |
original_price | integer | 商品原价 |
combo_package_list | object[] | 套餐组合 |
name | string | 套餐名 |
pick_count | integer | 可选单品数量 |
choice_list | object[] | 单品列表 |
name | string | 单品名称 |
price | integer | 单品价格 |
count | integer | 单品数量 |
image_url | string | 单品图片 |
mini_program_appid | string | 单品跳转小程序AppID |
mini_program_path | string | 单品跳转小程序路径 |
out_product_no | string | 外部商品ID |
deactivate_request_no | string | 失效请求单号 |
deactivate_time | string | 失效时间 |
deactivate_reason | string | 失效原因 |
参阅 官方文档