This API is used to set card/coupon issuance information for a store. When this API is called, users can follow a merchant's Official Account and claim the configured card/coupon when connecting to a Wi-Fi network. The card/coupon ID and validity period of issuance must be set.
Note: You must create a card/coupon to get the card/coupon ID by following either of the methods below:
Log in to the Official Accounts Platform and create a card/coupon in the Cards & Offers plug-in. Select the card/coupon in the list and click details to get the card/coupon ID.
Call the "Create Card/Coupon" API, set the card/coupon information, and get the card/coupon ID.
API Request Format
Protocol: HTTPS
HTTP request method: POST
Request URL: https://api.weixin.qq.com/bizwifi/couponput/set?access_token=ACCESS_TOKEN
POST data format: JSON
Request Parameters
Parameter | Required | Description |
---|---|---|
access_token | Yes | The credential for calling the API |
POST data | Yes | JSON data |
POST Data
Example:
{
"shop_id":429620
"card_id":"pBnTrjvZJXkZsPGwfq9F0Hl0WqE",
"card_describe":"10-CNY Cash Coupon",
"start_time":1457280000,
"end_time":1457712000
}
Fields:
Field | Required | Description |
---|---|---|
shop_id | Yes | Store ID. It can be set to 0, indicating all stores. |
card_id | Yes | Card/Coupon ID |
card_describe | Yes | Card/Coupon description, with a maximum length of 18 characters. |
start_time | Yes | Start time of card/coupon issuance (in sec) |
end_time | Yes | End time of card/coupon issuance (in sec). Note that this value must be within the validity period of the card/coupon. |
Response
The JSON data returned for a successful request:
{
"errcode": 0,
}