Skip to main content

Create a communication

POST

https://api-v2.test.eldowallet.fr/communications

Creates a communication (offer) shown on the loyalty card of every holder in the wallet: a strip image replaces the card's banner and the description is added to the back. It goes live right away with instant: true, otherwise at startDate, and runs until endDate, or with no end with unlimited: true. Returns the created communication.

Good to know
  • Body is multipart/form-data: nested objects (colors, security, locations…) are sent as a JSON string, booleans as "true"/"false". Images: PNG or JPEG, 1 KB to 5 MB.
  • startDate is required when instant is missing or false.
  • endDate is required when unlimited is missing or false.
  • Only one communication can be live at a time: a period that overlaps a PENDING or ACTIVE one returns 409:OVERLAPPING_COMMUNICATIONS, and a second unlimited one returns UNLIMITED_COMMUNICATION_ALREADY_EXISTS. Holders of an active loyalty card are notified by push, email and SMS according to the wallet's communication rules and each client's preferences; credit is checked per channel before anything is created: INSUFFICIENT_CREDIT when no channel can cover every client, 409:INSUFFICIENT_CREDIT_PARTIAL when only some can, unless you send acceptPartialDelivery: true to notify on the funded channels only. The card goes back to its original image and loses the back field when the communication ends.

Request​

header parameters
  • x-lang string
    Language for responses
    enum: en, frdefault: "en"
Body multipart/form-data required
  • strip string <binary> required
  • instant boolean
  • unlimited boolean
  • description string required
  • startDate string <date-time>
  • endDate string <date-time>
  • minPoints number
  • maxPoints number

Responses​

Schema application/json
  • strip string required
    Banner URL
  • 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
  • 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
        Marks whether the PassBuilder template and all existing passes have been migrated to the new gain format where the unit symbol is embedded in the pass attribute value (e.g. "50 Pts") rather than in the template field. False (or absent) means the old format is still in use.
      • _id string required
      • createdAt string <date-time> required
      • updatedAt string <date-time> required
    • option 2
  • description string required
    Communication description
  • startDate string <date-time>
    Communication start date
  • endDate string <date-time>
    Communication end date
  • minPoints number
    Minimum points required
    min: 0
  • maxPoints number
    Maximum points allowed
    min: 0
  • status string required
    Communication status
    enum: PENDING, ACTIVE, INACTIF, EXPIREDdefault: "PENDING"
  • instant boolean required
  • unlimited boolean required
  • _id string required
  • createdAt string <date-time> required
  • updatedAt string <date-time> required

API news, once a month

New endpoints, upcoming changes, guides and use cases. No spam, one-click unsubscribe.

Report a technical problem

An API error, a pass that does not update, an email that does not arrive? Describe the problem: our technical team will answer.

For a fast answer, include:

  • The method and endpoint (e.g. POST /clients)
  • The error code returned (errorCode) and the body sent
  • The date and time of the call
  • The identifiers involved (customer, template, pass)

Never include an API token or a password.

AI assistant

Beta

Loading…

AI-generated answers (Claude): double-check important details.

Sign in to use the assistant