Loading…

Get all available coupons

```javascript WXAPI.coupons({ type: 'optional parameter' }) ``` + type optional parameter, if passed, only coupons of this type will be returned + token Current user login credentials, optional parameters, if passed, coupons that do not meet the requirements for collection will not be returned + shopId store ID, multiple stores separated by commas + ids search in batches based on rule IDs, separate multiple IDs with commas Return example: ```json { "code": 0, "data": [ { "batchSendUid": -1, "dateAdd": "2020-10-22 22:41:55", "dateEndDays": 30, "dateEndType": 1, "dateStartType": 1, "dateUpdate": "2021-08-31 19:52:26", "id": 8488, "moneyHreshold": 0, "moneyMax": 10, "moneyMin": 5, "moneyType": 1, "name": "Test Proportional Coupon", "needAmount": 0, "needScore": 0, "needSignedContinuous": 0, "numberGit": 8, "numberGitNumber": 1, "numberLeft": 892, "numberPersonMax": 10, "numberTotle": 900, "numberUsed": 0, "pwd": "Y", "sendBirthday": false, "sendInviteM": false, "sendInviteS": false, "sendRegister": false, "showInFront": true, "status": 0, "statusStr": "Normal" } ], "msg": "success" } ``` + moneyType 0 digit fixed amount; 1 is proportional deduction + moneyHreshold How much amount is available + moneyMin and moneyMax are the amount or proportion of the coupons that can be received. If the two words are the same, they are fixed values. Otherwise, they are random within this range. + name Coupon name + needAmount How much money needs to be paid to receive the coupon (similar to buying a coupon) + needScore How many points need to be paid to receive this coupon (similar to redeeming coupons with points) + needSignedContinuous To receive this coupon, how many consecutive days do you need to sign in before you can receive it? + pwd Y represents, this is a password coupon, you need to provide the correct password when receiving it