Mettre à jour un modèle de coupon
PATCH
https://api-v2.test.eldowallet.fr/coupons/:id
Met à jour un modèle de coupon et le modèle de pass associé ; les coupons déjà envoyés sont mis à jour en conséquence. Accepte application/json ou multipart/form-data (pour remplacer l'image strip). Attention : si vous n'envoyez pas expirationDate, la date d'expiration du modèle est effacée.
À retenir
- Corps en
multipart/form-data: les objets imbriqués (colors,security,locations…) s'envoient en chaîne JSON, les booléens en"true"/"false". Images : PNG ou JPEG, 1 Ko à 5 Mo.
Requête
path parameters
idstring requiredIdentifiant du modèle de coupon à mettre à jour.
header parameters
x-langstringLangue des messages d'erreur et des textes renvoyés : `fr` ou `en`.enum: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
Réponses
- 200
- 400
- 401
- 403
- 404
- 415
- 500
- 503
Schéma
application/jsonVALIDATION_ERROR · INVALID_JSON · INVALID_MULTIPART · PROMO_CODE_ALREADY_EXISTS · ACTIVE_WELCOME_COUPON_ALREADY_EXISTS
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
UNSUPPORTED_MEDIA_TYPE
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
PASS_BUILDER_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