查询用户商品券详情
品牌方可以通过本接口查询已经发放给用户的商品券详情 前置条件:已经给用户发券成功
请求参数 | 类型 | 描述 |
---|---|---|
openid | string | 用户OpenID |
coupon_code | string | 用户商品券Code |
query | object | 声明请求的查询参数 |
brand_id | string | 品牌ID |
product_coupon_id | string | 商品券ID |
stock_id | string | 批次ID |
appid | string | 公众账号AppID |
php
$instance->v3->marketing->partner->productCoupon->users->_openid_->coupons->_coupon_code_->getAsync([
'openid' => 'oh-394z-6CGkNoJrsDLTTUKiAnp4',
'coupon_code' => '123446565767',
'query' => [
'brand_id' => '120344',
'product_coupon_id' => '1000000013',
'stock_id' => '1000000013001',
'appid' => 'wx233544546545989',
],
])
->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/users/{openid}/coupons/{coupon_code}')->getAsync([
'openid' => 'oh-394z-6CGkNoJrsDLTTUKiAnp4',
'coupon_code' => '123446565767',
'query' => [
'brand_id' => '120344',
'product_coupon_id' => '1000000013',
'stock_id' => '1000000013001',
'appid' => 'wx233544546545989',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/partner/product-coupon/users/{openid}/coupons/{coupon_code}']->getAsync([
'openid' => 'oh-394z-6CGkNoJrsDLTTUKiAnp4',
'coupon_code' => '123446565767',
'query' => [
'brand_id' => '120344',
'product_coupon_id' => '1000000013',
'stock_id' => '1000000013001',
'appid' => 'wx233544546545989',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->partner->productCoupon->users->_openid_->coupons->_coupon_code_->get([
'openid' => 'oh-394z-6CGkNoJrsDLTTUKiAnp4',
'coupon_code' => '123446565767',
'query' => [
'brand_id' => '120344',
'product_coupon_id' => '1000000013',
'stock_id' => '1000000013001',
'appid' => 'wx233544546545989',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/partner/product-coupon/users/{openid}/coupons/{coupon_code}')->get([
'openid' => 'oh-394z-6CGkNoJrsDLTTUKiAnp4',
'coupon_code' => '123446565767',
'query' => [
'brand_id' => '120344',
'product_coupon_id' => '1000000013',
'stock_id' => '1000000013001',
'appid' => 'wx233544546545989',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/partner/product-coupon/users/{openid}/coupons/{coupon_code}']->get([
'openid' => 'oh-394z-6CGkNoJrsDLTTUKiAnp4',
'coupon_code' => '123446565767',
'query' => [
'brand_id' => '120344',
'product_coupon_id' => '1000000013',
'stock_id' => '1000000013001',
'appid' => 'wx233544546545989',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
coupon_code | string | 用户商品券Code |
coupon_state | string | 用户商品券状态CONFIRMING | PENDING | EFFECTIVE | USED | EXPIRED | DELETED | DEACTIVATED 枚举值之一 |
valid_begin_time | string | 有效期开始时间 |
valid_end_time | string | 有效期结束时间 |
receive_time | string | 领券时间 |
send_request_no | string | 发券请求单号 |
send_channel | string | 发券渠道API | BRAND_MANAGE | MERCHANT_CARD | MEMBER | SMALL_ACTIVITY 枚举值之一 |
confirm_request_no | string | 确认请求单号 |
confirm_time | string | 确认发放时间 |
deactivate_request_no | string | 失效请求单号 |
deactivate_time | string | 失效时间 |
deactivate_reason | string | 失效原因 |
single_usage_detail | object | 单券使用详情 |
use_request_no | string | 券核销请求单号 |
use_time | string | 核销时间 |
associated_order_info | object | 关联微信支付订单信息 |
transaction_id | string | 微信支付单号 |
out_trade_no | string | 商户订单号 |
mchid | string | 商户号 |
sub_mchid | string | 子商户号 |
return_request_no | string | 退券请求单号 |
return_time | string | 退券时间 |
sequential_usage_detail | object | 多次优惠使用详情 |
total_count | integer | 总可使用次数 |
used_count | integer | 已使用次数 |
detail_item_list | object[] | 轮次使用详情列表 |
detail_state | string | 轮次使用详情状态PENDING | EFFECTIVE | USED | EXPIRED | DELETED | DEACTIVATED 枚举值之一 |
valid_begin_time | string | 有效期开始时间 |
valid_end_time | string | 有效期结束时间 |
use_request_no | string | 核销请求单号 |
use_time | string | 核销时间 |
associated_order_info | object | 关联微信支付订单信息 |
transaction_id | string | 微信支付单号 |
out_trade_no | string | 商户订单号 |
mchid | string | 商户号 |
sub_mchid | string | 子商户号 |
return_request_no | string | 退券请求单号 |
return_time | string | 退券时间 |
delete_time | string | 删除时间 |
product_coupon | object | 商品券信息 |
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 | 失效原因 |
stock | object | 批次信息 |
product_coupon_id | string | 商品券ID |
stock_id | string | 批次ID |
remark | string | 备注 |
coupon_code_mode | string | 券Code分配模式WECHATPAY | UPLOAD | API_ASSIGN 枚举值之一 |
coupon_code_count_info | object | 品牌方预上传的券Code数量信息 |
total_count | integer | 已上传的Code总数 |
available_count | integer | 当前可用的Code |
stock_send_rule | object | 发放规则 |
max_count | integer | 发放次数总上限 |
max_count_per_day | integer | 每日发放次数上限 |
max_count_per_user | integer | 每个用户领取次数上限 |
single_usage_rule | object | 单券使用规则 |
coupon_available_period | object | 券可核销时间 |
available_begin_time | string | 开始时间 |
available_end_time | string | 结束时间 |
available_days | integer | 生效后N天内有效 |
wait_days_after_receive | integer | 领取后N天开始生效 |
weekly_available_period | object | 每周固定可用时间 |
day_list | string[] | 每周可用星期数MONDAY | TUESDAY | WEDNESDAY | THURSDAY | FRIDAY | SATURDAY | SUNDAY 枚举值之一 |
day_period_list | object[] | 当天可用时间段 |
begin_time | integer | 当天可用开始时间 |
end_time | integer | 当天可用结束时间 |
irregular_available_period_list | object[] | 无规律的可用时间段 |
begin_time | string | 开始时间 |
end_time | string | 结束时间 |
normal_coupon | object | 满减券使用规则 |
threshold | integer | 门槛金额 |
discount_amount | integer | 固定减免金额 |
discount_coupon | object | 折扣券使用规则 |
threshold | integer | 门槛金额 |
percent_off | integer | 固定减免百分比 |
exchange_coupon | object | 兑换券使用规则 |
threshold | integer | 门槛金额 |
exchange_price | integer | 固定兑换价格 |
sequential_usage_rule | object | 多次优惠使用规则 |
coupon_available_period | object | 券可核销时间 |
available_begin_time | string | 开始时间 |
available_end_time | string | 结束时间 |
wait_days_after_receive | integer | 领取后N天开始生效 |
weekly_available_period | object | 每周固定可用时间 |
day_list | string[] | 每周可用星期数MONDAY | TUESDAY | WEDNESDAY | THURSDAY | FRIDAY | SATURDAY | SUNDAY 枚举值之一 |
day_period_list | object[] | 当天可用时间段 |
begin_time | integer | 当天可用开始时间 |
end_time | integer | 当天可用结束时间 |
irregular_available_period_list | object[] | 无规律的可用时间段 |
begin_time | string | 开始时间 |
end_time | string | 结束时间 |
normal_coupon_list | object[] | 满减券使用规则 |
threshold | integer | 门槛金额 |
discount_amount | integer | 固定减免金额 |
discount_coupon_list | object[] | 折扣券使用规则列表 |
threshold | integer | 门槛金额 |
percent_off | integer | 固定减免百分比 |
exchange_coupon_list | object[] | 兑换券使用规则列表 |
threshold | integer | 门槛金额 |
exchange_price | integer | 固定兑换价格 |
special_first | boolean | 多次优惠是否提供首笔特惠 |
usage_rule_display_info | object | 券使用规则展示信息 |
coupon_usage_method_list | string[] | 券使用方式列表OFFLINE | MINI_PROGRAM | APP | PAYMENT_CODE 枚举值之一 |
mini_program_appid | string | 小程序AppID |
mini_program_path | string | 小程序跳转路径 |
app_path | string | APP跳转路径 |
usage_description | string | 券使用说明 |
coupon_available_store_info | object | 券可用门店信息 |
description | string | 券可用门店描述 |
mini_program_appid | string | 小程序AppID |
mini_program_path | string | 小程序跳转路径 |
coupon_display_info | object | 用户商品券展示信息 |
code_display_mode | string | 用户商品券Code展示模式INVISIBLE | BARCODE | QRCODE 枚举值之一 |
background_color | string | 背景颜色Color010 | Color020 | Color030 | Color040 | Color050 | Color060 | Color070 | Color080 | Color090 | Color100 枚举值之一 |
entrance_mini_program | object | 小程序入口 |
appid | string | 小程序appid |
path | string | 小程序跳转路径 |
entrance_wording | string | 入口文案 |
guidance_wording | string | 引导文案 |
entrance_official_account | object | 公众号入口 |
appid | string | 公众号AppID |
entrance_finder | object | 视频号入口 |
finder_id | string | 视频号ID |
finder_video_id | string | 视频号视频ID |
finder_video_cover_image_url | string | 视频号封面图 |
notify_config | object | 事件通知配置 |
notify_appid | string | 事件通知appid |
store_scope | string | 可用门店范围NONE | ALL | SPECIFIC 枚举值之一 |
sent_count_info | object | 已发放次数 |
total_count | integer | 已发放总次数 |
today_count | integer | 当天已发放次数 |
state | string | 批次状态AUDITING | SENDING | PAUSED | STOPPED | DEACTIVATED 枚举值之一 |
deactivate_request_no | string | 失效请求单号 |
deactivate_time | string | 失效时间 |
deactivate_reason | string | 失效原因 |
brand_id | string | 品牌ID |
attach | string | 自定义附加信息 |
channel_custom_info | string | 渠道自定义信息 |
brand_id | string | 品牌ID |
参阅 官方文档