Skip to content

查询及删除预存code详情信息

查询预存code详情

请求参数类型描述
stock_idstring批次号
coupon_codestring商户上传的code
queryobject声明请求的查询参数
appidstring公众账号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_informationobject券code信息
codestring商户上传code
code_statusstring商户上传code分配状态
upload_timestring上传时间
dispatched_timestring被分配时间
openidstring领券用户的OpenID
unionidstring领券用户的UnionID
coupon_codestring用户券code
coupon_informationobject券码信息
stock_namestring商家券批次名称
belong_merchantstring批次归属商户号
commentstring批次备注
goods_namestring适用商品范围
stock_typestring批次类型
transferableboolean是否允许转赠
shareableboolean是否允许分享领券链接
coupon_statestring券状态
coupon_use_ruleobject核销规则
coupon_available_timeobject券可核销时间
available_begin_timestring开始时间
available_end_timestring结束时间
available_day_after_receiveinteger生效后N天内有效
available_weekobject固定周期有效时间段
week_daystring[]可用星期数
available_day_timeobject[]当天可用时间段
begin_timeinteger当天可用开始时间
end_timeinteger当天可用结束时间
irregulary_avaliable_timeobject[]无规律的有效时间段
begin_timestring开始时间
end_timestring结束时间
wait_days_after_receiveinteger领取后N天开始生效
fixed_normal_couponobject固定面额满减券使用规则
discount_amountinteger优惠金额
transaction_minimuminteger消费门槛
discount_couponobject折扣券使用规则
discount_percentinteger折扣比例
transaction_minimuminteger消费门槛
exchange_couponobject换购券使用规则
exchange_priceinteger单品换购价
transaction_minimuminteger消费门槛
use_methodstring核销方式
mini_programs_appidstring小程序appid
mini_programs_pathstring小程序path
custom_entranceobject自定义入口
mini_programs_infoobject小程序入口
mini_programs_appidstring商家小程序appid
mini_programs_pathstring商家小程序path
entrance_wordsstring入口文案
guiding_wordsstring引导文案
appidstring商户公众号appid
hall_idstring营销馆id
store_idstring可用门店id
code_display_modestringcode展示模式
display_pattern_infoobject样式信息
descriptionstring使用须知
merchant_logo_urlstring商户logo
merchant_namestring商户名称
background_colorstring背景颜色
coupon_image_urlstring券详情图片
finder_infoobject视频号相关信息
finder_idstring视频号ID
finder_video_idstring视频号视频ID
finder_video_cover_image_urlstring视频号封面图

参阅 官方文档

删除预存code

请求参数类型描述
stock_idstring批次号
coupon_codestring商户上传的code
queryobject声明请求的查询参数
delete_request_nostring请求业务单据号
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_idstring批次号
delete_timestring删除时间

参阅 官方文档

Published on the GitHub by TheNorthMemory