| GET | /customer/{boosterCustomerId} | Get customer details | Get Customer info based on the Booster Customer ID |
|---|
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 CustomerEmail
{
///<summary>
///Description
///</summary>
[ApiMember(Description="Description", IsRequired=true)]
public virtual string description { get; set; }
///<summary>
///Email Address
///</summary>
[ApiMember(Description="Email Address", IsRequired=true)]
public virtual string email { get; set; }
///<summary>
///Is main email address
///</summary>
[ApiMember(Description="Is main email address", IsRequired=true)]
public virtual bool isMain { get; set; }
}
public partial class CustomerEvent
{
///<summary>
///Event Id
///</summary>
[ApiMember(Description="Event Id", IsRequired=true)]
public virtual int eventId { get; set; }
///<summary>
///Event Description
///</summary>
[ApiMember(Description="Event Description ", IsRequired=true)]
public virtual string eventDescription { get; set; }
///<summary>
///Event Other
///</summary>
[ApiMember(Description="Event Other", IsRequired=true)]
public virtual string eventTypeOther { get; set; }
///<summary>
///Comment
///</summary>
[ApiMember(Description="Comment", IsRequired=true)]
public virtual string comment { get; set; }
///<summary>
///Event Day
///</summary>
[ApiMember(Description="Event Day", IsRequired=true)]
public virtual int? eventDay { get; set; }
///<summary>
///Event Month
///</summary>
[ApiMember(Description="Event Month", IsRequired=true)]
public virtual int? eventMonth { get; set; }
///<summary>
///Event Year
///</summary>
[ApiMember(Description="Event Year", IsRequired=true)]
public virtual int? eventYear { get; set; }
}
public partial class CustomerPhone
{
///<summary>
///Description
///</summary>
[ApiMember(Description="Description", IsRequired=true)]
public virtual string description { get; set; }
///<summary>
///Phone Number
///</summary>
[ApiMember(Description="Phone Number", IsRequired=true)]
public virtual string phone { get; set; }
///<summary>
///Is main phone number
///</summary>
[ApiMember(Description="Is main phone number ", IsRequired=true)]
public virtual bool isMain { get; set; }
///<summary>
///Phone number country prefix
///</summary>
[ApiMember(Description="Phone number country prefix", IsRequired=true)]
public virtual string prefixCountryId { get; set; }
///<summary>
///Telephone prefix
///</summary>
[ApiMember(Description="Telephone prefix", IsRequired=true)]
public virtual string telephonePrefix { get; set; }
}
public partial class GetCustomer
{
///<summary>
///Booster Customer ID
///</summary>
[ApiMember(Description="Booster Customer ID", IsRequired=true)]
public virtual int boosterCustomerId { get; set; }
}
public partial class GetCustomerResponse
{
public GetCustomerResponse()
{
emails = new List<CustomerEmail>{};
phones = new List<CustomerPhone>{};
events = new List<CustomerEvent>{};
}
///<summary>
///Booster Customer ID
///</summary>
[ApiMember(Description="Booster Customer ID", IsRequired=true)]
public virtual int id { get; set; }
///<summary>
///SAP Customer ID
///</summary>
[ApiMember(Description="SAP Customer ID", IsRequired=true)]
public virtual string sapId { get; set; }
///<summary>
///Customer Reference
///</summary>
[ApiMember(Description="Customer Reference", IsRequired=true)]
public virtual string customerReference { get; set; }
///<summary>
///Gender
///</summary>
[ApiMember(Description="Gender", IsRequired=true)]
public virtual string gender { get; set; }
///<summary>
///Personal Title
///</summary>
[ApiMember(Description="Personal Title", IsRequired=true)]
public virtual string personalTitle { get; set; }
///<summary>
///First Name
///</summary>
[ApiMember(Description="First Name", IsRequired=true)]
public virtual string firstName { get; set; }
///<summary>
///Customer Last Name
///</summary>
[ApiMember(Description="Customer Last Name", IsRequired=true)]
public virtual string lastName { get; set; }
///<summary>
///First Name Not Latin
///</summary>
[ApiMember(Description="First Name Not Latin", IsRequired=true)]
public virtual string firstNameNotLatin { get; set; }
///<summary>
///Customer Last Name Not Latin
///</summary>
[ApiMember(Description="Customer Last Name Not Latin", IsRequired=true)]
public virtual string lastNameNotLatin { get; set; }
///<summary>
///Middle Name
///</summary>
[ApiMember(Description="Middle Name", IsRequired=true)]
public virtual string middleName { get; set; }
///<summary>
///Can be contacted or not?
///</summary>
[ApiMember(Description="Can be contacted or not?", IsRequired=true)]
public virtual bool canBeContacted { get; set; }
///<summary>
///Language
///</summary>
[ApiMember(Description="Language", IsRequired=true)]
public virtual string language { get; set; }
///<summary>
///Country
///</summary>
[ApiMember(Description="Country", IsRequired=true)]
public virtual string countryId { get; set; }
///<summary>
///Brand Trigram
///</summary>
[ApiMember(Description="Brand Trigram", IsRequired=true)]
public virtual string brand { get; set; }
///<summary>
///List of Emails
///</summary>
[ApiMember(Description="List of Emails", IsRequired=true)]
public virtual List<CustomerEmail> emails { get; set; }
///<summary>
///List of Phone Numbers
///</summary>
[ApiMember(Description="List of Phone Numbers", IsRequired=true)]
public virtual List<CustomerPhone> phones { get; set; }
///<summary>
///List of Events
///</summary>
[ApiMember(Description="List of Events", IsRequired=true)]
public virtual List<CustomerEvent> events { get; set; }
///<summary>
///Registration date
///</summary>
[ApiMember(Description="Registration date")]
public virtual DateTime? registrationDate { 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.
GET /customer/{boosterCustomerId} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetCustomerResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.CRM.ServiceModel">
<brand>String</brand>
<canBeContacted>false</canBeContacted>
<countryId>String</countryId>
<customerReference>String</customerReference>
<emails>
<CustomerEmail>
<description>String</description>
<email>String</email>
<isMain>false</isMain>
</CustomerEmail>
</emails>
<events>
<CustomerEvent>
<comment>String</comment>
<eventDay>0</eventDay>
<eventDescription>String</eventDescription>
<eventId>0</eventId>
<eventMonth>0</eventMonth>
<eventTypeOther>String</eventTypeOther>
<eventYear>0</eventYear>
</CustomerEvent>
</events>
<firstName>String</firstName>
<firstNameNotLatin>String</firstNameNotLatin>
<gender>String</gender>
<id>0</id>
<language>String</language>
<lastName>String</lastName>
<lastNameNotLatin>String</lastNameNotLatin>
<middleName>String</middleName>
<personalTitle>String</personalTitle>
<phones>
<CustomerPhone>
<description>String</description>
<isMain>false</isMain>
<phone>String</phone>
<prefixCountryId>String</prefixCountryId>
<telephonePrefix>String</telephonePrefix>
</CustomerPhone>
</phones>
<registrationDate>0001-01-01T00:00:00</registrationDate>
<sapId>String</sapId>
</GetCustomerResponse>