WeChat card and coupon delivery


Set store card and coupon delivery information

1475897626347314.jpg

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

##

POST data

Data example:

{
  "shop_id":429620
  "card_id":"pBnTrjvZJXkZsPGwfq9F0Hl0WqE",
  "card_describe":"10元代金券",
  "start_time":1457280000,
  "end_time":1457712000,
  "card_quantity":10
}

Field description:

ParameterIs it requiredDescription
access_tokenYesCall interface credentials
POST data isJSON data
FieldIs it required?Description
shop_idYes 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

请求参数说明

##

POST data

Data example:

{
  "shop_id":429620
}

Field description:

ParameterIs it requiredDescription
access_tokenYesCall interface credentials
POST data isJSON 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 fieldDescription
shop_idStore ID
card_idCard and coupon ID
card_statusCard and coupon delivery status (0 means in effect, 1 means not in effect, 2 means has Expired)
card_describeCard and coupon description
start_timeCard and coupon delivery start time (unit is seconds)
end_timeEnd time of card delivery (unit is seconds)