Créer un pass de transport
POST
https://api-v2.test.eldowallet.fr/transits/:transitId/passes
Crée un titre de transport pour un voyageur à partir d'un modèle de transport et renvoie son identifiant, son code-barres et son lien de téléchargement (downloadLink). Avec enableSendEmailOrSms: true, le titre est aussi envoyé par e-mail ou SMS (email ou phoneNumber).
À retenir
- Le wallet doit avoir le type de pass TRANSIT activé.
Requête
path parameters
transitIdstring requiredIdentifiant du modèle de transport (`_id`).
header parameters
x-langstringLangue des messages d'erreur et des textes renvoyés : `fr` ou `en`.enum:en,frdefault:"en"
Body
application/json requireddepartureDatestring requiredDate calendaire ISO 8601 (`YYYY-MM-DD`).example:2000-01-01arrivalDatestring requiredDate calendaire ISO 8601 (`YYYY-MM-DD`).example:2000-01-01departureTimestringHeure au format 24 h (`HH:mm`).pattern:^([0-1][0-9]|2[0-3]):[0-5][0-9]$example:00:00arrivalTimestringHeure au format 24 h (`HH:mm`).pattern:^([0-1][0-9]|2[0-3]):[0-5][0-9]$example:01:00originStationCodestringmaxLength: 3example:strdestinationStationCodestringmaxLength: 3example:strexpirationDatestringexample:2000-01-01flightNumberstringgatestringseatstringoriginNamestringmaxLength: 13destinationNamestringmaxLength: 13tripNumberstringtarifstringcustomBackFieldsobject[]keystringGénérée côté serveur (slug dérivé du libellé et de la position). N'envoyez pas ce champ : il est ignoré et toujours régénéré.labelstring requiredvaluestring requiredtypeobject required
enableSendEmailOrSmsbooleandefault:falsefirstNamestring requiredlastNamestring requiredemailstring <email> requiredphoneNumberstringbarcodestring
Réponses
- 201
- 400
- 401
- 403
- 404
- 409
- 500
- 503
Schéma
application/json_idstring requireddownloadLinkstringnamestringbarcodestring
VALIDATION_ERROR · INVALID_JSON
Schéma
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
Schéma
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
Schéma
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
Schéma
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
Schéma
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
Schéma
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
Schéma
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