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
scheduleAtis required whentypeisSCHEDULED.- Recipients are the holders of an active, installed loyalty card: all of them with
target: ALL, or those listed inclientswithtarget: SPECIFIC(per-clienttitle/messageoverridedefaultTitle/defaultMessage). Always sendtarget: without it, no recipient is resolved.category(COMMERCIALorINFORMATIVE) is checked against each client's consent (pushCommercialEnabled,pushInformativeEnabled) at creation and again at send time, along with the wallet's communication rules. OnePUSHcredit is consumed per recipient (INSUFFICIENT_CREDITif short), and twotarget: ALLscheduled notifications must be at least 10 seconds apart (409:PUSH_NOTIFICATION_SCHEDULE_CONFLICT).
Request
header parameters
x-langstringLanguage for responsesenum:en,frdefault:"en"
Body
application/json requireddefaultTitlestring requireddefaultMessagestring requiredtargetstring requiredenum:ALL,SPECIFICtypestring requiredenum:INSTANT,SCHEDULEDcategorystring requiredInformative vs. commercial classification — required so the client's consent (pushInformativeEnabled/pushCommercialEnabled) can be checked at send time.enum:INFORMATIVE,COMMERCIALclientsobject[]idstring requiredtitlestringmessagestring
scheduleAtstring <date-time>
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 500
Schema
application/jsonwalletoneOf required- Wallet
namestring requiredlogostring requirediconstring requiredandroidLogostringdisplayIdentifiantboolean requiredpassBuilderPassTemplateIdstringpassBuilderBusinessIdstringpassBuilderTokenstringidentifierstring requiredidentifierQrstring requiredaddressstringwebsitestring requiredservicePhonestring requiredbusinessPhonestring requiredsocialMediaobject requiredlinkedinstringfacebookstringinstagramstringtiktokstringtwitterstringyoutubestringsnapchatstringpintereststringredditstringwhatsappstringtelegramstring
additionalContactsobject[] requiredtitlestring requiredvaluestring requiredkindstring requiredenum:URL,PHONE,EMAIL
termsAndConditionsobject requiredtypestring requiredenum:PDF,URL,NONEcustomUrlstringpdfUrlstring
webHookUrlstring requiredrootDomainstring requiredtimezonestringallowedPassesstring[] requiredenum:ALL,EVENT_TICKET,TRANSIT,CINEMA,BOARDING_PASS,COUPON,GENERIC,STORE_CARD,OFFER,HOTELexpiredCleanupEnabledboolean required_idstring requiredcreatedAtstring <date-time> requiredupdatedAtstring <date-time> required
- option 2
- Wallet
defaultTitlestring requireddefaultMessagestring requiredtargetstring requiredenum:ALL,SPECIFICtypestring requiredenum:INSTANT,SCHEDULEDclientsobject[] requiredidoneOf required- Client
walletstringclientTypeoneOf- ClientType
storeCardoneOf requirednamestring requiredisDefaultboolean required_idstring requiredcreatedAtstring <date-time> requiredupdatedAtstring <date-time> required
- option 2
- ClientType
sourcestring requiredenum:CRM,INTERNAL,EXTERNALbarcodestringfirstNamestring requiredlastNamestring requiredemailstringcompanyNamestringrenewalDatestring <date-time>phoneNumberstringbirthDatestring <date-time>admissionDatestring <date-time>gainnumbergainHistoryobject[]gainnumber requireddatestring <date-time> required
communicationPreferencesobject[]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.notificationTypestring 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_TICKETsmsboolean requiredemailboolean requirednotificationboolean required
pushInformativeEnabledbooleanOpt-out of manager-created "standard" push campaigns classified as informative.pushCommercialEnabledbooleanOpt-out of manager-created "standard" push campaigns classified as commercial._idstring requiredcreatedAtstring <date-time> requiredupdatedAtstring <date-time> required
- option 2
- Client
passBuilderPassIdstringtitlestringmessagestring
categorystringInformative/commercial classification, used to gate against the recipient's `Client.pushInformativeEnabled`/`pushCommercialEnabled`.enum:INFORMATIVE,COMMERCIALscheduleAtstring <date-time>sentAtstring <date-time>_idstring requiredcreatedAtstring <date-time> requiredupdatedAtstring <date-time> required
VALIDATION_ERROR · INVALID_JSON · INSUFFICIENT_CREDIT
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
PUSH_NOTIFICATION_SCHEDULE_CONFLICT
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