Aller au contenu principal

Créer un pass d'événement

POST

https://api-v2.test.eldowallet.fr/events/:id/passes

Crée un billet pour un événement, soit pour un client existant (clientId), soit pour un porteur qui n'est pas client (firstName, lastName, email). Renvoie le pass créé, avec son lien court d'installation.

À retenir
  • Envoyez clientId pour un client existant, sinon firstName, lastName et email. Chaque rangée (leftRow, centerRow, rightRow) est obligatoire tant que l'événement n'a pas réglé l'alignement correspondant (PKTextAlignmentLeft, PKTextAlignmentCenter, PKTextAlignmentRight) sur INACTIVE (LEFT_ROW_IS_REQUIRED, CENTER_ROW_IS_REQUIRED, RIGHT_ROW_IS_REQUIRED). barcode doit être unique au sein de l'événement (BARCODE_ALREADY_EXISTS) ; le billet est ensuite envoyé au porteur selon les réglages d'envoi du wallet.

Requête​

path parameters
  • id string required
    Identifiant de l'événement (ID MongoDB de 24 caractères hexadécimaux).
header parameters
  • x-lang string
    Langue des messages d'erreur et des textes renvoyés : `fr` ou `en`.
    enum: en, frdefault: "en"
Body application/json required
  • firstName string required
  • lastName string required
  • email string <email> required
  • phoneNumber string
  • barcode string
  • leftRow string
  • centerRow string
  • rightRow string
  • clientId string

Réponses​

