PUT | /customer/{boosterCustomerId} | Update customer | Update CRM customer |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Richemont.Booster2.PublicApi.CRM.ServiceModel
Namespace Global
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 Overridable Property addressType As String
'''<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 Overridable Property countryId As String
'''<Summary>
'''House Number
'''</Summary>
<ApiMember(Description:="House Number")>
Public Overridable Property houseNumber As String
'''<Summary>
'''Region/State
'''</Summary>
<ApiMember(Description:="Region/State")>
Public Overridable Property stateId As String
'''<Summary>
'''City Name
'''</Summary>
<ApiMember(Description:="City Name")>
Public Overridable Property city As String
'''<Summary>
'''Postal Code
'''</Summary>
<ApiMember(Description:="Postal Code")>
Public Overridable Property zipCode As String
'''<Summary>
'''Street Name and Number
'''</Summary>
<ApiMember(Description:="Street Name and Number")>
Public Overridable Property street As String
'''<Summary>
'''Street 2
'''</Summary>
<ApiMember(Description:="Street 2")>
Public Overridable Property street2 As String
'''<Summary>
'''Street 3
'''</Summary>
<ApiMember(Description:="Street 3")>
Public Overridable Property street3 As String
'''<Summary>
'''Street 4
'''</Summary>
<ApiMember(Description:="Street 4")>
Public Overridable Property street4 As String
'''<Summary>
'''Street 5
'''</Summary>
<ApiMember(Description:="Street 5")>
Public Overridable Property street5 As String
'''<Summary>
'''Main Address
'''</Summary>
<ApiMember(Description:="Main Address", IsRequired:=true)>
Public Overridable Property isMainAddress As Boolean
'''<Summary>
'''Post Office Box
'''</Summary>
<ApiMember(Description:="Post Office Box")>
Public Overridable Property poBox As String
'''<Summary>
'''Additional Information
'''</Summary>
<ApiMember(Description:="Additional Information")>
Public Overridable Property additionalInformation As String
End Class
Public Partial Class Customer
Public Sub New()
emails = New List(Of Email)
phones = New List(Of Phone)
addresses = New List(Of Address)
events = New List(Of Event)
interests = New List(Of Interest)
hobbies = New List(Of Hobby)
productCollections = New List(Of ProductCollection)
End Sub
'''<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 Overridable Property title As String
'''<Summary>
'''First Name
'''</Summary>
<ApiMember(Description:="First Name")>
Public Overridable Property firstName As String
'''<Summary>
'''Last Name - Mandatory only when customer type is 'PRIVATE'
'''</Summary>
<ApiMember(Description:="Last Name - Mandatory only when customer type is 'PRIVATE'")>
Public Overridable Property lastName As String
'''<Summary>
'''First Name Not Latin
'''</Summary>
<ApiMember(Description:="First Name Not Latin")>
Public Overridable Property firstNameNotLatin As String
'''<Summary>
'''Last Name Not Latin
'''</Summary>
<ApiMember(Description:="Last Name Not Latin")>
Public Overridable Property lastNameNotLatin As String
'''<Summary>
'''Middle Name
'''</Summary>
<ApiMember(Description:="Middle Name")>
Public Overridable Property middleName As String
'''<Summary>
'''Name Suffix
'''</Summary>
<ApiMember(Description:="Name Suffix")>
Public Overridable Property nameSuffix As String
'''<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 Overridable Property canBeContactedByMaison As Boolean
'''<Summary>
'''Customer Type e.g. 'PRIVATE' or 'COMPANY'
'''</Summary>
<ApiMember(Description:="Customer Type e.g. 'PRIVATE' or 'COMPANY'", IsRequired:=true)>
Public Overridable Property clientType As String
'''<Summary>
'''Company Name - Mandatory only when customer type is 'COMPANY'
'''</Summary>
<ApiMember(Description:="Company Name - Mandatory only when customer type is 'COMPANY'")>
Public Overridable Property companyName As String
'''<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 Overridable Property languageId As String
'''<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 Overridable Property gender As String
'''<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 Overridable Property countryId As String
'''<Summary>
'''Birth Date e.g. '2020-12-30'
'''</Summary>
<ApiMember(Description:="Birth Date e.g. '2020-12-30'")>
Public Overridable Property birthDate As Nullable(Of Date)
'''<Summary>
'''Customer reference
'''</Summary>
<ApiMember(Description:="Customer reference")>
Public Overridable Property customerReference As String
'''<Summary>
'''POS Code e.g. ES100:102048
'''</Summary>
<ApiMember(Description:="POS Code e.g. ES100:102048", IsRequired:=true)>
Public Overridable Property posCode As String
'''<Summary>
'''Brand e.g. CAR, MTB
'''</Summary>
<ApiMember(Description:="Brand e.g. CAR, MTB", IsRequired:=true)>
Public Overridable Property brand As String
'''<Summary>
'''Wedding Date, e.g. '2020-01-18'
'''</Summary>
<ApiMember(Description:="Wedding Date, e.g. '2020-01-18'")>
Public Overridable Property weddingDate As Nullable(Of Date)
'''<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 Overridable Property preferredContactMethod As String
'''<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 Overridable Property contactByEmailFlag As Boolean
'''<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 Overridable Property contactByMailFlag As Boolean
'''<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 Overridable Property contactByPhoneFlag As Boolean
'''<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 Overridable Property contactBySMSFlag As Boolean
'''<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 Overridable Property contactBySocialMediaFlag As Boolean
'''<Summary>
'''Sale Representative Email e.g. rauf.aliyev@richemont.com
'''</Summary>
<ApiMember(Description:="Sale Representative Email e.g. rauf.aliyev@richemont.com")>
Public Overridable Property saleRepresentativeEmail As String
'''<Summary>
'''Consent for allowing Cross Border Data Transfer
'''</Summary>
<ApiMember(Description:="Consent for allowing Cross Border Data Transfer")>
Public Overridable Property allowStoreDataAbroad As Nullable(Of Boolean)
'''<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 Overridable Property tvAllowStoreDataAbroad As Nullable(Of Boolean)
'''<Summary>
'''Customer emails
'''</Summary>
<ApiMember(Description:="Customer emails")>
Public Overridable Property emails As List(Of Email)
'''<Summary>
'''Customer phones
'''</Summary>
<ApiMember(Description:="Customer phones")>
Public Overridable Property phones As List(Of Phone)
'''<Summary>
'''Customer addresses
'''</Summary>
<ApiMember(Description:="Customer addresses")>
Public Overridable Property addresses As List(Of Address)
'''<Summary>
'''Customer events
'''</Summary>
<ApiMember(Description:="Customer events")>
Public Overridable Property events As List(Of Event)
'''<Summary>
'''Customer interests
'''</Summary>
<ApiMember(Description:="Customer interests")>
Public Overridable Property interests As List(Of Interest)
'''<Summary>
'''Customer hobbies
'''</Summary>
<ApiMember(Description:="Customer hobbies")>
Public Overridable Property hobbies As List(Of Hobby)
'''<Summary>
'''Customer product collections
'''</Summary>
<ApiMember(Description:="Customer product collections")>
Public Overridable Property productCollections As List(Of ProductCollection)
'''<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 Overridable Property dataSharingConsent As Nullable(Of Boolean)
'''<Summary>
'''Notes
'''</Summary>
<ApiMember(Description:="Notes")>
Public Overridable Property notes As String
'''<Summary>
'''Reference Sale Representative Email
'''</Summary>
<ApiMember(Description:="Reference Sale Representative Email")>
Public Overridable Property referenceSaleRepresentativeEmail As String
'''<Summary>
'''Registration Date
'''</Summary>
<ApiMember(Description:="Registration Date")>
Public Overridable Property registrationDate As Nullable(Of Date)
End Class
Public Partial Class Email
'''<Summary>
'''Email
'''</Summary>
<ApiMember(Description:="Email", IsRequired:=true)>
Public Overridable Property email As String
'''<Summary>
'''Main email
'''</Summary>
<ApiMember(Description:="Main email", IsRequired:=true)>
Public Overridable Property isMainEmail As Boolean
End Class
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 Overridable Property eventType As String
'''<Summary>
'''Event date e.g. '2021-01-20'
'''</Summary>
<ApiMember(Description:="Event date e.g. '2021-01-20'", IsRequired:=true)>
Public Overridable Property eventDate As Date
'''<Summary>
'''Event notes
'''</Summary>
<ApiMember(Description:="Event notes")>
Public Overridable Property eventNotes As String
'''<Summary>
'''Event other name
'''</Summary>
<ApiMember(Description:="Event other name")>
Public Overridable Property eventOtherName As String
End Class
Public Partial Class Hobby
'''<Summary>
'''Hobby description
'''</Summary>
<ApiMember(Description:="Hobby description", IsRequired:=true)>
Public Overridable Property hobby As String
'''<Summary>
'''SAP Hobby ID, e.g. 'ART'
'''</Summary>
<ApiMember(Description:="SAP Hobby ID, e.g. 'ART'", IsRequired:=true)>
Public Overridable Property sapHobbyId As String
'''<Summary>
'''Hobby description translation
'''</Summary>
<ApiMember(Description:="Hobby description translation")>
Public Overridable Property translation As String
End Class
Public Partial Class Interest
'''<Summary>
'''Interest description
'''</Summary>
<ApiMember(Description:="Interest description", IsRequired:=true)>
Public Overridable Property interest As String
'''<Summary>
'''SAP Interest ID, e.g. 'CA-1'
'''</Summary>
<ApiMember(Description:="SAP Interest ID, e.g. 'CA-1'", IsRequired:=true)>
Public Overridable Property sapInterestId As String
'''<Summary>
'''Interest description translation
'''</Summary>
<ApiMember(Description:="Interest description translation")>
Public Overridable Property translation As String
End Class
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 Overridable Property phone As String
'''<Summary>
'''Prefix Country Id e.g. it, fr, az
'''</Summary>
<ApiMember(Description:="Prefix Country Id e.g. it, fr, az", IsRequired:=true)>
Public Overridable Property countryPrefix As String
'''<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 Overridable Property phoneType As String
'''<Summary>
'''Main Phone
'''</Summary>
<ApiMember(Description:="Main Phone", IsRequired:=true)>
Public Overridable Property isMainPhone As Boolean
End Class
Public Partial Class ProductCollection
'''<Summary>
'''Product Collection description
'''</Summary>
<ApiMember(Description:="Product Collection description", IsRequired:=true)>
Public Overridable Property productCollection As String
'''<Summary>
'''SAP ProductCollection ID, e.g. 'CA-1'
'''</Summary>
<ApiMember(Description:="SAP ProductCollection ID, e.g. 'CA-1'", IsRequired:=true)>
Public Overridable Property sapProductCollectionId As String
'''<Summary>
'''Product Collection description translation
'''</Summary>
<ApiMember(Description:="Product Collection description translation", IsRequired:=true)>
Public Overridable Property translation As String
End Class
Public Partial Class UpdateCustomer
Inherits Customer
'''<Summary>
'''Booster customer Id
'''</Summary>
<ApiMember(Description:="Booster customer Id")>
Public Overridable Property boosterCustomerId As Integer
End Class
End Namespace
End Namespace
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/" />