Skip to content

条件查询批次列表

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

请求参数类型描述
queryobject声明请求的查询参数
offsetinteger分页页码
limitinteger分页大小
stock_creator_mchidstring创建批次的商户号
create_start_timestring起始时间
create_end_timestring终止时间
statusstring批次状态
unactivated | audit | running | stoped | paused 枚举值之一
php
$instance->v3->marketing->favor->stocks->getAsync([
  'query' => [
    'offset'              => 0,
    'limit'               => 0,
    'stock_creator_mchid' => '',
    'create_start_time'   => '2015-05-20T13:29:35.120+08:00',
    'create_end_time'     => '2015-05-20T13:29:35.120+08:00',
    'status'              => 'unactivated',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/favor/stocks')->getAsync([
  'query' => [
    'offset'              => 0,
    'limit'               => 0,
    'stock_creator_mchid' => '',
    'create_start_time'   => '2015-05-20T13:29:35.120+08:00',
    'create_end_time'     => '2015-05-20T13:29:35.120+08:00',
    'status'              => 'unactivated',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/favor/stocks']->getAsync([
  'query' => [
    'offset'              => 0,
    'limit'               => 0,
    'stock_creator_mchid' => '',
    'create_start_time'   => '2015-05-20T13:29:35.120+08:00',
    'create_end_time'     => '2015-05-20T13:29:35.120+08:00',
    'status'              => 'unactivated',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->favor->stocks->get([
  'query' => [
    'offset'              => 0,
    'limit'               => 0,
    'stock_creator_mchid' => '',
    'create_start_time'   => '2015-05-20T13:29:35.120+08:00',
    'create_end_time'     => '2015-05-20T13:29:35.120+08:00',
    'status'              => 'unactivated',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/favor/stocks')->get([
  'query' => [
    'offset'              => 0,
    'limit'               => 0,
    'stock_creator_mchid' => '',
    'create_start_time'   => '2015-05-20T13:29:35.120+08:00',
    'create_end_time'     => '2015-05-20T13:29:35.120+08:00',
    'status'              => 'unactivated',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/favor/stocks']->get([
  'query' => [
    'offset'              => 0,
    'limit'               => 0,
    'stock_creator_mchid' => '',
    'create_start_time'   => '2015-05-20T13:29:35.120+08:00',
    'create_end_time'     => '2015-05-20T13:29:35.120+08:00',
    'status'              => 'unactivated',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
total_countinteger批次总数
limitinteger分页大小
offsetinteger分页页码

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

Published on the GitHub by TheNorthMemory