PUT | /customer/{boosterCustomerId} | Update customer | Update CRM customer |
---|
export class Email
{
/** @description Email */
// @ApiMember(Description="Email", IsRequired=true)
public email: string;
/** @description Main email */
// @ApiMember(Description="Main email", IsRequired=true)
public isMainEmail: boolean;
public constructor(init?: Partial<Email>) { (Object as any).assign(this, init); }
}
export class Phone
{
/** @description Phone e.g. cn: 13888889999, jp: 352858088, kr: 023123456 */
// @ApiMember(Description="Phone e.g. cn: 13888889999, jp: 352858088, kr: 023123456", IsRequired=true)
public phone: string;
/** @description Prefix Country Id e.g. it, fr, az */
// @ApiMember(Description="Prefix Country Id e.g. it, fr, az", IsRequired=true)
public countryPrefix: string;
/** @description Phone type e.g. 'Home', 'Mobile', 'Work', 'Other', 'Secondary Address' */
// @ApiMember(Description="Phone type e.g. 'Home', 'Mobile', 'Work', 'Other', 'Secondary Address'")
public phoneType: string;
/** @description Main Phone */
// @ApiMember(Description="Main Phone", IsRequired=true)
public isMainPhone: boolean;
public constructor(init?: Partial<Phone>) { (Object as any).assign(this, init); }
}
export class Address
{
/** @description Address type e.g. Home, Office, Shipping */
// @ApiMember(Description="Address type e.g. Home, Office, Shipping", IsRequired=true)
public addressType: string;
/** @description Country Id e.g. it, cn, az, gb, de */
// @ApiMember(Description="Country Id e.g. it, cn, az, gb, de", IsRequired=true)
public countryId: string;
/** @description House Number */
// @ApiMember(Description="House Number")
public houseNumber: string;
/** @description Region/State */
// @ApiMember(Description="Region/State")
public stateId: string;
/** @description City Name */
// @ApiMember(Description="City Name")
public city: string;
/** @description Postal Code */
// @ApiMember(Description="Postal Code")
public zipCode: string;
/** @description Street Name and Number */
// @ApiMember(Description="Street Name and Number")
public street: string;
/** @description Street 2 */
// @ApiMember(Description="Street 2")
public street2: string;
/** @description Street 3 */
// @ApiMember(Description="Street 3")
public street3: string;
/** @description Street 4 */
// @ApiMember(Description="Street 4")
public street4: string;
/** @description Street 5 */
// @ApiMember(Description="Street 5")
public street5: string;
/** @description Main Address */
// @ApiMember(Description="Main Address", IsRequired=true)
public isMainAddress: boolean;
/** @description Post Office Box */
// @ApiMember(Description="Post Office Box")
public poBox: string;
/** @description Additional Information */
// @ApiMember(Description="Additional Information")
public additionalInformation: string;
public constructor(init?: Partial<Address>) { (Object as any).assign(this, init); }
}
export class Event
{
/** @description Event type e.g. 'Birthday', 'Wedding', 'Anniversary', 'Barmitza', 'Other' */
// @ApiMember(Description="Event type e.g. 'Birthday', 'Wedding', 'Anniversary', 'Barmitza', 'Other'", IsRequired=true)
public eventType: string;
/** @description Event date e.g. '2021-01-20' */
// @ApiMember(Description="Event date e.g. '2021-01-20'", IsRequired=true)
public eventDate: string;
/** @description Event notes */
// @ApiMember(Description="Event notes")
public eventNotes: string;
/** @description Event other name */
// @ApiMember(Description="Event other name")
public eventOtherName: string;
public constructor(init?: Partial<Event>) { (Object as any).assign(this, init); }
}
export class Interest
{
/** @description Interest description */
// @ApiMember(Description="Interest description", IsRequired=true)
public interest: string;
/** @description SAP Interest ID, e.g. 'CA-1' */
// @ApiMember(Description="SAP Interest ID, e.g. 'CA-1'", IsRequired=true)
public sapInterestId: string;
/** @description Interest description translation */
// @ApiMember(Description="Interest description translation")
public translation: string;
public constructor(init?: Partial<Interest>) { (Object as any).assign(this, init); }
}
export class Hobby
{
/** @description Hobby description */
// @ApiMember(Description="Hobby description", IsRequired=true)
public hobby: string;
/** @description SAP Hobby ID, e.g. 'ART' */
// @ApiMember(Description="SAP Hobby ID, e.g. 'ART'", IsRequired=true)
public sapHobbyId: string;
/** @description Hobby description translation */
// @ApiMember(Description="Hobby description translation")
public translation: string;
public constructor(init?: Partial<Hobby>) { (Object as any).assign(this, init); }
}
export class ProductCollection
{
/** @description Product Collection description */
// @ApiMember(Description="Product Collection description", IsRequired=true)
public productCollection: string;
/** @description SAP ProductCollection ID, e.g. 'CA-1' */
// @ApiMember(Description="SAP ProductCollection ID, e.g. 'CA-1'", IsRequired=true)
public sapProductCollectionId: string;
/** @description Product Collection description translation */
// @ApiMember(Description="Product Collection description translation", IsRequired=true)
public translation: string;
public constructor(init?: Partial<ProductCollection>) { (Object as any).assign(this, init); }
}
export class Customer
{
/** @description Title e.g. 'Mr & Mrs', 'Mr.', 'Mrs.', 'Sama', 'Captain' - Mandatory only when customer type is 'PRIVATE' */
// @ApiMember(Description="Title e.g. 'Mr & Mrs', 'Mr.', 'Mrs.', 'Sama', 'Captain' - Mandatory only when customer type is 'PRIVATE'")
public title: string;
/** @description First Name */
// @ApiMember(Description="First Name")
public firstName: string;
/** @description Last Name - Mandatory only when customer type is 'PRIVATE' */
// @ApiMember(Description="Last Name - Mandatory only when customer type is 'PRIVATE'")
public lastName: string;
/** @description First Name Not Latin */
// @ApiMember(Description="First Name Not Latin")
public firstNameNotLatin: string;
/** @description Last Name Not Latin */
// @ApiMember(Description="Last Name Not Latin")
public lastNameNotLatin: string;
/** @description Middle Name */
// @ApiMember(Description="Middle Name")
public middleName: string;
/** @description Name Suffix */
// @ApiMember(Description="Name Suffix")
public nameSuffix: string;
/** @description Can be Contacted by Maison e.g. true or false */
// @ApiMember(Description="Can be Contacted by Maison e.g. true or false", IsRequired=true)
public canBeContactedByMaison: boolean;
/** @description Customer Type e.g. 'PRIVATE' or 'COMPANY' */
// @ApiMember(Description="Customer Type e.g. 'PRIVATE' or 'COMPANY'", IsRequired=true)
public clientType: string;
/** @description Company Name - Mandatory only when customer type is 'COMPANY' */
// @ApiMember(Description="Company Name - Mandatory only when customer type is 'COMPANY'")
public companyName: string;
/** @description Language Id e.g. ita, chi, aze, eng, ger - Mandatory only when customer type is 'PRIVATE' */
// @ApiMember(Description="Language Id e.g. ita, chi, aze, eng, ger - Mandatory only when customer type is 'PRIVATE'")
public languageId: string;
/** @description Gender e.g. M, F - Mandatory only when customer type is 'PRIVATE' */
// @ApiMember(Description="Gender e.g. M, F - Mandatory only when customer type is 'PRIVATE'")
public gender: string;
/** @description Country Id e.g. it, cn, az, gb, de */
// @ApiMember(Description="Country Id e.g. it, cn, az, gb, de", IsRequired=true)
public countryId: string;
/** @description Birth Date e.g. '2020-12-30' */
// @ApiMember(Description="Birth Date e.g. '2020-12-30'")
public birthDate?: string;
/** @description Customer reference */
// @ApiMember(Description="Customer reference")
public customerReference: string;
/** @description POS Code e.g. ES100:102048 */
// @ApiMember(Description="POS Code e.g. ES100:102048", IsRequired=true)
public posCode: string;
/** @description Brand e.g. CAR, MTB */
// @ApiMember(Description="Brand e.g. CAR, MTB", IsRequired=true)
public brand: string;
/** @description Wedding Date, e.g. '2020-01-18' */
// @ApiMember(Description="Wedding Date, e.g. '2020-01-18'")
public weddingDate?: string;
/** @description Preferred Contact Method e.g. 'Fax', 'Tel', 'EMail', 'Mail', 'Survey' */
// @ApiMember(Description="Preferred Contact Method e.g. 'Fax', 'Tel', 'EMail', 'Mail', 'Survey'")
public preferredContactMethod: string;
/** @description Provide 'true' if you want to be contacted by email. Leave empty or 'false' if you do not. */
// @ApiMember(Description="Provide 'true' if you want to be contacted by email. Leave empty or 'false' if you do not.")
public contactByEmailFlag: boolean;
/** @description Provide 'true' if you want to be contacted by mail. Leave empty or 'false' if you do not. */
// @ApiMember(Description="Provide 'true' if you want to be contacted by mail. Leave empty or 'false' if you do not.")
public contactByMailFlag: boolean;
/** @description Provide 'true' if you want to be contacted by phone. Leave empty or 'false' if you do not. */
// @ApiMember(Description="Provide 'true' if you want to be contacted by phone. Leave empty or 'false' if you do not.")
public contactByPhoneFlag: boolean;
/** @description Provide 'true' if you want to be contacted by SMS. Leave empty or 'false' if you do not. */
// @ApiMember(Description="Provide 'true' if you want to be contacted by SMS. Leave empty or 'false' if you do not.")
public contactBySMSFlag: boolean;
/** @description Provide 'true' if you want to be contacted by social media. Leave empty or 'false' if you do not. */
// @ApiMember(Description="Provide 'true' if you want to be contacted by social media. Leave empty or 'false' if you do not.")
public contactBySocialMediaFlag: boolean;
/** @description Sale Representative Email e.g. rauf.aliyev@richemont.com */
// @ApiMember(Description="Sale Representative Email e.g. rauf.aliyev@richemont.com")
public saleRepresentativeEmail: string;
/** @description Consent for allowing Cross Border Data Transfer */
// @ApiMember(Description="Consent for allowing Cross Border Data Transfer")
public allowStoreDataAbroad?: boolean;
/** @description Consent for allowing Cross Border Data Transfer For TimeVallée */
// @ApiMember(Description="Consent for allowing Cross Border Data Transfer For TimeVallée")
public tvAllowStoreDataAbroad?: boolean;
/** @description Customer emails */
// @ApiMember(Description="Customer emails")
public emails: Email[];
/** @description Customer phones */
// @ApiMember(Description="Customer phones")
public phones: Phone[];
/** @description Customer addresses */
// @ApiMember(Description="Customer addresses")
public addresses: Address[];
/** @description Customer events */
// @ApiMember(Description="Customer events")
public events: Event[];
/** @description Customer interests */
// @ApiMember(Description="Customer interests")
public interests: Interest[];
/** @description Customer hobbies */
// @ApiMember(Description="Customer hobbies")
public hobbies: Hobby[];
/** @description Customer product collections */
// @ApiMember(Description="Customer product collections")
public productCollections: ProductCollection[];
/** @description Provide 'true' if you allow data sharing consent. Leave empty or 'false' if you do not. */
// @ApiMember(Description="Provide 'true' if you allow data sharing consent. Leave empty or 'false' if you do not.")
public dataSharingConsent?: boolean;
/** @description Notes */
// @ApiMember(Description="Notes")
public notes: string;
/** @description Reference Sale Representative Email */
// @ApiMember(Description="Reference Sale Representative Email")
public referenceSaleRepresentativeEmail: string;
/** @description Registration Date */
// @ApiMember(Description="Registration Date")
public registrationDate?: string;
public constructor(init?: Partial<Customer>) { (Object as any).assign(this, init); }
}
export class UpdateCustomer extends Customer
{
/** @description Booster customer Id */
// @ApiMember(Description="Booster customer Id")
public boosterCustomerId: number;
public constructor(init?: Partial<UpdateCustomer>) { super(init); (Object as any).assign(this, init); }
}
TypeScript 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/" />