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