# Get a list of coupons
# Dxplaination of Interface Call Request
Http request method: POST
https://api.weixin.qq.com/product/coupon/get_list?access_token=xxxxxxxxx
# Example of request parameters
{
"start_create_time": "2020-03-25 12:05:25",
"end_create_time": "2020-04-25 12:05:25",
"status": 2,
"page": 1,
"page_size": 10
}
# Examples of back-up
{
"errcode": 0,
"errmsg": "ok",
"coupons":
[
{
"coupon_id": 123,
"type": 1,
"status": 1,
"create_time": "2020-05-30 00:00:00",
"update_time": "2020-05-30 12:00:00",
"coupon_info":
{
"name": "Dresses of 100-50,"
"valid_info":
{
"valid_type": "COUPON_VALID_TYPE_TIME", // An enumeration field See the following table for the meaning
"valid_day_num": 0 //valid_It only makes sense when type = 2
"start_time": "2020-06-01 00:00:00" //valid_It only makes sense when type = 1
"end_time": "2020-07-01 00:00:00" //valid_It only makes sense when type = 1
},
"promote_info":
{
"promote_type": "PROMOTE_TYPE_SHOP", // An enumeration field See the following table for the meaning
"customize_channel": "xxxx" //Custom promotion channel specific content, promote_It only makes sense when type = 2
},
"discount_info": {
"discount_condition": {
"product_price " : 10000,
"product_ids": []
},
"discount_fee": 600
}
},
"stock_info":
{
"issued_num": 100,
"receive_num": 100,
"used_num": 100
}
}
],
"total_num": 10
}
# Dxplaination of request parameters
parameter | type | Is it compulsory? | Introductions |
---|---|---|---|
start_create_Time | string | yes | Search Start Time for Coupon Creation Time |
end_create_Time | string | yes | Search end time when a coupon was created |
status | number | yes | Coupon Status |
Page | number | yes | What Page (Minimum Fill 1) |
Page_Size | number | yes | Number of pages per page(No more than 200) |
# Dxplaination of callback parameters
parameter | type | Introductions |
---|---|---|
Error code | number | Error code |
errmsg | string | Error message |
coupons[].coupon_id | number | Coupon |
coupons[].type | number | Types of coupons |
coupons[].status | number | Coupon Status |
coupons[].create_Time | string | Coupon creation time |
coupons[].update_Time | string | Coupon updated when |
coupons[].coupon_info.name | string | Coupon Name |
coupons[].coupon_info.valid_info.valid_type | string | For the type of coupon validity period, see the table below |
coupons[].coupon_info.valid_info.valid_day_num | number | Number of days the coupon is valid, valid_It only makes sense when type = 2 |
coupons[].coupon_info.valid_info.start_Time | string | Coupon Validity Start time, valid_It only makes sense when type = 1 |
coupons[].coupon_info.valid_info.end_Time | string | Coupon Validity End Time, valid_It only makes sense when type = 1 |
coupons[].coupon_info.promote_info.promote_type | string | For the type of promotion, see the table below |
coupons[].coupon_info.promote_info.customize_channel | string | Custom promotion channel specific content, promote_It only makes sense when type = 2 |
coupons[].stock_info.issued_num | number | Coupon surplus |
coupons[].stock_info.receive_num | number | Amount of coupons received |
coupons[].stock_info.used_num | number | Coupons have been used |
coupons[].coupon_info.discount_info.discount_num | number | Number of coupon discounts * 1000, for example 5.1 Fold -> 5100 |
coupons[].coupon_info.discount_info.discount_fee | number | The coupon reduces the amount, Unit units, For example, 0.5 yuan -> 50 |
coupons[].coupon_info.discount_info.discount_condition.product_CNT | number | Conditions of use of coupons, Full x items available |
coupons[].coupon_info.discount_info.discount_condition.product_price | number | Conditions of use of coupons, Price full x available, unit points |
coupons[].coupon_info.discount_info.discount_condition.product_ids[] | number array | Conditions of use of coupons, Specify item id available |
coupons[].coupon_info.ext_info.invalid_Time | string | Expiry time of coupon |
coupons[].coupon_info.ext_info.jump_product_id | number | The product id of the jump after the product discount coupon is received |
coupons[].coupon_info.ext_info.notes | string | Note information |
coupons[].coupon_info.ext_info.valid_Time | string | When the coupon is valid |
coupons[].coupon_info.receive_info.end_Time | string | Coupon Acceptance End Time |
coupons[].coupon_info.receive_info.limit_num_one_person | number | Limit on number of tickets per person |
coupons[].coupon_info.receive_info.start_Time | string | Coupon Acceptance Start Time |
coupons[].coupon_info.receive_info.total_num | number | Total number of coupons received |
total_num | number | Total number of coupons |
# Enumeration - type
The enumeration value | describe |
---|---|
1 | Product conditions discount coupons |
2 | Product full coupons reduced |
3 | Uniform discount coupons for goods |
4 | Product direct coupons |
101 | Shop conditions Discount vouchers |
102 | Shops are full of coupons. |
103 | Uniform store discount coupons |
104 | Shop direct discount coupons |
# Enumeration - status
The enumeration value | describe |
---|---|
1 | Not in effect, in edit |
2 | Take effect |
3 | It has expired. |
4 | It has been invalidated. |
5 | delete |
200 | Be overdue or Invalidated coupons |
# Enumeration - promote_type
Enumerate field names | The enumeration value | describe |
---|---|---|
PROMOTE_TYPE_SHOP | 1 | In-store promotion |
PROMOTE_TYPE_CUSTOMIZE | 2 | Custom Promotion Channels |
PROMOTE_TYPE_TARGET | 3 | Targeted Offers |
# Enumeration - valid _type
Enumerate field names | The enumeration value | describe |
---|---|---|
COUPON_VALID_TYPE_TIME | 1 | Specify a time period for a product |
COUPON_VALID_TYPE_DAY | 2 | Number of days in effect |
# Return code
Return code | Error Type |
---|---|
-1 | System exceptions |
-2 | Token too long |
9401020 | The parameter is incorrect. |