# Get a list of user coupons
# Interface call request specification
Http request method: POST
https://api.weixin.qq.com/product/coupon/get_user?access_token=xxxxxxxxx
# Request Parameter Sample
{
"openid": "I_AM_JUST_AN_EXAMPLE",
"status": 100
}
# Return Package Example
{
"errcode": 0,
"user_coupon_list":
[
{
"coupon_id": 12639900,
"status": "COUPON_USER_STATUS_VALID",
"create_time": "2020-05-30 00:00:00",
"update_time": "2020-05-30 12:00:00",
"start_time": "2020-05-30 18:00:00",
"end_time": "2020-05-30 20:00:00",
"ext_info":
{
"use_time": "2020-05-30 19:00:00"
},
"order_id": 123,
"discount_fee": 123
}
]
}
# Request Parameter Dxplaination
parameter | type | Is it necessary to fill out | Introductions |
---|---|---|---|
openid | string | yes | User openid |
status | number | no | Coupon status, get all coupons when not filled, get a specific status coupon when filled |
# Return parameter specification
parameter | type | Introductions |
---|---|---|
Errcode | number | Error code |
errmsg | string | Error message,Errcode No return for 0 |
user_coupon_list[].coupon_id | number | Coupon |
user_coupon_list[].status | string | Coupon status |
user_coupon_list[].create_time | string | Coupon Distribution Time |
user_coupon_list[].update_time | string | Coupon Renewal Time |
user_coupon_list[].start_time | string | Coupon Effective Time |
user_coupon_list[].end_time | string | Coupon Expiration Time |
user_coupon_list[].ext_info.use_time | string | Coupon verification time |
user_coupon_list[].order_id | number | Order id used for coupons |
user_coupon_list[].discount_fee | number | Coupon amount |
# Enumerate - status
Enumeration field | Enumeration value | describe |
---|---|---|
COUPON_USER_STATUS_VALID | 100 | In force |
COUPON_USER_STATUS_EXPIRED | 101 | Expired |
COUPON_USER_STATUS_USED | 102 | Used |
# Return code
Return code | Type of error |
---|---|
-1 | System exception |
-2 | Token is too long |
9401020 | Wrong parameter |