查询及删除预存code详情信息
查询预存code详情
| 请求参数 | 类型 | 描述 |
|---|---|---|
| stock_id | string | 批次号 |
| coupon_code | string | 商户上传的code |
| query | object | 声明请求的查询参数 |
| appid | string | 公众账号ID |
php
$instance->v3->marketing->busifavor->stocks->_stock_id_->couponcodes->_coupon_code_->getAsync([
'stock_id' => '1212',
'coupon_code' => '1212',
'query' => [
'appid' => 'wx233544546545989',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/marketing/busifavor/stocks/{stock_id}/couponcodes/{coupon_code}')->getAsync([
'stock_id' => '1212',
'coupon_code' => '1212',
'query' => [
'appid' => 'wx233544546545989',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/marketing/busifavor/stocks/{stock_id}/couponcodes/{coupon_code}']->getAsync([
'stock_id' => '1212',
'coupon_code' => '1212',
'query' => [
'appid' => 'wx233544546545989',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->marketing->busifavor->stocks->_stock_id_->couponcodes->_coupon_code_->get([
'stock_id' => '1212',
'coupon_code' => '1212',
'query' => [
'appid' => 'wx233544546545989',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/marketing/busifavor/stocks/{stock_id}/couponcodes/{coupon_code}')->get([
'stock_id' => '1212',
'coupon_code' => '1212',
'query' => [
'appid' => 'wx233544546545989',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/marketing/busifavor/stocks/{stock_id}/couponcodes/{coupon_code}']->get([
'stock_id' => '1212',
'coupon_code' => '1212',
'query' => [
'appid' => 'wx233544546545989',
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| code_information | object | 券code信息 |
| code | string | 商户上传code |
| code_status | string | 商户上传code分配状态 |
| upload_time | string | 上传时间 |
| dispatched_time | string | 被分配时间 |
| openid | string | 领券用户的OpenID |
| unionid | string | 领券用户的UnionID |
| coupon_code | string | 用户券code |
| coupon_information | object | 券码信息 |
| stock_name | string | 商家券批次名称 |
| belong_merchant | string | 批次归属商户号 |
| comment | string | 批次备注 |
| goods_name | string | 适用商品范围 |
| stock_type | string | 批次类型NORMAL | DISCOUNT | EXCHANGE 枚举值之一 |
| transferable | boolean | 是否允许转赠 |
| shareable | boolean | 是否允许分享领券链接 |
| coupon_state | string | 券状态 |
| coupon_use_rule | object | 核销规则 |
| coupon_available_time | object | 券可核销时间 |
| available_begin_time | string | 开始时间 |
| available_end_time | string | 结束时间 |
| available_day_after_receive | integer | 生效后N天内有效 |
| available_week | object | 固定周期有效时间段 |
| week_day | integer[] | 可用星期数 |
| available_day_time | object[] | 当天可用时间段 |
| begin_time | integer | 当天可用开始时间 |
| end_time | integer | 当天可用结束时间 |
| irregulary_avaliable_time | object[] | 无规律的有效时间段 |
| begin_time | string | 开始时间 |
| end_time | string | 结束时间 |
| wait_days_after_receive | integer | 领取后N天开始生效 |
| fixed_normal_coupon | object | 固定面额满减券使用规则 |
| discount_amount | integer | 优惠金额 |
| transaction_minimum | integer | 消费门槛 |
| discount_coupon | object | 折扣券使用规则 |
| discount_percent | integer | 折扣比例 |
| transaction_minimum | integer | 消费门槛 |
| exchange_coupon | object | 换购券使用规则 |
| exchange_price | integer | 单品换购价 |
| transaction_minimum | integer | 消费门槛 |
| use_method | string | 核销方式OFF_LINE | MINI_PROGRAMS | SELF_CONSUME | PAYMENT_CODE 枚举值之一 |
| mini_programs_appid | string | 小程序appid |
| mini_programs_path | string | 小程序path |
| custom_entrance | object | 自定义入口 |
| mini_programs_info | object | 小程序入口 |
| mini_programs_appid | string | 商家小程序appid |
| mini_programs_path | string | 商家小程序path |
| entrance_words | string | 入口文案 |
| guiding_words | string | 引导文案 |
| appid | string | 商户公众号appid |
| hall_id | string | 营销馆id |
| store_id | string | 可用门店id |
| code_display_mode | string | code展示模式NOT_SHOW | BARCODE | QRCODE 枚举值之一 |
| display_pattern_info | object | 样式信息 |
| description | string | 使用须知 |
| merchant_logo_url | string | 商户logo |
| merchant_name | string | 商户名称 |
| background_color | string | 背景颜色Color010 | Color020 | Color030 | Color040 | Color050 | Color060 | Color070 | Color080 | Color090 | Color100 枚举值之一 |
| coupon_image_url | string | 券详情图片 |
| finder_info | object | 视频号相关信息 |
| finder_id | string | 视频号ID |
| finder_video_id | string | 视频号视频ID |
| finder_video_cover_image_url | string | 视频号封面图 |
参阅 官方文档
删除预存code
| 请求参数 | 类型 | 描述 |
|---|---|---|
| stock_id | string | 批次号 |
| coupon_code | string | 商户上传的code |
| query | object | 声明请求的查询参数 |
| delete_request_no | string | 请求业务单据号 |
php
$instance->v3->marketing->busifavor->stocks->_stock_id_->couponcodes->_coupon_code_->deleteAsync([
'stock_id' => '101156451224',
'coupon_code' => '1212',
'query' => [
'delete_request_no' => '1212',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/marketing/busifavor/stocks/{stock_id}/couponcodes/{coupon_code}')->deleteAsync([
'stock_id' => '101156451224',
'coupon_code' => '1212',
'query' => [
'delete_request_no' => '1212',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/marketing/busifavor/stocks/{stock_id}/couponcodes/{coupon_code}']->deleteAsync([
'stock_id' => '101156451224',
'coupon_code' => '1212',
'query' => [
'delete_request_no' => '1212',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->marketing->busifavor->stocks->_stock_id_->couponcodes->_coupon_code_->delete([
'stock_id' => '101156451224',
'coupon_code' => '1212',
'query' => [
'delete_request_no' => '1212',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/marketing/busifavor/stocks/{stock_id}/couponcodes/{coupon_code}')->delete([
'stock_id' => '101156451224',
'coupon_code' => '1212',
'query' => [
'delete_request_no' => '1212',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/marketing/busifavor/stocks/{stock_id}/couponcodes/{coupon_code}']->delete([
'stock_id' => '101156451224',
'coupon_code' => '1212',
'query' => [
'delete_request_no' => '1212',
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| stock_id | string | 批次号 |
| delete_time | string | 删除时间 |
参阅 官方文档