# Count the coupons under my name
```javascript
WXAPI.couponStatistics(token)
```
+ token user login credentials
```json
{
"code": 0,
"data": {
"canFetch": 4,
"invalid": 1,
"used": 0,
"canUse": 1
},
"msg": "success"
}
```
+ canFetch the number of coupons that can be collected
+ invalid Number of coupons that have expired
+ used Number of coupons used
+ canUse the number of coupons that can be used
#mycoupon
```javascript
WXAPI.myCoupons({
token: '000',
status: '',
consumAmount: ''
})
```
+ token current user login credentials
+ status is not passed to get all status coupons. Coupon status: 0 normal 1 expired 2 expired and 3 used; if there are multiple statuses at the same time, please separate them with commas.
+ consumAmount The current consumption amount. If this parameter is passed, coupons that meet the usage conditions will be pulled; if this parameter is not passed, the amount will not be judged and all will be returned.
```json
{
"code": 0,
"data": [
{
"dateAdd": "2021-12-02 18:46:44",
"dateEnd": "2021-12-18 00:00:00",
"dateStart": "2021-12-02 18:46:44",
"id": 427331,
"money": 40,
"moneyHreshold": 3000,
"moneyType": 0,
"name": "New store discount",
"pid": 223,
"pwd": "",
"status": 0,
"statusStr": "Normal",
"type": ""
}
],
"msg": "success"
}
```
+ dateStart effective time
+ dateEnd expiration time
+ money Coupon denomination
+ moneyType 0 Fixed amount 1 Proportional deduction
+ moneyHreshold is the amount of money you need to spend before you can use it.
+ name Coupon name
+ pid coupon rule id
+ status Coupon status, please refer to statusStr