PUT | /customer/{boosterCustomerId} | Update customer | Update CRM customer |
---|
import java.math.*
import java.util.*
import net.servicestack.client.*
open class UpdateCustomer : Customer()
{
/**
* Booster customer Id
*/
@ApiMember(Description="Booster customer Id")
var boosterCustomerId:Int? = null
}
open class Customer
{
/**
* 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'")
var title:String? = null
/**
* First Name
*/
@ApiMember(Description="First Name")
var firstName:String? = null
/**
* Last Name - Mandatory only when customer type is 'PRIVATE'
*/
@ApiMember(Description="Last Name - Mandatory only when customer type is 'PRIVATE'")
var lastName:String? = null
/**
* First Name Not Latin
*/
@ApiMember(Description="First Name Not Latin")
var firstNameNotLatin:String? = null
/**
* Last Name Not Latin
*/
@ApiMember(Description="Last Name Not Latin")
var lastNameNotLatin:String? = null
/**
* Middle Name
*/
@ApiMember(Description="Middle Name")
var middleName:String? = null
/**
* Name Suffix
*/
@ApiMember(Description="Name Suffix")
var nameSuffix:String? = null
/**
* Can be Contacted by Maison e.g. true or false
*/
@ApiMember(Description="Can be Contacted by Maison e.g. true or false", IsRequired=true)
var canBeContactedByMaison:Boolean? = null
/**
* Customer Type e.g. 'PRIVATE' or 'COMPANY'
*/
@ApiMember(Description="Customer Type e.g. 'PRIVATE' or 'COMPANY'", IsRequired=true)
var clientType:String? = null
/**
* Company Name - Mandatory only when customer type is 'COMPANY'
*/
@ApiMember(Description="Company Name - Mandatory only when customer type is 'COMPANY'")
var companyName:String? = null
/**
* 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'")
var languageId:String? = null
/**
* 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'")
var gender:String? = null
/**
* Country Id e.g. it, cn, az, gb, de
*/
@ApiMember(Description="Country Id e.g. it, cn, az, gb, de", IsRequired=true)
var countryId:String? = null
/**
* Birth Date e.g. '2020-12-30'
*/
@ApiMember(Description="Birth Date e.g. '2020-12-30'")
var birthDate:Date? = null
/**
* Customer reference
*/
@ApiMember(Description="Customer reference")
var customerReference:String? = null
/**
* POS Code e.g. ES100:102048
*/
@ApiMember(Description="POS Code e.g. ES100:102048", IsRequired=true)
var posCode:String? = null
/**
* Brand e.g. CAR, MTB
*/
@ApiMember(Description="Brand e.g. CAR, MTB", IsRequired=true)
var brand:String? = null
/**
* Wedding Date, e.g. '2020-01-18'
*/
@ApiMember(Description="Wedding Date, e.g. '2020-01-18'")
var weddingDate:Date? = null
/**
* Preferred Contact Method e.g. 'Fax', 'Tel', 'EMail', 'Mail', 'Survey'
*/
@ApiMember(Description="Preferred Contact Method e.g. 'Fax', 'Tel', 'EMail', 'Mail', 'Survey'")
var preferredContactMethod:String? = null
/**
* 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.")
var contactByEmailFlag:Boolean? = null
/**
* 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.")
var contactByMailFlag:Boolean? = null
/**
* 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.")
var contactByPhoneFlag:Boolean? = null
/**
* 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.")
var contactBySMSFlag:Boolean? = null
/**
* 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.")
var contactBySocialMediaFlag:Boolean? = null
/**
* Sale Representative Email e.g. rauf.aliyev@richemont.com
*/
@ApiMember(Description="Sale Representative Email e.g. rauf.aliyev@richemont.com")
var saleRepresentativeEmail:String? = null
/**
* Consent for allowing Cross Border Data Transfer
*/
@ApiMember(Description="Consent for allowing Cross Border Data Transfer")
var allowStoreDataAbroad:Boolean? = null
/**
* Consent for allowing Cross Border Data Transfer For TimeVallée
*/
@ApiMember(Description="Consent for allowing Cross Border Data Transfer For TimeVallée")
var tvAllowStoreDataAbroad:Boolean? = null
/**
* Customer emails
*/
@ApiMember(Description="Customer emails")
var emails:ArrayList<Email> = ArrayList<Email>()
/**
* Customer phones
*/
@ApiMember(Description="Customer phones")
var phones:ArrayList<Phone> = ArrayList<Phone>()
/**
* Customer addresses
*/
@ApiMember(Description="Customer addresses")
var addresses:ArrayList<Address> = ArrayList<Address>()
/**
* Customer events
*/
@ApiMember(Description="Customer events")
var events:ArrayList<Event> = ArrayList<Event>()
/**
* Customer interests
*/
@ApiMember(Description="Customer interests")
var interests:ArrayList<Interest> = ArrayList<Interest>()
/**
* Customer hobbies
*/
@ApiMember(Description="Customer hobbies")
var hobbies:ArrayList<Hobby> = ArrayList<Hobby>()
/**
* Customer product collections
*/
@ApiMember(Description="Customer product collections")
var productCollections:ArrayList<ProductCollection> = ArrayList<ProductCollection>()
/**
* 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.")
var dataSharingConsent:Boolean? = null
/**
* Notes
*/
@ApiMember(Description="Notes")
var notes:String? = null
/**
* Reference Sale Representative Email
*/
@ApiMember(Description="Reference Sale Representative Email")
var referenceSaleRepresentativeEmail:String? = null
/**
* Registration Date
*/
@ApiMember(Description="Registration Date")
var registrationDate:Date? = null
}
open class Email
{
/**
* Email
*/
@ApiMember(Description="Email", IsRequired=true)
var email:String? = null
/**
* Main email
*/
@ApiMember(Description="Main email", IsRequired=true)
var isMainEmail:Boolean? = null
}
open class Phone
{
/**
* Phone e.g. cn: 13888889999, jp: 352858088, kr: 023123456
*/
@ApiMember(Description="Phone e.g. cn: 13888889999, jp: 352858088, kr: 023123456", IsRequired=true)
var phone:String? = null
/**
* Prefix Country Id e.g. it, fr, az
*/
@ApiMember(Description="Prefix Country Id e.g. it, fr, az", IsRequired=true)
var countryPrefix:String? = null
/**
* Phone type e.g. 'Home', 'Mobile', 'Work', 'Other', 'Secondary Address'
*/
@ApiMember(Description="Phone type e.g. 'Home', 'Mobile', 'Work', 'Other', 'Secondary Address'")
var phoneType:String? = null
/**
* Main Phone
*/
@ApiMember(Description="Main Phone", IsRequired=true)
var isMainPhone:Boolean? = null
}
open class Address
{
/**
* Address type e.g. Home, Office, Shipping
*/
@ApiMember(Description="Address type e.g. Home, Office, Shipping", IsRequired=true)
var addressType:String? = null
/**
* Country Id e.g. it, cn, az, gb, de
*/
@ApiMember(Description="Country Id e.g. it, cn, az, gb, de", IsRequired=true)
var countryId:String? = null
/**
* House Number
*/
@ApiMember(Description="House Number")
var houseNumber:String? = null
/**
* Region/State
*/
@ApiMember(Description="Region/State")
var stateId:String? = null
/**
* City Name
*/
@ApiMember(Description="City Name")
var city:String? = null
/**
* Postal Code
*/
@ApiMember(Description="Postal Code")
var zipCode:String? = null
/**
* Street Name and Number
*/
@ApiMember(Description="Street Name and Number")
var street:String? = null
/**
* Street 2
*/
@ApiMember(Description="Street 2")
var street2:String? = null
/**
* Street 3
*/
@ApiMember(Description="Street 3")
var street3:String? = null
/**
* Street 4
*/
@ApiMember(Description="Street 4")
var street4:String? = null
/**
* Street 5
*/
@ApiMember(Description="Street 5")
var street5:String? = null
/**
* Main Address
*/
@ApiMember(Description="Main Address", IsRequired=true)
var isMainAddress:Boolean? = null
/**
* Post Office Box
*/
@ApiMember(Description="Post Office Box")
var poBox:String? = null
/**
* Additional Information
*/
@ApiMember(Description="Additional Information")
var additionalInformation:String? = null
}
open class Event
{
/**
* Event type e.g. 'Birthday', 'Wedding', 'Anniversary', 'Barmitza', 'Other'
*/
@ApiMember(Description="Event type e.g. 'Birthday', 'Wedding', 'Anniversary', 'Barmitza', 'Other'", IsRequired=true)
var eventType:String? = null
/**
* Event date e.g. '2021-01-20'
*/
@ApiMember(Description="Event date e.g. '2021-01-20'", IsRequired=true)
var eventDate:Date? = null
/**
* Event notes
*/
@ApiMember(Description="Event notes")
var eventNotes:String? = null
/**
* Event other name
*/
@ApiMember(Description="Event other name")
var eventOtherName:String? = null
}
open class Interest
{
/**
* Interest description
*/
@ApiMember(Description="Interest description", IsRequired=true)
var interest:String? = null
/**
* SAP Interest ID, e.g. 'CA-1'
*/
@ApiMember(Description="SAP Interest ID, e.g. 'CA-1'", IsRequired=true)
var sapInterestId:String? = null
/**
* Interest description translation
*/
@ApiMember(Description="Interest description translation")
var translation:String? = null
}
open class Hobby
{
/**
* Hobby description
*/
@ApiMember(Description="Hobby description", IsRequired=true)
var hobby:String? = null
/**
* SAP Hobby ID, e.g. 'ART'
*/
@ApiMember(Description="SAP Hobby ID, e.g. 'ART'", IsRequired=true)
var sapHobbyId:String? = null
/**
* Hobby description translation
*/
@ApiMember(Description="Hobby description translation")
var translation:String? = null
}
open class ProductCollection
{
/**
* Product Collection description
*/
@ApiMember(Description="Product Collection description", IsRequired=true)
var productCollection:String? = null
/**
* SAP ProductCollection ID, e.g. 'CA-1'
*/
@ApiMember(Description="SAP ProductCollection ID, e.g. 'CA-1'", IsRequired=true)
var sapProductCollectionId:String? = null
/**
* Product Collection description translation
*/
@ApiMember(Description="Product Collection description translation", IsRequired=true)
var translation:String? = null
}
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/" />