List the coupons of a client
GET
https://api-v2.test.eldowallet.fr/coupons/clients/:clientId/passes
Searches sent coupons using the value passed in clientId: coupons whose barcode equals this value, or whose first name, last name or email contains it. Only coupons with status active or expired are returned.
Request
path parameters
clientIdstring requiredValue to search for (24-character hexadecimal ObjectId).
query parameters
sortOrderstringCommon coupon-list parameter; this route does not use it to sort results.enum:asc,descdefault:"desc"statusobjectCoupon status: `active`, `inactive`, `deleted`, `canceled` or `expired`. Default: `active` and `expired`.createdAtStartstringCommon coupon-list parameter; this route does not use it as a date filter.searchstringCommon coupon-list parameter; this route does not use it as a free-text search.sortBystringCommon coupon-list parameter; this route does not use it to sort results.default:"createdAt"limitnumberEchoed in the `limit` field of the response. This route returns all results in `docs`, without splitting them into pages.default:10min: 1max: 1000pagenumberEchoed in the `page` field of the response. This route returns all results in `docs`, without splitting them into pages.default:1min: 1
header parameters
x-langstringLanguage for responsesenum:en,frdefault:"en"
Responses
- 200
- 401
- 403
- 500
Schema
application/jsondocsobject[] requiredtotalDocsnumber requiredlimitnumber requiredpagenumbertotalPagesnumber requiredpagingCounternumber requiredhasPrevPageboolean requiredhasNextPageboolean requiredprevPagenumbernextPagenumber
UNAUTHORIZED
Schema
application/jsonmessagestring requiredexample:Promo code already existserrorCodestring requiredexample:400:PROMO_CODE_ALREADY_EXISTSpathstring requiredexample:/couponsdatestring <date-time> requireddetailsobjectvalidationErrorsobject[]fieldstringexample:emailmessagestringexample:email must be an email
FORBIDDEN
Schema
application/jsonmessagestring requiredexample:Promo code already existserrorCodestring requiredexample:400:PROMO_CODE_ALREADY_EXISTSpathstring requiredexample:/couponsdatestring <date-time> requireddetailsobjectvalidationErrorsobject[]fieldstringexample:emailmessagestringexample:email must be an email
UNKNOWN_ERROR
Schema
application/jsonmessagestring requiredexample:Promo code already existserrorCodestring requiredexample:400:PROMO_CODE_ALREADY_EXISTSpathstring requiredexample:/couponsdatestring <date-time> requireddetailsobjectvalidationErrorsobject[]fieldstringexample:emailmessagestringexample:email must be an email