Schéma application/json
  • hotel oneOf required
    • Hotel
      • wallet oneOf required
        • Wallet
          • name string required
          • logo string required
          • icon string required
          • androidLogo string
          • displayIdentifiant boolean required
          • passBuilderPassTemplateId string
          • passBuilderBusinessId string
          • passBuilderToken string
          • identifier string required
          • identifierQr string required
          • address string
          • website string required
          • servicePhone string required
          • businessPhone string required
          • socialMedia object required
            • linkedin string
            • facebook string
            • instagram string
            • tiktok string
            • twitter string
            • youtube string
            • snapchat string
            • pinterest string
            • reddit string
            • whatsapp string
            • telegram string
          • additionalContacts object[] required
            • title string required
            • value string required
            • kind string requiredenum: URL, PHONE, EMAIL
          • termsAndConditions object required
            • type string requiredenum: PDF, URL, NONE
            • customUrl string
            • pdfUrl string
          • webHookUrl string required
          • rootDomain string required
          • timezone string
          • allowedPasses string[] requiredenum: ALL, EVENT_TICKET, TRANSIT, CINEMA, BOARDING_PASS, COUPON, GENERIC, STORE_CARD, OFFER, HOTEL
          • expiredCleanupEnabled boolean required
          • _id string required
          • createdAt string <date-time> required
          • updatedAt string <date-time> required
        • option 2
      • title string required
      • hotelName string
      • description string
      • strip string
      • code string
      • advantages string[] required
      • colors object
        • labelColor string required
        • backgroundColor string required
        • foregroundColor string required
      • barcodeFormat stringenum: AZTEC, CODE_128, PDF_417, QR_CODE, NONE
      • passBuilderPassTemplateId string
      • location object
        • longitude number
        • latitude number
        • relevantName string
        • relevantAddress string
      • _id string required
      • createdAt string <date-time> required
      • updatedAt string <date-time> required
    • option 2
  • client oneOf
    • Client
      • wallet string
      • clientType oneOf
        • ClientType
          • storeCard oneOf required
            • StoreCard
            • option 2
          • name string required
          • isDefault boolean required
          • _id string required
          • createdAt string <date-time> required
          • updatedAt string <date-time> required
        • option 2
      • source string requiredenum: CRM, INTERNAL, EXTERNAL
      • barcode string
      • firstName string required
      • lastName string required
      • email string
      • companyName string
      • renewalDate string <date-time>
      • phoneNumber string
      • birthDate string <date-time>
      • admissionDate string <date-time>
      • gain number
      • gainHistory object[]
        • gain number required
        • date string <date-time> required
      • communicationPreferences object[]
        Préférences de communication de ce client, par événement et par canal, qui priment sur les règles du wallet (gestion des consentements RGPD). Même structure que `WalletSetting.communicationRules`. L'absence d'entrée pour un `notificationType` donné signifie que la communication est activée, comme pour `isCommunicationRuleEnabled`. L'historique des modifications n'est volontairement pas inclus ici (voir `CommunicationPreferenceLog`), afin de garder ce document, très souvent lu, léger.
        • notificationType string requiredenum: NEW_LOYALTY, UPDATE_LOYALTY, REMINDER_LOYALTY, EARNINGS_UPDATE, NEW_COMMUNICATION, EXPIRED_COMMUNICATION, NEW_EVENT, UPDATE_EVENT, NEW_COUPON, UPDATE_COUPON, WELCOME_INTERNAL_CLIENTS, WELCOME_CRM_CLIENTS, WELCOME_EXTERNAL_CLIENTS, WELCOME_COUPON, EXPIRED_COUPON, TRANSIT_TICKET, UPDATE_TRANSIT, HOTEL_RESERVATION, UPDATE_HOTEL_RESERVATION, CINEMA_TICKET
        • sms boolean required
        • email boolean required
        • notification boolean required
      • pushInformativeEnabled boolean
        Désinscription des campagnes de notifications push « standard » créées par un gestionnaire et classées comme informatives.
      • pushCommercialEnabled boolean
        Désinscription des campagnes de notifications push « standard » créées par un gestionnaire et classées comme commerciales.
      • _id string required
      • createdAt string <date-time> required
      • updatedAt string <date-time> required
    • option 2
  • transit oneOf
    • Transit
      • wallet oneOf required
        • Wallet
          • name string required
          • logo string required
          • icon string required
          • androidLogo string
          • displayIdentifiant boolean required
          • passBuilderPassTemplateId string
          • passBuilderBusinessId string
          • passBuilderToken string
          • identifier string required
          • identifierQr string required
          • address string
          • website string required
          • servicePhone string required
          • businessPhone string required
          • socialMedia object required
            • linkedin string
            • facebook string
            • instagram string
            • tiktok string
            • twitter string
            • youtube string
            • snapchat string
            • pinterest string
            • reddit string
            • whatsapp string
            • telegram string
          • additionalContacts object[] required
            • title string required
            • value string required
            • kind string requiredenum: URL, PHONE, EMAIL
          • termsAndConditions object required
            • type string requiredenum: PDF, URL, NONE
            • customUrl string
            • pdfUrl string
          • webHookUrl string required
          • rootDomain string required
          • timezone string
          • allowedPasses string[] requiredenum: ALL, EVENT_TICKET, TRANSIT, CINEMA, BOARDING_PASS, COUPON, GENERIC, STORE_CARD, OFFER, HOTEL
          • expiredCleanupEnabled boolean required
          • _id string required
          • createdAt string <date-time> required
          • updatedAt string <date-time> required
        • option 2
      • barcodeFormat string requiredenum: AZTEC, CODE_128, PDF_417, QR_CODE, NONE
      • terms string required
      • emailSubscriptionMessage string
      • subscriptionMessage string
      • locations object[]
        • longitude number
        • latitude number
        • relevantName string
        • relevantAddress string
      • colors object required
        • labelColor string required
        • backgroundColor string required
        • foregroundColor string required
      • strip string
      • customerServiceNumber string
      • originStationCode string required
      • originName string required
      • destinationStationCode string required
      • destinationName string required
      • departureTime string required
      • arrivalTime string required
      • tarif string
      • details string required
      • number string required
      • type string requiredenum: Bus, Boat, Train, Air, Generic, Tram
      • gateName stringenum: N_CABINE, N_VOYAGE, PLAQUE
      • seatName stringenum: N_CABINE, N_VOYAGE, PLAQUE
      • security object
        • enableOneTimeUse boolean
        • disableIOSPassSharing boolean
        • disablePassLinkSharing boolean
        • disableMultipleHolders boolean
        • enableSecurityAnimation boolean
        • enableRotatingBarcode boolean
      • passBuilderPassTemplateId string
      • customBackFields string[]
        Définitions des champs de verso au niveau du modèle (clé, libellé et type). Les valeurs propres à chaque pass sont stockées sur le pass.
      • displayOptions object
        • hideTarif boolean
        • hideStationCodes boolean
        • hideTripNumber boolean
      • iosHeader object
        • labelEnum string requiredenum: FULLNAME, CUSTOM_TEXT, TRIP_NUMBER, INACTIVE
        • valueEnum string requiredenum: FULLNAME, CUSTOM_TEXT, TRIP_NUMBER, INACTIVE
        • customLabel string
        • customValue string
      • _id string required
      • createdAt string <date-time> required
      • updatedAt string <date-time> required
    • option 2
  • event oneOf
    • Event
      • status string requiredenum: PENDING, ACTIF, ENDEDdefault: "PENDING"
        • wallet oneOf required
          • Wallet
            • name string required
            • logo string required
            • icon string required
            • androidLogo string
            • displayIdentifiant boolean required
            • passBuilderPassTemplateId string
            • passBuilderBusinessId string
            • passBuilderToken string
            • identifier string required
            • identifierQr string required
            • address string
            • website string required
            • servicePhone string required
            • businessPhone string required
            • socialMedia object required
              • linkedin string
              • facebook string
              • instagram string
              • tiktok string
              • twitter string
              • youtube string
              • snapchat string
              • pinterest string
              • reddit string
              • whatsapp string
              • telegram string
            • additionalContacts object[] required
              • title string required
              • value string required
              • kind string requiredenum: URL, PHONE, EMAIL
            • termsAndConditions object required
              • type string requiredenum: PDF, URL, NONE
              • customUrl string
              • pdfUrl string
            • webHookUrl string required
            • rootDomain string required
            • timezone string
            • allowedPasses string[] requiredenum: ALL, EVENT_TICKET, TRANSIT, CINEMA, BOARDING_PASS, COUPON, GENERIC, STORE_CARD, OFFER, HOTEL
            • expiredCleanupEnabled boolean required
            • _id string required
            • createdAt string <date-time> required
            • updatedAt string <date-time> required
          • option 2
        • barcodeType string requiredenum: AZTEC, CODE_128, PDF_417, QR_CODE, NONE
        • name string required
        • locations object[] required
          • longitude number
          • latitude number
          • address string
          • locationName string
        • date object
          • startDate string <date-time>
          • endDate string <date-time>
          • doorOpeningHour string <date-time>
        • price number
        • gainUnit stringenum: NONE, EURO, USD, MAD, POINTS
        • description string
        • terms string
        • subscriptionMessage string required
        • emailSubscriptionMessage string required
        • contactPhone string
        • email string
        • website string
        • colors object required
          • labelColor string required
          • backgroundColor string required
          • foregroundColor string required
        • security object
          • enableOneTimeUse boolean
          • disableIOSPassSharing boolean
          • disablePassLinkSharing boolean
          • disableMultipleHolders boolean
          • enableSecurityAnimation boolean
          • enableRotatingBarcode boolean
        • passBuilderPassTemplateId string
        • strip string
        • PKTextAlignmentLeft stringenum: CHAIR, ACCESS, PRICE, ZONE, INACTIVE
        • PKTextAlignmentCenter stringenum: ROW, INACTIVE
        • PKTextAlignmentRight stringenum: INACTIVE, TYPE, SEAT, PLACE, ARMCHAIR, LOCATION, PORT
        • _id string required
        • createdAt string <date-time> required
        • updatedAt string <date-time> required
      • option 2
    • storeCard oneOf
      • StoreCard
        • wallet oneOf required
          • Wallet
            • name string required
            • logo string required
            • icon string required
            • androidLogo string
            • displayIdentifiant boolean required
            • passBuilderPassTemplateId string
            • passBuilderBusinessId string
            • passBuilderToken string
            • identifier string required
            • identifierQr string required
            • address string
            • website string required
            • servicePhone string required
            • businessPhone string required
            • socialMedia object required
              • linkedin string
              • facebook string
              • instagram string
              • tiktok string
              • twitter string
              • youtube string
              • snapchat string
              • pinterest string
              • reddit string
              • whatsapp string
              • telegram string
            • additionalContacts object[] required
              • title string required
              • value string required
              • kind string requiredenum: URL, PHONE, EMAIL
            • termsAndConditions object required
              • type string requiredenum: PDF, URL, NONE
              • customUrl string
              • pdfUrl string
            • webHookUrl string required
            • rootDomain string required
            • timezone string
            • allowedPasses string[] requiredenum: ALL, EVENT_TICKET, TRANSIT, CINEMA, BOARDING_PASS, COUPON, GENERIC, STORE_CARD, OFFER, HOTEL
            • expiredCleanupEnabled boolean required
            • _id string required
            • createdAt string <date-time> required
            • updatedAt string <date-time> required
          • option 2
        • cardType string requiredenum: STORE_CARD, MEMBER_CARD
        • displayIdentifiant boolean required
        • displayWalletName boolean
        • strip string required
        • passBuilderPassTemplateId string
        • programName string
        • keysHasChanged string[]
        • startRow stringenum: CREATION_DATE, EXPIRATION_DATE, BIRTHDATE, GAIN, CLUB, ASSOCIATION, ORGANISATION, ENTREPRISE, N_LICENCE, N_ADHERENT, N_MEMBER, MEMBER, N_IMMATRICULATION, INACTIVE, ADMISSION_DATE
        • middleRow stringenum: CREATION_DATE, EXPIRATION_DATE, BIRTHDATE, GAIN, CLUB, ASSOCIATION, ORGANISATION, ENTREPRISE, N_LICENCE, N_ADHERENT, N_MEMBER, MEMBER, N_IMMATRICULATION, INACTIVE, ADMISSION_DATE
        • endRow stringenum: CREATION_DATE, EXPIRATION_DATE, BIRTHDATE, GAIN, CLUB, ASSOCIATION, ORGANISATION, ENTREPRISE, N_LICENCE, N_ADHERENT, N_MEMBER, MEMBER, N_IMMATRICULATION, INACTIVE, ADMISSION_DATE
        • iosHeader object
          • labelEnum string requiredenum: TYPE, GAIN, FULLNAME, CUSTOM_TEXT, INACTIVE
          • valueEnum string requiredenum: TYPE, GAIN, FULLNAME, CUSTOM_TEXT, INACTIVE
          • customLabel string
          • customValue string
        • barcodeType string requiredenum: AZTEC, CODE_128, PDF_417, QR_CODE, NONE
        • descriptions object[] required
          • title string required
          • value string required
        • openingHours string required
        • colors object required
          • labelColor string required
          • backgroundColor string required
          • foregroundColor string required
        • oneTimeToUse boolean required
        • sharingProhibited boolean required
        • sharingProhibitedAndroid boolean required
        • validity object required
          • expirationType string requiredenum: NO_EXPIRATION, AT_DATETIME, AFTER_PERIOD
          • expirationDate string <date-time>
          • expirationAfterPeriod string
          • expirationPeriodType stringenum: YEARS, MONTHS, WEEKS
          • expirationOption stringenum: AT_CREATION_DATE, END_OF_MONTH
        • gainLabel string requiredenum: GAIN, GAINS, CAGNOTE, POINTS
        • gainUnit string requiredenum: NONE, EURO, USD, MAD, POINTS
        • offerLabel string required
        • enableDisplayIdentifiant boolean required
        • gainFormatMigrated boolean required
          Indique si le modèle PassBuilder et tous les passes existants ont été migrés vers le nouveau format de gain, où le symbole de l'unité est intégré à la valeur de l'attribut du pass (par exemple « 50 Pts ») plutôt qu'au champ du modèle. `false` (ou absent) signifie que l'ancien format est toujours utilisé.
        • _id string required
        • createdAt string <date-time> required
        • updatedAt string <date-time> required
      • option 2
    • wallet oneOf
      • Wallet
        • name string required
        • logo string required
        • icon string required
        • androidLogo string
        • displayIdentifiant boolean required
        • passBuilderPassTemplateId string
        • passBuilderBusinessId string
        • passBuilderToken string
        • identifier string required
        • identifierQr string required
        • address string
        • website string required
        • servicePhone string required
        • businessPhone string required
        • socialMedia object required
          • linkedin string
          • facebook string
          • instagram string
          • tiktok string
          • twitter string
          • youtube string
          • snapchat string
          • pinterest string
          • reddit string
          • whatsapp string
          • telegram string
        • additionalContacts object[] required
          • title string required
          • value string required
          • kind string requiredenum: URL, PHONE, EMAIL
        • termsAndConditions object required
          • type string requiredenum: PDF, URL, NONE
          • customUrl string
          • pdfUrl string
        • webHookUrl string required
        • rootDomain string required
        • timezone string
        • allowedPasses string[] requiredenum: ALL, EVENT_TICKET, TRANSIT, CINEMA, BOARDING_PASS, COUPON, GENERIC, STORE_CARD, OFFER, HOTEL
        • expiredCleanupEnabled boolean required
        • _id string required
        • createdAt string <date-time> required
        • updatedAt string <date-time> required
      • option 2
    • coupon oneOf
      • Coupon
        • wallet oneOf required
          • Wallet
            • name string required
            • logo string required
            • icon string required
            • androidLogo string
            • displayIdentifiant boolean required
            • passBuilderPassTemplateId string
            • passBuilderBusinessId string
            • passBuilderToken string
            • identifier string required
            • identifierQr string required
            • address string
            • website string required
            • servicePhone string required
            • businessPhone string required
            • socialMedia object required
              • linkedin string
              • facebook string
              • instagram string
              • tiktok string
              • twitter string
              • youtube string
              • snapchat string
              • pinterest string
              • reddit string
              • whatsapp string
              • telegram string
            • additionalContacts object[] required
              • title string required
              • value string required
              • kind string requiredenum: URL, PHONE, EMAIL
            • termsAndConditions object required
              • type string requiredenum: PDF, URL, NONE
              • customUrl string
              • pdfUrl string
            • webHookUrl string required
            • rootDomain string required
            • timezone string
            • allowedPasses string[] requiredenum: ALL, EVENT_TICKET, TRANSIT, CINEMA, BOARDING_PASS, COUPON, GENERIC, STORE_CARD, OFFER, HOTEL
            • expiredCleanupEnabled boolean required
            • _id string required
            • createdAt string <date-time> required
            • updatedAt string <date-time> required
          • option 2
        • barcodeFormat string requiredenum: AZTEC, CODE_128, PDF_417, QR_CODE, NONE
        • name string required
        • description string required
        • promoCode string
        • value string
        • expirationDate string <date-time>
        • isMultipleInstance boolean required
        • isWelcomeCoupon boolean required
        • status string requiredenum: ACTIVE, INACTIVE, EXPIRED
        • source string requiredenum: INTERNAL, EXTERNAL, CRM, ALL
        • colors object required
          • labelColor string required
          • backgroundColor string required
          • foregroundColor string required
        • strip string
        • emailSubscriptionMessage string
        • subscriptionMessage string
        • security object
          • oneTimeToUseJwtLink boolean required
          • disableIOSPassSharing boolean
          • enableOneTimeUse boolean
          • disableMultipleHolders boolean
          • enableSecurityAnimation boolean
          • enableRotatingBarcode boolean
        • valueLabel string requiredenum: VALUE, AMOUNT, PRESTATION
        • iosHeader object
          • labelEnum string requiredenum: FULLNAME, CUSTOM_TEXT, INACTIVE
          • valueEnum string requiredenum: FULLNAME, CUSTOM_TEXT, INACTIVE
          • customLabel string
          • customValue string
        • passBuilderPassTemplateId string
        • _id string required
        • createdAt string <date-time> required
        • updatedAt string <date-time> required
      • option 2
    • passBuilderPassId string
    • passBuilderUpdatedAt string <date-time>
    • shortId string
      Identifiant unique de 4 caractères (base62) utilisé dans les liens courts, généré automatiquement à la création.
    • legacyShortId string
      Ancien identifiant de lien court V1 (`shortlinks.shortLinkId`), conservé pour les redirections `/p/:id` (longueur variable).
    • kind string requiredenum: hotel, transit, event, storeCard, coupon
    • firstName string
    • lastName string
    • email string
    • barcode string
    • phoneNumber string
    • devices object[] required
      • deviceLibraryIdentifier string required
      • deviceType string requiredenum: ANDROID, IOS
      • registeredAt string <date-time> required
      • isDeleted boolean required
    • activeIOSDeviceCount number required
    • activeAndroidDeviceCount number required
    • status string requiredenum: active, inactive, deleted, canceled, expired
    • redeemedAt string <date-time>
    • instanceId object
      • instanceLinks object[] required
        • instanceId string required
        • link string required
        • name string
        • description string
      • checkin string <date-time>
      • checkout string <date-time>
      • additionalBenefits string[]
      • roomNumber string
      • roomCode string
      • gate string
      • seat string
      • originName string
      • destinationName string
      • originStationCode string
      • destinationStationCode string
      • departureTime string
      • arrivalTime string
      • tarif string
      • tripNumber string
      • departureDate string required
      • arrivalDate string required
      • expirationDate string <date-time>
      • originalExpirationDate string <date-time>
        Date de validité d'origine, mise de côté avant qu'un passage manuel au statut `EXPIRED` n'écrase `expirationDate`.
      • admissionDate string <date-time>
      • backFieldName string
      • backFieldContent string
      • customBackFields string[]
        Champs de verso structurés propres aux titres de transport (remplacent les champs simples `backFieldName`/`backFieldContent` pour les passes de transport).
      • leftRow string
      • centerRow string
      • rightRow string
      • promoCode string
      • value string
      • unit string
      • description string
      • bannerOverrideUrl string
      • downloadedVia object
      • shortLink string
        Lien court vers la page d'inscription du pass (par exemple pour un QR code). Calculé à la volée, non stocké en base.
      • _id string required
      • createdAt string <date-time> required
      • updatedAt string <date-time> required

      Les nouveautés de l'API, une fois par mois

      Nouveaux endpoints, changements à prévoir, guides et cas d'usage. Pas de spam, désinscription en un clic.

      Signaler un problème technique

      Une erreur de l’API, un pass qui ne se met pas à jour, un e-mail qui n’arrive pas ? Décrivez le problème : notre équipe technique vous répond.

      Pour une réponse rapide, indiquez :

      • La méthode et l’endpoint (ex. POST /clients)
      • Le code d’erreur renvoyé (errorCode) et le corps envoyé
      • La date et l’heure de l’appel
      • Les identifiants concernés (client, modèle, pass)

      N’y mettez jamais de jeton d’API ni de mot de passe.

      Assistant IA

      Beta

      Chargement…

      Réponses générées par IA (Claude) : vérifiez les points importants.

      Connectez-vous pour utiliser l'assistant