Update a push notification
PUT
https://api-v2.test.eldowallet.fr/push-notifications/:id
Replaces a push notification's content, target, category or schedule and recomputes its recipients. Use it to change a scheduled notification before it is sent. Returns the updated notification.
Good to know
scheduleAtis required whentypeisSCHEDULED.- Recipients are recomputed from the request body: send
target,clients,defaultTitleanddefaultMessageagain as for a creation, or the omitted titles and messages are left empty. For anINSTANTnotification,scheduleAtis reset to now, so it is sent on the next dispatch run. ThePUSHcredit and 10-second gap checks apply as on creation.
Request
path parameters
idstring requiredPush notification ID (24-character hexadecimal ObjectId).
header parameters
x-langstringLanguage for responsesenum:en,frdefault:"en"
Body
application/json requireddefaultTitlestringdefaultMessagestringtargetstringenum:ALL,SPECIFICtypestringenum:INSTANT,SCHEDULEDcategorystringInformative 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
- 200
- 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