Skip to content

查询代金券可用商户

通过调用此接口可查询批次的可用商户号,判断券是否在某商户号可用,来决定是否展示。

请求参数类型描述
stock_idstring批次号
queryobject声明请求的查询参数
offsetinteger分页页码
limitstring分页大小
stock_creator_mchidstring创建批次的商户号
php
$instance->v3->marketing->favor->stocks->_stock_id_->merchants->getAsync([
  'stock_id' => '',
  'query' => [
    'offset' => 0,
    'limit' => '',
    '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}/merchants')->getAsync([
  'stock_id' => '',
  'query' => [
    'offset' => 0,
    'limit' => '',
    '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}/merchants']->getAsync([
  'stock_id' => '',
  'query' => [
    'offset' => 0,
    'limit' => '',
    '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_->merchants->get([
  'stock_id' => '',
  'query' => [
    'offset' => 0,
    'limit' => '',
    'stock_creator_mchid' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/favor/stocks/{stock_id}/merchants')->get([
  'stock_id' => '',
  'query' => [
    'offset' => 0,
    'limit' => '',
    'stock_creator_mchid' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/favor/stocks/{stock_id}/merchants']->get([
  'stock_id' => '',
  'query' => [
    'offset' => 0,
    'limit' => '',
    'stock_creator_mchid' => '',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
total_countinteger可用商户总数量
datastring[]
offsetinteger分页页码
limitinteger分页大小
stock_idstring批次号

参阅 官方文档

Published on the GitHub by TheNorthMemory