设置及获取商品券事件通知地址
设置商品券事件通知地址
服务商可以通过本接口设置商品券相关事件的回调地址,该地址配置为服务商维度配置,该服务商下的所有商品券相关事件均会通知到该地址。
| 请求参数 | 类型 | 描述 |
|---|---|---|
| json | object | 声明请求的JSON数据结构 |
| notify_url | string | 通知URL地址 |
php
$instance->v3->marketing->partner->productCoupon->notifyConfigs->postAsync([
'json' => [
'notify_url' => 'https://pay.weixin.qq.com',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/marketing/partner/product-coupon/notify-configs')->postAsync([
'json' => [
'notify_url' => 'https://pay.weixin.qq.com',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/marketing/partner/product-coupon/notify-configs']->postAsync([
'json' => [
'notify_url' => 'https://pay.weixin.qq.com',
],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->marketing->partner->productCoupon->notifyConfigs->post([
'json' => [
'notify_url' => 'https://pay.weixin.qq.com',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/marketing/partner/product-coupon/notify-configs')->post([
'json' => [
'notify_url' => 'https://pay.weixin.qq.com',
],
]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/marketing/partner/product-coupon/notify-configs']->post([
'json' => [
'notify_url' => 'https://pay.weixin.qq.com',
],
]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| notify_url | string | 通知URL地址 |
| update_time | string | 修改时间 |
参阅 官方文档
获取商品券事件通知地址
服务商可以通过本接口查询商品券相关事件的回调地址,该地址配置为服务商维度配置,该服务商下的所有商品券相关事件均会通知到该地址。前置条件:服务商已经配置商品券事件通知地址
| 请求参数 | 类型 | 描述 |
|---|
php
$instance->v3->marketing->partner->productCoupon->notifyConfigs->getAsync([])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance->chain('v3/marketing/partner/product-coupon/notify-configs')->getAsync([])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$instance['v3/marketing/partner/product-coupon/notify-configs']->getAsync([])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
print_r(json_decode((string) $response->getBody(), true));
})
->wait();php
$response = $instance->v3->marketing->partner->productCoupon->notifyConfigs->get([]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance->chain('v3/marketing/partner/product-coupon/notify-configs')->get([]);
print_r(json_decode((string) $response->getBody(), true));php
$response = $instance['v3/marketing/partner/product-coupon/notify-configs']->get([]);
print_r(json_decode((string) $response->getBody(), true));| 返回字典 | 类型 | 描述 |
|---|---|---|
| notify_url | string | 通知URL地址 |
| update_time | string | 修改时间 |
参阅 官方文档