发放消费卡
商户通过调用本接口向用户发放消费卡,用户领到卡的同时会领取到一批代金券,消费卡会自动放入卡包中。
请求参数 | 类型 | 描述 |
---|---|---|
card_id | string | 消费卡ID |
json | object | 声明请求的JSON 数据结构 |
appid | string | 消费卡归属appid |
openid | string | 用户openid |
out_request_no | string | 商户单据号 |
send_time | string | 请求发卡时间 |
php
$instance->v3->marketing->busifavor->coupons->_card_id_->send->postAsync([
'card_id' => '',
'json' => [
'appid' => '',
'openid' => '',
'out_request_no' => '',
'send_time' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/marketing/busifavor/coupons/{card_id}/send')->postAsync([
'card_id' => '',
'json' => [
'appid' => '',
'openid' => '',
'out_request_no' => '',
'send_time' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/marketing/busifavor/coupons/{card_id}/send']->postAsync([
'card_id' => '',
'json' => [
'appid' => '',
'openid' => '',
'out_request_no' => '',
'send_time' => '',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->marketing->busifavor->coupons->_card_id_->send->post([
'card_id' => '',
'json' => [
'appid' => '',
'openid' => '',
'out_request_no' => '',
'send_time' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/marketing/busifavor/coupons/{card_id}/send')->post([
'card_id' => '',
'json' => [
'appid' => '',
'openid' => '',
'out_request_no' => '',
'send_time' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/marketing/busifavor/coupons/{card_id}/send']->post([
'card_id' => '',
'json' => [
'appid' => '',
'openid' => '',
'out_request_no' => '',
'send_time' => '',
],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典 | 类型 | 描述 |
---|---|---|
card_code | string | 消费卡code |
参阅 官方文档