向用户发券
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
openid | string | 用户标识 |
appid | string | 公众账号ID |
stock_id | string | 批次号 |
out_request_no | string | 发券凭证 |
coupon_code | string | 券code |
php
$instance->v3->marketing->busifavor->coupons->send->postAsync([
'json' => [
'openid' => 'xsd3434454567676',
'appid' => 'wx1234567889999',
'stock_id' => '100088',
'out_request_no' => '1002600620019090123143254435',
'coupon_code' => 'sxxe34343434',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/busifavor/coupons/send')->postAsync([
'json' => [
'openid' => 'xsd3434454567676',
'appid' => 'wx1234567889999',
'stock_id' => '100088',
'out_request_no' => '1002600620019090123143254435',
'coupon_code' => 'sxxe34343434',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/busifavor/coupons/send']->postAsync([
'json' => [
'openid' => 'xsd3434454567676',
'appid' => 'wx1234567889999',
'stock_id' => '100088',
'out_request_no' => '1002600620019090123143254435',
'coupon_code' => 'sxxe34343434',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->busifavor->coupons->send->post([
'json' => [
'openid' => 'xsd3434454567676',
'appid' => 'wx1234567889999',
'stock_id' => '100088',
'out_request_no' => '1002600620019090123143254435',
'coupon_code' => 'sxxe34343434',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/busifavor/coupons/send')->post([
'json' => [
'openid' => 'xsd3434454567676',
'appid' => 'wx1234567889999',
'stock_id' => '100088',
'out_request_no' => '1002600620019090123143254435',
'coupon_code' => 'sxxe34343434',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/busifavor/coupons/send']->post([
'json' => [
'openid' => 'xsd3434454567676',
'appid' => 'wx1234567889999',
'stock_id' => '100088',
'out_request_no' => '1002600620019090123143254435',
'coupon_code' => 'sxxe34343434',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
stock_id | string | 批次号 |
coupon_code | string | 券code |
out_request_no | string | 发券凭证 |
参阅 官方文档