# Get a list of user coupons
# Dxplaination of Interface Call Request
http请求方式:POST
https://api.weixin.qq.com/product/coupon/get_user?access_token=xxxxxxxxx
# Example of request parameters
{
"openid": "I_AM_JUST_AN_EXAMPLE",
"status": 100
}
# Examples of back-up
{
"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
}
]
}
# Dxplaination of request parameters
参数 | type | Is it compulsory? | Introductions |
---|---|---|---|
openid | string | yes | User openid |
status | number | no | Coupon status. Get all coupons when not filled in. Get a specific status coupon when filled in |
# Dxplaination of callback parameters
参数 | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Error message,errcode is 0 does not return |
user_coupon_list[].coupon_id | number | Coupon |
user_coupon_list[].status | string | Coupon Status |
user_coupon_list[].create_time | string | Coupon issuance time |
user_coupon_list[].update_time | string | Coupon updated when |
user_coupon_list[].start_time | string | When the coupon goes into effect |
user_coupon_list[].end_time | string | Expiry time of coupon |
user_coupon_list[].ext_info.use_time | string | Coupon Cancellation Timeline |
user_coupon_list[].order_id | number | Order id used by the coupon |
user_coupon_list[].discount_fee | number | Coupon Amount |
# Enumeration - status
枚举字段 | The enumeration value | describe |
---|---|---|
COUPON_USER_STATUS_VALID | 100 | Entering into force |
COUPON_USER_STATUS_EXPIRED | 101 | It has expired. |
COUPON_USER_STATUS_USED | 102 | Used |
# Return code
返回码 | Error Type |
---|---|
-1 | System exceptions |
-2 | Token too long |
109137 | OpenID format is incorrect or illegal |
9401020 | The parameter is incorrect. |