Skip to content

查询代金券详情

通过此接口可查询代金券信息,包括代金券的基础信息、状态。如代金券已核销,会包括代金券核销的订单信息(订单号、单品信息等)。

请求参数类型描述
openidstring用户openid
coupon_idstring代金券id
queryobject声明请求的查询参数
appidstring公众账号ID
php
$instance->v3->marketing->favor->users->_openid_->coupons->_coupon_id_->getAsync([
  'openid' => '',
  'coupon_id' => '',
  'query' => [
    'appid' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/favor/users/{openid}/coupons/{coupon_id}')->getAsync([
  'openid' => '',
  'coupon_id' => '',
  'query' => [
    'appid' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/favor/users/{openid}/coupons/{coupon_id}']->getAsync([
  'openid' => '',
  'coupon_id' => '',
  'query' => [
    'appid' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->favor->users->_openid_->coupons->_coupon_id_->get([
  'openid' => '',
  'coupon_id' => '',
  'query' => [
    'appid' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/favor/users/{openid}/coupons/{coupon_id}')->get([
  'openid' => '',
  'coupon_id' => '',
  'query' => [
    'appid' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/favor/users/{openid}/coupons/{coupon_id}']->get([
  'openid' => '',
  'coupon_id' => '',
  'query' => [
    'appid' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
stock_creator_mchidstring创建批次的商户号
stock_idstring批次号
coupon_idstring代金券id
coupon_namestring代金券名称
statusstring代金券状态
SENDED | USED | EXPIRED 枚举值之一
descriptionstring使用说明
create_timestring领券时间
coupon_typestring券类型
NORMAL | CUT_TO 枚举值之一
start_timestring激活批次的时间
stop_timestring终止批次的时间
singleitemboolean是否单品优惠
cut_to_messageobject减至批次特定信息
single_price_maxinteger可用优惠的商品最高单价
cut_to_priceinteger减至后的优惠单价
available_begin_timestring可用开始时间
available_end_timestring可用结束时间
normal_coupon_informationobject固定面额满减券使用规则
coupon_amountinteger面额
transaction_minimuminteger门槛
consume_informationobject已实扣代金券核销信息
consume_timestring核销时间
consume_mchidstring核销商户号
transaction_idstring核销商户号
goods_detailobject[]单品信息
goods_idstring
quantityinteger
priceinteger
discount_amountinteger
available_balancenumber剩余金额
business_typestring业务类型
MULTIUSE 枚举值

参阅 官方文档 官方文档 官方文档

Published on the GitHub by TheNorthMemory