List the coupons of a template
GET
https://api-v2.test.eldowallet.fr/coupons/:id/passes
Returns the paginated list of coupons sent from a template. By default, only coupons with status active or expired are returned, newest first.
Good to know
- Without
status, onlyactiveandexpiredcoupons are returned. Deleted coupons are erased permanently and never appear in this list.
Request
path parameters
idstring requiredCoupon template ID.
query parameters
sortOrderstringSort order: `asc` (ascending) or `desc` (descending). Default: `desc`.enum:asc,descdefault:"desc"statusobjectCoupon status: `active`, `inactive`, `deleted`, `canceled` or `expired`. Repeat the parameter to filter on several statuses. Default: `active` and `expired`.createdAtStartstringOnly return coupons created on or after this date (ISO 8601, inclusive).searchstringPartial, case-insensitive search in `firstName`, `lastName`, `email` and `barcode`, and in the coupon ID and client ID.sortBystringField to sort by. Default: `createdAt`.default:"createdAt"limitnumberNumber of results per page, from 1 to 1000. Default: 10.default:10min: 1max: 1000pagenumberPage number to return, starting at 1. Default: 1.default:1min: 1
header parameters
x-langstringLanguage for responsesenum:en,frdefault:"en"
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Schema
application/jsondocsobject[] requiredtotalDocsnumber requiredlimitnumber requiredpagenumbertotalPagesnumber requiredpagingCounternumber requiredhasPrevPageboolean requiredhasNextPageboolean requiredprevPagenumbernextPagenumber
INVALID_PASS_KIND
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
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
MODEL_NOT_FOUND
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