Update a coupon template
PATCH
https://api-v2.test.eldowallet.fr/coupons/:id
Updates a coupon template and its pass template; coupons already sent are updated accordingly. Accepts application/json or multipart/form-data (to replace the strip image). Warning: if you do not send expirationDate, the template's expiration date is cleared.
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.
Request
path parameters
idstring requiredID of the coupon template to update.
header parameters
x-langstringLanguage for responsesenum:en,frdefault:"en"
Body
multipart/form-data requiredstripstring <binary>barcodeFormatstringenum:AZTEC,CODE_128,PDF_417,QR_CODE,NONEnamestringdescriptionstringpromoCodestringvaluestringexpirationDatestring <date-time>isMultipleInstancebooleanisWelcomeCouponbooleanstatusstringenum:ACTIVE,INACTIVE,EXPIREDsourcestringenum:INTERNAL,EXTERNAL,CRM,ALLvalueLabelstringenum:VALUE,AMOUNT,PRESTATIONcolorsobjectbackgroundColorstring requiredlabelColorstring requiredforegroundColorstring required
emailSubscriptionMessagestringsubscriptionMessagestringsecurityobjectoneTimeToUseJwtLinkbooleandisableIOSPassSharingbooleanenableOneTimeUsebooleandisableMultipleHoldersbooleanenableSecurityAnimationbooleanenableRotatingBarcodeboolean
iosHeaderobjectlabelEnumstring requiredenum:FULLNAME,CUSTOM_TEXT,INACTIVEvalueEnumstring requiredenum:FULLNAME,CUSTOM_TEXT,INACTIVEcustomLabelstringcustomValuestring
Body
application/json requiredstripstring <binary>barcodeFormatstringenum:AZTEC,CODE_128,PDF_417,QR_CODE,NONEnamestringdescriptionstringpromoCodestringvaluestringexpirationDatestring <date-time>isMultipleInstancebooleanisWelcomeCouponbooleanstatusstringenum:ACTIVE,INACTIVE,EXPIREDsourcestringenum:INTERNAL,EXTERNAL,CRM,ALLvalueLabelstringenum:VALUE,AMOUNT,PRESTATIONcolorsobjectbackgroundColorstring requiredlabelColorstring requiredforegroundColorstring required
emailSubscriptionMessagestringsubscriptionMessagestringsecurityobjectoneTimeToUseJwtLinkbooleandisableIOSPassSharingbooleanenableOneTimeUsebooleandisableMultipleHoldersbooleanenableSecurityAnimationbooleanenableRotatingBarcodeboolean
iosHeaderobjectlabelEnumstring requiredenum:FULLNAME,CUSTOM_TEXT,INACTIVEvalueEnumstring requiredenum:FULLNAME,CUSTOM_TEXT,INACTIVEcustomLabelstringcustomValuestring
Responses
- 200
- 400
- 401
- 403
- 404
- 415
- 500
- 503
Schema
application/jsonVALIDATION_ERROR · INVALID_JSON · INVALID_MULTIPART · PROMO_CODE_ALREADY_EXISTS · ACTIVE_WELCOME_COUPON_ALREADY_EXISTS
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
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
PASS_BUILDER_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