Update a client type
PATCH
https://api-v2.test.eldowallet.fr/client-types/:id
Renames a client type or changes the wallet's default type. Returns the updated type.
Good to know
- Always send both
nameandisDefault: an omitted field is reset to its default value (Silverforname,falseforisDefault). A name change is applied in the background to the cards of the clients of this type. Removing the default status moves it to the oldest other type; if there is none, the request returns400(DEFAULT_CLIENT_TYPE_REQUIRED).
Request
path parameters
idstring requiredClient type ID (24-character hexadecimal ObjectId).
header parameters
x-langstringLanguage for responsesenum:en,frdefault:"en"
Body
application/json requirednamestringdefault:"Silver"minLength: 2maxLength: 30isDefaultbooleandefault:false
Responses
- 200
- 400
- 401
- 403
- 404
- 500
Schema
application/jsonstoreCardoneOf required- 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
namestring requiredisDefaultboolean required_idstring requiredcreatedAtstring <date-time> requiredupdatedAtstring <date-time> required
VALIDATION_ERROR · INVALID_JSON · DEFAULT_CLIENT_TYPE_REQUIRED
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
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