根据过滤条件查询用户券
服务商自定义筛选条件(如创建商户号、归属商户号、发放商户号等),查询指定微信用户卡包中满足对应条件的所有商家券信息。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| openid | string | 用户标识 |
| query | object | 声明请求的查询参数 |
| appid | string | 公众账号ID |
| stock_id | string | 批次号 |
| coupon_state | string | 券状态SENDED | USED | EXPIRED 枚举值之一 |
| creator_merchant | string | 创建批次的商户号 |
| belong_merchant | string | 批次归属商户号 |
| sender_merchant | string | 批次发放商户号 |
| offset | number | 分页页码 |
| limit | number | 分页大小 |
php
$instance->v3->marketing->busifavor->users->_openid_->coupons->getAsync([
'openid' => '2323dfsdf342342',
'query' => [
'appid' => 'wx233544546545989',
'stock_id' => '9865000',
'coupon_state' => 'SENDED',
'creator_merchant' => '1000000001',
'belong_merchant' => '1000000002',
'sender_merchant' => '1000000003',
'offset' => 0,
'limit' => 20,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/marketing/busifavor/users/{openid}/coupons')->getAsync([
'openid' => '2323dfsdf342342',
'query' => [
'appid' => 'wx233544546545989',
'stock_id' => '9865000',
'coupon_state' => 'SENDED',
'creator_merchant' => '1000000001',
'belong_merchant' => '1000000002',
'sender_merchant' => '1000000003',
'offset' => 0,
'limit' => 20,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/marketing/busifavor/users/{openid}/coupons']->getAsync([
'openid' => '2323dfsdf342342',
'query' => [
'appid' => 'wx233544546545989',
'stock_id' => '9865000',
'coupon_state' => 'SENDED',
'creator_merchant' => '1000000001',
'belong_merchant' => '1000000002',
'sender_merchant' => '1000000003',
'offset' => 0,
'limit' => 20,
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->marketing->busifavor->users->_openid_->coupons->get([
'openid' => '2323dfsdf342342',
'query' => [
'appid' => 'wx233544546545989',
'stock_id' => '9865000',
'coupon_state' => 'SENDED',
'creator_merchant' => '1000000001',
'belong_merchant' => '1000000002',
'sender_merchant' => '1000000003',
'offset' => 0,
'limit' => 20,
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/marketing/busifavor/users/{openid}/coupons')->get([
'openid' => '2323dfsdf342342',
'query' => [
'appid' => 'wx233544546545989',
'stock_id' => '9865000',
'coupon_state' => 'SENDED',
'creator_merchant' => '1000000001',
'belong_merchant' => '1000000002',
'sender_merchant' => '1000000003',
'offset' => 0,
'limit' => 20,
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/marketing/busifavor/users/{openid}/coupons']->get([
'openid' => '2323dfsdf342342',
'query' => [
'appid' => 'wx233544546545989',
'stock_id' => '9865000',
'coupon_state' => 'SENDED',
'creator_merchant' => '1000000001',
'belong_merchant' => '1000000002',
'sender_merchant' => '1000000003',
'offset' => 0,
'limit' => 20,
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| total_count | number | 总数量 |
| offset | number | 分页页码 |
| limit | number | 分页大小 |