PUT | /customer/{boosterCustomerId} | Update customer | Update CRM customer |
---|
"use strict";
export class Email {
/** @param {{email?:string,isMainEmail?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Email */
email;
/**
* @type {boolean}
* @description Main email */
isMainEmail;
}
export class Phone {
/** @param {{phone?:string,countryPrefix?:string,phoneType?:string,isMainPhone?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Phone e.g. cn: 13888889999, jp: 352858088, kr: 023123456 */
phone;
/**
* @type {string}
* @description Prefix Country Id e.g. it, fr, az */
countryPrefix;
/**
* @type {string}
* @description Phone type e.g. 'Home', 'Mobile', 'Work', 'Other', 'Secondary Address' */
phoneType;
/**
* @type {boolean}
* @description Main Phone */
isMainPhone;
}
export class Address {
/** @param {{addressType?:string,countryId?:string,houseNumber?:string,stateId?:string,city?:string,zipCode?:string,street?:string,street2?:string,street3?:string,street4?:string,street5?:string,isMainAddress?:boolean,poBox?:string,additionalInformation?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Address type e.g. Home, Office, Shipping */
addressType;
/**
* @type {string}
* @description Country Id e.g. it, cn, az, gb, de */
countryId;
/**
* @type {string}
* @description House Number */
houseNumber;
/**
* @type {string}
* @description Region/State */
stateId;
/**
* @type {string}
* @description City Name */
city;
/**
* @type {string}
* @description Postal Code */
zipCode;
/**
* @type {string}
* @description Street Name and Number */
street;
/**
* @type {string}
* @description Street 2 */
street2;
/**
* @type {string}
* @description Street 3 */
street3;
/**
* @type {string}
* @description Street 4 */
street4;
/**
* @type {string}
* @description Street 5 */
street5;
/**
* @type {boolean}
* @description Main Address */
isMainAddress;
/**
* @type {string}
* @description Post Office Box */
poBox;
/**
* @type {string}
* @description Additional Information */
additionalInformation;
}
export class Event {
/** @param {{eventType?:string,eventDate?:string,eventNotes?:string,eventOtherName?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Event type e.g. 'Birthday', 'Wedding', 'Anniversary', 'Barmitza', 'Other' */
eventType;
/**
* @type {string}
* @description Event date e.g. '2021-01-20' */
eventDate;
/**
* @type {string}
* @description Event notes */
eventNotes;
/**
* @type {string}
* @description Event other name */
eventOtherName;
}
export class Interest {
/** @param {{interest?:string,sapInterestId?:string,translation?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Interest description */
interest;
/**
* @type {string}
* @description SAP Interest ID, e.g. 'CA-1' */
sapInterestId;
/**
* @type {string}
* @description Interest description translation */
translation;
}
export class Hobby {
/** @param {{hobby?:string,sapHobbyId?:string,translation?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Hobby description */
hobby;
/**
* @type {string}
* @description SAP Hobby ID, e.g. 'ART' */
sapHobbyId;
/**
* @type {string}
* @description Hobby description translation */
translation;
}
export class ProductCollection {
/** @param {{productCollection?:string,sapProductCollectionId?:string,translation?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Product Collection description */
productCollection;
/**
* @type {string}
* @description SAP ProductCollection ID, e.g. 'CA-1' */
sapProductCollectionId;
/**
* @type {string}
* @description Product Collection description translation */
translation;
}
export class Customer {
/** @param {{title?:string,firstName?:string,lastName?:string,firstNameNotLatin?:string,lastNameNotLatin?:string,middleName?:string,nameSuffix?:string,canBeContactedByMaison?:boolean,clientType?:string,companyName?:string,languageId?:string,gender?:string,countryId?:string,birthDate?:string,customerReference?:string,posCode?:string,brand?:string,weddingDate?:string,preferredContactMethod?:string,contactByEmailFlag?:boolean,contactByMailFlag?:boolean,contactByPhoneFlag?:boolean,contactBySMSFlag?:boolean,contactBySocialMediaFlag?:boolean,saleRepresentativeEmail?:string,allowStoreDataAbroad?:boolean,tvAllowStoreDataAbroad?:boolean,emails?:Email[],phones?:Phone[],addresses?:Address[],events?:Event[],interests?:Interest[],hobbies?:Hobby[],productCollections?:ProductCollection[],dataSharingConsent?:boolean,notes?:string,referenceSaleRepresentativeEmail?:string,registrationDate?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Title e.g. 'Mr & Mrs', 'Mr.', 'Mrs.', 'Sama', 'Captain' - Mandatory only when customer type is 'PRIVATE' */
title;
/**
* @type {string}
* @description First Name */
firstName;
/**
* @type {string}
* @description Last Name - Mandatory only when customer type is 'PRIVATE' */
lastName;
/**
* @type {string}
* @description First Name Not Latin */
firstNameNotLatin;
/**
* @type {string}
* @description Last Name Not Latin */
lastNameNotLatin;
/**
* @type {string}
* @description Middle Name */
middleName;
/**
* @type {string}
* @description Name Suffix */
nameSuffix;
/**
* @type {boolean}
* @description Can be Contacted by Maison e.g. true or false */
canBeContactedByMaison;
/**
* @type {string}
* @description Customer Type e.g. 'PRIVATE' or 'COMPANY' */
clientType;
/**
* @type {string}
* @description Company Name - Mandatory only when customer type is 'COMPANY' */
companyName;
/**
* @type {string}
* @description Language Id e.g. ita, chi, aze, eng, ger - Mandatory only when customer type is 'PRIVATE' */
languageId;
/**
* @type {string}
* @description Gender e.g. M, F - Mandatory only when customer type is 'PRIVATE' */
gender;
/**
* @type {string}
* @description Country Id e.g. it, cn, az, gb, de */
countryId;
/**
* @type {?string}
* @description Birth Date e.g. '2020-12-30' */
birthDate;
/**
* @type {string}
* @description Customer reference */
customerReference;
/**
* @type {string}
* @description POS Code e.g. ES100:102048 */
posCode;
/**
* @type {string}
* @description Brand e.g. CAR, MTB */
brand;
/**
* @type {?string}
* @description Wedding Date, e.g. '2020-01-18' */
weddingDate;
/**
* @type {string}
* @description Preferred Contact Method e.g. 'Fax', 'Tel', 'EMail', 'Mail', 'Survey' */
preferredContactMethod;
/**
* @type {boolean}
* @description Provide 'true' if you want to be contacted by email. Leave empty or 'false' if you do not. */
contactByEmailFlag;
/**
* @type {boolean}
* @description Provide 'true' if you want to be contacted by mail. Leave empty or 'false' if you do not. */
contactByMailFlag;
/**
* @type {boolean}
* @description Provide 'true' if you want to be contacted by phone. Leave empty or 'false' if you do not. */
contactByPhoneFlag;
/**
* @type {boolean}
* @description Provide 'true' if you want to be contacted by SMS. Leave empty or 'false' if you do not. */
contactBySMSFlag;
/**
* @type {boolean}
* @description Provide 'true' if you want to be contacted by social media. Leave empty or 'false' if you do not. */
contactBySocialMediaFlag;
/**
* @type {string}
* @description Sale Representative Email e.g. rauf.aliyev@richemont.com */
saleRepresentativeEmail;
/**
* @type {?boolean}
* @description Consent for allowing Cross Border Data Transfer */
allowStoreDataAbroad;
/**
* @type {?boolean}
* @description Consent for allowing Cross Border Data Transfer For TimeVallée */
tvAllowStoreDataAbroad;
/**
* @type {Email[]}
* @description Customer emails */
emails;
/**
* @type {Phone[]}
* @description Customer phones */
phones;
/**
* @type {Address[]}
* @description Customer addresses */
addresses;
/**
* @type {Event[]}
* @description Customer events */
events;
/**
* @type {Interest[]}
* @description Customer interests */
interests;
/**
* @type {Hobby[]}
* @description Customer hobbies */
hobbies;
/**
* @type {ProductCollection[]}
* @description Customer product collections */
productCollections;
/**
* @type {?boolean}
* @description Provide 'true' if you allow data sharing consent. Leave empty or 'false' if you do not. */
dataSharingConsent;
/**
* @type {string}
* @description Notes */
notes;
/**
* @type {string}
* @description Reference Sale Representative Email */
referenceSaleRepresentativeEmail;
/**
* @type {?string}
* @description Registration Date */
registrationDate;
}
export class UpdateCustomer extends Customer {
/** @param {{boosterCustomerId?:number,title?:string,firstName?:string,lastName?:string,firstNameNotLatin?:string,lastNameNotLatin?:string,middleName?:string,nameSuffix?:string,canBeContactedByMaison?:boolean,clientType?:string,companyName?:string,languageId?:string,gender?:string,countryId?:string,birthDate?:string,customerReference?:string,posCode?:string,brand?:string,weddingDate?:string,preferredContactMethod?:string,contactByEmailFlag?:boolean,contactByMailFlag?:boolean,contactByPhoneFlag?:boolean,contactBySMSFlag?:boolean,contactBySocialMediaFlag?:boolean,saleRepresentativeEmail?:string,allowStoreDataAbroad?:boolean,tvAllowStoreDataAbroad?:boolean,emails?:Email[],phones?:Phone[],addresses?:Address[],events?:Event[],interests?:Interest[],hobbies?:Hobby[],productCollections?:ProductCollection[],dataSharingConsent?:boolean,notes?:string,referenceSaleRepresentativeEmail?:string,registrationDate?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {number}
* @description Booster customer Id */
boosterCustomerId;
}
JavaScript UpdateCustomer DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /customer/{boosterCustomerId} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<UpdateCustomer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.CRM.ServiceModel">
<addresses>
<Address>
<additionalInformation>String</additionalInformation>
<addressType>String</addressType>
<city>String</city>
<countryId>String</countryId>
<houseNumber>String</houseNumber>
<isMainAddress>false</isMainAddress>
<poBox>String</poBox>
<stateId>String</stateId>
<street>String</street>
<street2>String</street2>
<street3>String</street3>
<street4>String</street4>
<street5>String</street5>
<zipCode>String</zipCode>
</Address>
</addresses>
<allowStoreDataAbroad>false</allowStoreDataAbroad>
<birthDate>0001-01-01T00:00:00</birthDate>
<brand>String</brand>
<canBeContactedByMaison>false</canBeContactedByMaison>
<clientType>String</clientType>
<companyName>String</companyName>
<contactByEmailFlag>false</contactByEmailFlag>
<contactByMailFlag>false</contactByMailFlag>
<contactByPhoneFlag>false</contactByPhoneFlag>
<contactBySMSFlag>false</contactBySMSFlag>
<contactBySocialMediaFlag>false</contactBySocialMediaFlag>
<countryId>String</countryId>
<customerReference>String</customerReference>
<dataSharingConsent>false</dataSharingConsent>
<emails>
<Email>
<email>String</email>
<isMainEmail>false</isMainEmail>
</Email>
</emails>
<events>
<Event>
<eventDate>0001-01-01T00:00:00</eventDate>
<eventNotes>String</eventNotes>
<eventOtherName>String</eventOtherName>
<eventType>String</eventType>
</Event>
</events>
<firstName>String</firstName>
<firstNameNotLatin>String</firstNameNotLatin>
<gender>String</gender>
<hobbies>
<Hobby>
<hobby>String</hobby>
<sapHobbyId>String</sapHobbyId>
<translation>String</translation>
</Hobby>
</hobbies>
<interests>
<Interest>
<interest>String</interest>
<sapInterestId>String</sapInterestId>
<translation>String</translation>
</Interest>
</interests>
<languageId>String</languageId>
<lastName>String</lastName>
<lastNameNotLatin>String</lastNameNotLatin>
<middleName>String</middleName>
<nameSuffix>String</nameSuffix>
<notes>String</notes>
<phones>
<Phone>
<countryPrefix>String</countryPrefix>
<isMainPhone>false</isMainPhone>
<phone>String</phone>
<phoneType>String</phoneType>
</Phone>
</phones>
<posCode>String</posCode>
<preferredContactMethod>String</preferredContactMethod>
<productCollections>
<ProductCollection>
<productCollection>String</productCollection>
<sapProductCollectionId>String</sapProductCollectionId>
<translation>String</translation>
</ProductCollection>
</productCollections>
<referenceSaleRepresentativeEmail>String</referenceSaleRepresentativeEmail>
<registrationDate>0001-01-01T00:00:00</registrationDate>
<saleRepresentativeEmail>String</saleRepresentativeEmail>
<title>String</title>
<tvAllowStoreDataAbroad>false</tvAllowStoreDataAbroad>
<weddingDate>0001-01-01T00:00:00</weddingDate>
<boosterCustomerId>0</boosterCustomerId>
</UpdateCustomer>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <z:anyType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" />