WeChat card and coupon delivery
Set store card and coupon delivery information
After calling the interface for setting store coupon delivery information, the user can After following the merchant's official account, you can receive the configured cards and coupons. It is necessary to set the coupon ID, the validity time of delivery, etc.
Note: You need to create a coupon before you can get the coupon ID. The methods to create and obtain are:
1. Create on the public platform. Log in to the public platform, create a coupon in the coupon function plug-in, then select the coupon in the coupon list and click Details. You can get the coupon ID on the details page.
2. Call the "Create Voucher" interface of WeChat Voucher, set the voucher information, and obtain the voucher ID.
Interface call description
协议:https http请求方式: POST 请求URL: https://api.weixin.qq.com/bizwifi/couponput/set?access_token=ACCESS_TOKEN POST数据格式:JSON
Request parameter description
Parameter | Is it required | Description |
---|---|---|
access_token | Yes | Call interface credentials |
POST data | is | JSON data |
Field | Is it required? | Description |
---|---|---|
shop_id | Yes | Store ID, can be set to 0, indicating that all stores |
card_id | is | card ID |
card_describe | is the | card description, cannot exceed 18 characters |
start_time | is | The start time of card and coupon delivery (unit is second) |
end_time | is the end time of | card and coupon delivery (Unit is second) Note: It cannot exceed the validity period of the card |
card_quantity | is | Card coupon inventory |
Return data description
Example of correctly returning JSON data:
{ "errcode": 0, }
Query store coupons Delivery information
通过此接口查询某一门店的详细卡券投放信息,包括卡券投放状态,卡券ID,卡券的投放时间等信息。
接口调用说明
协议:https http请求方式: POST 请求URL: https://api.weixin.qq.com/bizwifi/couponput/get?access_token=ACCESS_TOKEN POST数据格式:JSON
请求参数说明
Parameter | Is it required | Description |
---|---|---|
access_token | Yes | Call interface credentials |
POST data | is | JSON data |
字段 | 是否必填 | 说明 |
---|---|---|
shop_id | 是 | 门店ID,可设置为0,表示所有门店 |
Return data description
Correctly returned JSON data example:
{ "errcode": 0, "data": { "shop_id": 429620, "card_status": 1, "card_id": "pBnTrjqf95sZLOxN5gf_EkHwyxiw", "card_describe": "10元代金券", "start_date": 1457712000, "end_date": 1457712000 } }
Field description:
start_time field | Description |
---|---|
shop_id | Store ID |
card_id | Card and coupon ID |
card_status | Card and coupon delivery status (0 means in effect, 1 means not in effect, 2 means has Expired) |
card_describe | Card and coupon description |
start_time | Card and coupon delivery start time (unit is seconds) |
end_time | End time of card delivery (unit is seconds) |