Mettre à jour un hôtel
PATCH
https://api-v2.test.eldowallet.fr/hotels/:id
Met à jour un hôtel. Seuls les champs envoyés sont modifiés, et le modèle des passes déjà émis est mis à jour en conséquence. Accepte multipart/form-data (pour changer la bannière) ou application/json.
À 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 de l'hôtel (ID MongoDB de 24 caractères hexadécimaux).
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>titlestringhotelNamestringdescriptionstringcodestringadvantagesstring[]colorsobjectbackgroundColorstring requiredlabelColorstring requiredforegroundColorstring required
barcodeFormatstringenum:AZTEC,CODE_128,PDF_417,QR_CODE,NONElocationobjectlatitudenumberlongitudenumberrelevantNamestringrelevantAddressstring
Body
application/json requiredstripstring <binary>titlestringhotelNamestringdescriptionstringcodestringadvantagesstring[]colorsobjectbackgroundColorstring requiredlabelColorstring requiredforegroundColorstring required
barcodeFormatstringenum:AZTEC,CODE_128,PDF_417,QR_CODE,NONElocationobjectlatitudenumberlongitudenumberrelevantNamestringrelevantAddressstring
Réponses
- 200
- 400
- 401
- 403
- 404
- 415
- 500
- 503
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
titlestring requiredhotelNamestringdescriptionstringstripstringcodestringadvantagesstring[] requiredcolorsobjectlabelColorstring requiredbackgroundColorstring requiredforegroundColorstring required
barcodeFormatstringenum:AZTEC,CODE_128,PDF_417,QR_CODE,NONEpassBuilderPassTemplateIdstringlocationobjectlongitudenumberlatitudenumberrelevantNamestringrelevantAddressstring
_idstring requiredcreatedAtstring <date-time> requiredupdatedAtstring <date-time> required
VALIDATION_ERROR · INVALID_JSON · INVALID_MULTIPART
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