Create a transit pass
POST
https://api-v2.test.eldowallet.fr/transits/:transitId/passes
Creates a transit ticket for a traveller from a transit template and returns its ID, barcode and download link (downloadLink). With enableSendEmailOrSms: true, the ticket is also sent by email or SMS (email or phoneNumber).
Good to know
- The wallet must have the TRANSIT pass type enabled.
Request
path parameters
transitIdstring requiredTransit template ID (`_id`).
header parameters
x-langstringLanguage for responsesenum:en,frdefault:"en"
Body
application/json requireddepartureDatestring requiredISO 8601 calendar date (YYYY-MM-DD)example:2000-01-01arrivalDatestring requiredISO 8601 calendar date (YYYY-MM-DD)example:2000-01-01departureTimestring24-hour HH:mmpattern:^([0-1][0-9]|2[0-3]):[0-5][0-9]$example:00:00arrivalTimestring24-hour HH:mmpattern:^([0-1][0-9]|2[0-3]):[0-5][0-9]$example:01:00originStationCodestringmaxLength: 3example:strdestinationStationCodestringmaxLength: 3example:strexpirationDatestringexample:2000-01-01flightNumberstringgatestringseatstringoriginNamestringmaxLength: 13destinationNamestringmaxLength: 13tripNumberstringtarifstringcustomBackFieldsobject[]keystringAuto-generated server-side (slug derived from label + position index). Clients should NOT send this field — it is ignored and always regenerated.labelstring requiredvaluestring requiredtypeobject required
enableSendEmailOrSmsbooleandefault:falsefirstNamestring requiredlastNamestring requiredemailstring <email> requiredphoneNumberstringbarcodestring
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 500
- 503
Schema
application/json_idstring requireddownloadLinkstringnamestringbarcodestring
VALIDATION_ERROR · INVALID_JSON
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
BARCODE_ALREADY_EXISTS
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
PASS_BUILDER_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