Skip to content

查询批次详情

通过此接口可查询批次信息,包括批次的配置信息以及批次概况数据。

请求参数类型描述
stock_idstring批次号
queryobject声明请求的查询参数
stock_creator_mchidstring创建批次的商户号
php
$instance->v3->marketing->favor->stocks->_stock_id_->getAsync([
  'stock_id' => '',
  'query' => [
    'stock_creator_mchid' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/favor/stocks/{stock_id}')->getAsync([
  'stock_id' => '',
  'query' => [
    'stock_creator_mchid' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/favor/stocks/{stock_id}']->getAsync([
  'stock_id' => '',
  'query' => [
    'stock_creator_mchid' => '',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->favor->stocks->_stock_id_->get([
  'stock_id' => '',
  'query' => [
    'stock_creator_mchid' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/favor/stocks/{stock_id}')->get([
  'stock_id' => '',
  'query' => [
    'stock_creator_mchid' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/favor/stocks/{stock_id}']->get([
  'stock_id' => '',
  'query' => [
    'stock_creator_mchid' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
stock_namestring批次名称
available_begin_timestring开始时间
available_end_timestring结束时间
stock_use_ruleobject发放规则
max_couponsinteger发放总上限
max_amountinteger总预算
max_amount_by_dayinteger单天发放上限金额
max_coupons_per_userinteger单个用户可领个数
natural_person_limitboolean是否开启自然人限制
prevent_api_abusebooleanapi发券防刷
no_cashboolean是否无资金流
stock_typestring批次类型
NORMAL | DISCOUNT | EXCHAHGE | RANDOM | DISCOUNT_CUT 枚举值之一
stock_idstring批次号
stock_creator_mchidstring创建批次的商户号
statusstring批次状态
unactivated | audit | running | stoped | paused 枚举值之一
descriptionstring使用说明
create_timestring创建时间
start_timestring激活批次的时间
stop_timestring终止批次的时间
singleitemboolean是否单品优惠
cut_to_messageobject减至批次特定信息
single_price_maxinteger可用优惠的商品最高单价
cut_to_priceinteger减至后的优惠单价
distributed_couponsinteger已发券数量
business_typestring业务类型
MULTIUSE 枚举值
available_region_listobject[]消费金可用地域
typestring类型
provincestring
citystring
districtstring
countrystring国家
available_industry_liststring[]消费金可用行业

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

Published on the GitHub by TheNorthMemory