Créer une notification push
POST
https://api-v2.test.eldowallet.fr/push-notifications
Crée une notification push envoyée sur les cartes de fidélité installées, à tous les porteurs (target: ALL) ou à une liste de clients (target: SPECIFIC), immédiatement (INSTANT) ou à scheduleAt (SCHEDULED). Les destinataires sont résolus à la création et enregistrés dans clients. Renvoie la notification créée.
À retenir
scheduleAtest obligatoire sitypevautSCHEDULED.- Les destinataires sont les porteurs d'une carte de fidélité active et installée : tous avec
target: ALL, ou ceux listés dansclientsavectarget: SPECIFIC(title/messagepar client remplacentdefaultTitle/defaultMessage). Renseignez toujourstarget: sans lui, aucun destinataire n'est retenu.category(COMMERCIALouINFORMATIVE) est confrontée au consentement de chaque client (pushCommercialEnabled,pushInformativeEnabled) à la création puis à l'envoi, ainsi qu'aux règles de communication du wallet. Un créditPUSHest consommé par destinataire (INSUFFICIENT_CREDITs'il manque), et deux notifications programméestarget: ALLdoivent être espacées d'au moins 10 secondes (409:PUSH_NOTIFICATION_SCHEDULE_CONFLICT).
Requête
header parameters
x-langstringLangue des messages d'erreur et des textes renvoyés : `fr` ou `en`.enum: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>
Réponses
- 201
- 400
- 401
- 403
- 404
- 409
- 500
Schéma
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[]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.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
pushInformativeEnabledbooleanDésinscription des campagnes de notifications push « standard » créées par un gestionnaire et classées comme informatives.pushCommercialEnabledbooleanDésinscription des campagnes de notifications push « standard » créées par un gestionnaire et classées comme commerciales._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
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
PUSH_NOTIFICATION_SCHEDULE_CONFLICT
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