List the passes of a hotel
GET
https://api-v2.test.eldowallet.fr/hotels/:id/passes
Returns the paginated list of the booking passes issued for a hotel, with filters on status and creation date, and a text search.
Good to know
- Without
status, passes of every status are returned, including canceled bookings (canceled). For a pass linked to a client,firstName,lastName,emailandphoneNumbershow the client's current data.
Request
path parameters
idstring requiredHotel ID (24-character hexadecimal MongoDB ID).
query parameters
sortOrderstringSort order: `asc` or `desc`. Default: `desc`.enum:asc,descdefault:"desc"statusobjectFilter by pass status: `active`, `inactive`, `deleted`, `canceled` or `expired`. Repeat the parameter to filter on several statuses.createdAtStartstringOnly returns items created on or after this date (ISO 8601, inclusive).searchstringCase-insensitive search on `firstName`, `lastName`, `email`, `barcode`, the pass ID or the client ID.sortBystringField to sort by. Default: `createdAt`.default:"createdAt"limitnumberNumber of items per page, from 1 to 1000. Default: `10`.default:10min: 1max: 1000pagenumberPage number, 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