Skip to main content

Create a push notification

POST

https://api-v2.test.eldowallet.fr/push-notifications

Creates a push notification sent on installed loyalty cards, to every holder (target: ALL) or to a list of clients (target: SPECIFIC), right away (INSTANT) or at scheduleAt (SCHEDULED). Recipients are resolved at creation and stored in clients. Returns the created notification.

Good to know
  • scheduleAt is required when type is SCHEDULED.
  • Recipients are the holders of an active, installed loyalty card: all of them with target: ALL, or those listed in clients with target: SPECIFIC (per-client title/message override defaultTitle/defaultMessage). Always send target: without it, no recipient is resolved. category (COMMERCIAL or INFORMATIVE) is checked against each client's consent (pushCommercialEnabled, pushInformativeEnabled) at creation and again at send time, along with the wallet's communication rules. One PUSH credit is consumed per recipient (INSUFFICIENT_CREDIT if short), and two target: ALL scheduled notifications must be at least 10 seconds apart (409:PUSH_NOTIFICATION_SCHEDULE_CONFLICT).

Request​

header parameters
  • x-lang string
    Language for responses
    enum: en, frdefault: "en"
Body application/json required
  • defaultTitle string required
  • defaultMessage string required
  • target string requiredenum: ALL, SPECIFIC
  • type string requiredenum: INSTANT, SCHEDULED
  • category string required
    Informative vs. commercial classification — required so the client's consent (pushInformativeEnabled/pushCommercialEnabled) can be checked at send time.
    enum: INFORMATIVE, COMMERCIAL
  • clients object[]
    • id string required
    • title string
    • message string
  • scheduleAt string <date-time>

Responses​

Schema application/json
  • 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
  • defaultTitle string required
  • defaultMessage string required
  • target string requiredenum: ALL, SPECIFIC
  • type string requiredenum: INSTANT, SCHEDULED
  • clients object[] required
    • id oneOf required
      • Client
        • wallet string
        • clientType oneOf
          • ClientType
            • storeCard oneOf required
            • 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[]
          Per-event, per-channel communication preference overrides for this client (GDPR consent management). Same shape as `WalletSetting.communicationRules` — reused rather than duplicated. No entry for a given notificationType means enabled, mirroring `isCommunicationRuleEnabled`'s existing semantics. Change history is intentionally NOT embedded here — see `CommunicationPreferenceLog` — to keep this frequently-read document small.
          • 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
          Opt-out of manager-created "standard" push campaigns classified as informative.
        • pushCommercialEnabled boolean
          Opt-out of manager-created "standard" push campaigns classified as commercial.
        • _id string required
        • createdAt string <date-time> required
        • updatedAt string <date-time> required
      • option 2
    • passBuilderPassId string
    • title string
    • message string
  • category string
    Informative/commercial classification, used to gate against the recipient's `Client.pushInformativeEnabled`/`pushCommercialEnabled`.
    enum: INFORMATIVE, COMMERCIAL
  • scheduleAt string <date-time>
  • sentAt string <date-time>
  • _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