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. startDateis required wheninstantis missing orfalse.endDateis required whenunlimitedis missing orfalse.- Only one communication can be live at a time: a period that overlaps a
PENDINGorACTIVEone returns409:OVERLAPPING_COMMUNICATIONS, and a secondunlimitedone returnsUNLIMITED_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_CREDITwhen no channel can cover every client,409:INSUFFICIENT_CREDIT_PARTIALwhen only some can, unless you sendacceptPartialDelivery: trueto 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-langstringLanguage for responsesenum:en,frdefault:"en"
Body
multipart/form-data requiredstripstring <binary> requiredinstantbooleanunlimitedbooleandescriptionstring requiredstartDatestring <date-time>endDatestring <date-time>minPointsnumbermaxPointsnumber
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 415
- 500
Schema
application/jsonstripstring requiredBanner URLwalletoneOf 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
storeCardoneOf- StoreCard
walletoneOf 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
cardTypestring requiredenum:STORE_CARD,MEMBER_CARDdisplayIdentifiantboolean requireddisplayWalletNamebooleanstripstring requiredpassBuilderPassTemplateIdstringprogramNamestringkeysHasChangedstring[]startRowstringenum:CREATION_DATE,EXPIRATION_DATE,BIRTHDATE,GAIN,CLUB,ASSOCIATION,ORGANISATION,ENTREPRISE,N_LICENCE,N_ADHERENT,N_MEMBER,MEMBER,N_IMMATRICULATION,INACTIVE,ADMISSION_DATEmiddleRowstringenum:CREATION_DATE,EXPIRATION_DATE,BIRTHDATE,GAIN,CLUB,ASSOCIATION,ORGANISATION,ENTREPRISE,N_LICENCE,N_ADHERENT,N_MEMBER,MEMBER,N_IMMATRICULATION,INACTIVE,ADMISSION_DATEendRowstringenum:CREATION_DATE,EXPIRATION_DATE,BIRTHDATE,GAIN,CLUB,ASSOCIATION,ORGANISATION,ENTREPRISE,N_LICENCE,N_ADHERENT,N_MEMBER,MEMBER,N_IMMATRICULATION,INACTIVE,ADMISSION_DATEiosHeaderobjectlabelEnumstring requiredenum:TYPE,GAIN,FULLNAME,CUSTOM_TEXT,INACTIVEvalueEnumstring requiredenum:TYPE,GAIN,FULLNAME,CUSTOM_TEXT,INACTIVEcustomLabelstringcustomValuestring
barcodeTypestring requiredenum:AZTEC,CODE_128,PDF_417,QR_CODE,NONEdescriptionsobject[] requiredtitlestring requiredvaluestring required
openingHoursstring requiredcolorsobject requiredlabelColorstring requiredbackgroundColorstring requiredforegroundColorstring required
oneTimeToUseboolean requiredsharingProhibitedboolean requiredsharingProhibitedAndroidboolean requiredvalidityobject requiredexpirationTypestring requiredenum:NO_EXPIRATION,AT_DATETIME,AFTER_PERIODexpirationDatestring <date-time>expirationAfterPeriodstringexpirationPeriodTypestringenum:YEARS,MONTHS,WEEKSexpirationOptionstringenum:AT_CREATION_DATE,END_OF_MONTH
gainLabelstring requiredenum:GAIN,GAINS,CAGNOTE,POINTSgainUnitstring requiredenum:NONE,EURO,USD,MAD,POINTSofferLabelstring requiredenableDisplayIdentifiantboolean requiredgainFormatMigratedboolean requiredMarks 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._idstring requiredcreatedAtstring <date-time> requiredupdatedAtstring <date-time> required
- option 2
- StoreCard
descriptionstring requiredCommunication descriptionstartDatestring <date-time>Communication start dateendDatestring <date-time>Communication end dateminPointsnumberMinimum points requiredmin: 0maxPointsnumberMaximum points allowedmin: 0statusstring requiredCommunication statusenum:PENDING,ACTIVE,INACTIF,EXPIREDdefault:"PENDING"instantboolean requiredunlimitedboolean required_idstring requiredcreatedAtstring <date-time> requiredupdatedAtstring <date-time> required
VALIDATION_ERROR · INVALID_JSON · INVALID_MULTIPART · UNLIMITED_COMMUNICATION_ALREADY_EXISTS · 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
OVERLAPPING_COMMUNICATIONS · INSUFFICIENT_CREDIT_PARTIAL
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
UNSUPPORTED_MEDIA_TYPE
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