# Get a list of coupons

# Dxplaination of Interface Call Request

http请求方式: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": "服饰满100-50",
                "valid_info": 
                {
                    "valid_type": "COUPON_VALID_TYPE_TIME",  // 枚举字段 含义见下表
                    "valid_day_num": 0                      //valid_type=2时才有意义
                    "start_time": "2020-06-01 00:00:00"     //valid_type=1时才有意义
                    "end_time": "2020-07-01 00:00:00"       //valid_type=1时才有意义
                },
                "promote_info":
                {
                    "promote_type": "PROMOTE_TYPE_SHOP",       // 枚举字段 含义见下表
                    "customize_channel": "xxxx" //自定义推广渠道具体内容,promote_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

参数 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

参数 type Introductions
errcode 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 The number of days the coupon is valid, valid_type = 2 is meaningful
coupons[].coupon_info.valid_info.start_time string Coupon validity start time, valid_type = 1 is meaningful
coupons[].coupon_info.valid_info.end_time string Valid_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_type = 2 when it makes sense
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, e.g. 5.1 off - 5100
coupons[].coupon_info.discount_info.discount_fee number The coupon reduces the amount, in units, such as 0.5 yuan - > 50
coupons[].coupon_info.discount_info.discount_condition.product_cnt number Coupon conditions, full x items available
coupons[].coupon_info.discount_info.discount_condition.product_price number Coupon conditions of use, price full x available, unit points
coupons[].coupon_info.discount_info.discount_condition.product_ids[] number array Voucher conditions of use, specified product 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 receiving the discount coupon
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

枚举值 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

枚举值 describe
1 Not in effect, in edit
2 Take effect
3 It has expired.
4 It has been invalidated.
5 delete
200 Expired or voided vouchers

# Enumeration - promote_type

枚举字段名 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

枚举字段名 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

返回码 Error Type
-1 System exceptions
-2 Token too long
9401020 The parameter is incorrect.