| GET | /customer/{boosterCustomerId} | Get customer details | Get Customer info based on the Booster Customer ID |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetCustomer
{
/**
* Booster Customer ID
*/
@ApiMember(Description="Booster Customer ID", IsRequired=true)
public Integer boosterCustomerId = null;
public Integer getBoosterCustomerId() { return boosterCustomerId; }
public GetCustomer setBoosterCustomerId(Integer value) { this.boosterCustomerId = value; return this; }
}
public static class GetCustomerResponse
{
/**
* Booster Customer ID
*/
@ApiMember(Description="Booster Customer ID", IsRequired=true)
public Integer id = null;
/**
* SAP Customer ID
*/
@ApiMember(Description="SAP Customer ID", IsRequired=true)
public String sapId = null;
/**
* Customer Reference
*/
@ApiMember(Description="Customer Reference", IsRequired=true)
public String customerReference = null;
/**
* Gender
*/
@ApiMember(Description="Gender", IsRequired=true)
public String gender = null;
/**
* Personal Title
*/
@ApiMember(Description="Personal Title", IsRequired=true)
public String personalTitle = null;
/**
* First Name
*/
@ApiMember(Description="First Name", IsRequired=true)
public String firstName = null;
/**
* Customer Last Name
*/
@ApiMember(Description="Customer Last Name", IsRequired=true)
public String lastName = null;
/**
* First Name Not Latin
*/
@ApiMember(Description="First Name Not Latin", IsRequired=true)
public String firstNameNotLatin = null;
/**
* Customer Last Name Not Latin
*/
@ApiMember(Description="Customer Last Name Not Latin", IsRequired=true)
public String lastNameNotLatin = null;
/**
* Middle Name
*/
@ApiMember(Description="Middle Name", IsRequired=true)
public String middleName = null;
/**
* Can be contacted or not?
*/
@ApiMember(Description="Can be contacted or not?", IsRequired=true)
public Boolean canBeContacted = null;
/**
* Language
*/
@ApiMember(Description="Language", IsRequired=true)
public String language = null;
/**
* Country
*/
@ApiMember(Description="Country", IsRequired=true)
public String countryId = null;
/**
* Brand Trigram
*/
@ApiMember(Description="Brand Trigram", IsRequired=true)
public String brand = null;
/**
* List of Emails
*/
@ApiMember(Description="List of Emails", IsRequired=true)
public ArrayList<CustomerEmail> emails = null;
/**
* List of Phone Numbers
*/
@ApiMember(Description="List of Phone Numbers", IsRequired=true)
public ArrayList<CustomerPhone> phones = null;
/**
* List of Events
*/
@ApiMember(Description="List of Events", IsRequired=true)
public ArrayList<CustomerEvent> events = null;
/**
* Registration date
*/
@ApiMember(Description="Registration date")
public Date registrationDate = null;
public Integer getId() { return id; }
public GetCustomerResponse setId(Integer value) { this.id = value; return this; }
public String getSapId() { return sapId; }
public GetCustomerResponse setSapId(String value) { this.sapId = value; return this; }
public String getCustomerReference() { return customerReference; }
public GetCustomerResponse setCustomerReference(String value) { this.customerReference = value; return this; }
public String getGender() { return gender; }
public GetCustomerResponse setGender(String value) { this.gender = value; return this; }
public String getPersonalTitle() { return personalTitle; }
public GetCustomerResponse setPersonalTitle(String value) { this.personalTitle = value; return this; }
public String getFirstName() { return firstName; }
public GetCustomerResponse setFirstName(String value) { this.firstName = value; return this; }
public String getLastName() { return lastName; }
public GetCustomerResponse setLastName(String value) { this.lastName = value; return this; }
public String getFirstNameNotLatin() { return firstNameNotLatin; }
public GetCustomerResponse setFirstNameNotLatin(String value) { this.firstNameNotLatin = value; return this; }
public String getLastNameNotLatin() { return lastNameNotLatin; }
public GetCustomerResponse setLastNameNotLatin(String value) { this.lastNameNotLatin = value; return this; }
public String getMiddleName() { return middleName; }
public GetCustomerResponse setMiddleName(String value) { this.middleName = value; return this; }
public Boolean isCanBeContacted() { return canBeContacted; }
public GetCustomerResponse setCanBeContacted(Boolean value) { this.canBeContacted = value; return this; }
public String getLanguage() { return language; }
public GetCustomerResponse setLanguage(String value) { this.language = value; return this; }
public String getCountryId() { return countryId; }
public GetCustomerResponse setCountryId(String value) { this.countryId = value; return this; }
public String getBrand() { return brand; }
public GetCustomerResponse setBrand(String value) { this.brand = value; return this; }
public ArrayList<CustomerEmail> getEmails() { return emails; }
public GetCustomerResponse setEmails(ArrayList<CustomerEmail> value) { this.emails = value; return this; }
public ArrayList<CustomerPhone> getPhones() { return phones; }
public GetCustomerResponse setPhones(ArrayList<CustomerPhone> value) { this.phones = value; return this; }
public ArrayList<CustomerEvent> getEvents() { return events; }
public GetCustomerResponse setEvents(ArrayList<CustomerEvent> value) { this.events = value; return this; }
public Date getRegistrationDate() { return registrationDate; }
public GetCustomerResponse setRegistrationDate(Date value) { this.registrationDate = value; return this; }
}
public static class CustomerEmail
{
/**
* Description
*/
@ApiMember(Description="Description", IsRequired=true)
public String description = null;
/**
* Email Address
*/
@ApiMember(Description="Email Address", IsRequired=true)
public String email = null;
/**
* Is main email address
*/
@ApiMember(Description="Is main email address", IsRequired=true)
public Boolean isMain = null;
public String getDescription() { return description; }
public CustomerEmail setDescription(String value) { this.description = value; return this; }
public String getEmail() { return email; }
public CustomerEmail setEmail(String value) { this.email = value; return this; }
public Boolean getIsMain() { return isMain; }
public CustomerEmail setIsMain(Boolean value) { this.isMain = value; return this; }
}
public static class CustomerPhone
{
/**
* Description
*/
@ApiMember(Description="Description", IsRequired=true)
public String description = null;
/**
* Phone Number
*/
@ApiMember(Description="Phone Number", IsRequired=true)
public String phone = null;
/**
* Is main phone number
*/
@ApiMember(Description="Is main phone number ", IsRequired=true)
public Boolean isMain = null;
/**
* Phone number country prefix
*/
@ApiMember(Description="Phone number country prefix", IsRequired=true)
public String prefixCountryId = null;
/**
* Telephone prefix
*/
@ApiMember(Description="Telephone prefix", IsRequired=true)
public String telephonePrefix = null;
public String getDescription() { return description; }
public CustomerPhone setDescription(String value) { this.description = value; return this; }
public String getPhone() { return phone; }
public CustomerPhone setPhone(String value) { this.phone = value; return this; }
public Boolean getIsMain() { return isMain; }
public CustomerPhone setIsMain(Boolean value) { this.isMain = value; return this; }
public String getPrefixCountryId() { return prefixCountryId; }
public CustomerPhone setPrefixCountryId(String value) { this.prefixCountryId = value; return this; }
public String getTelephonePrefix() { return telephonePrefix; }
public CustomerPhone setTelephonePrefix(String value) { this.telephonePrefix = value; return this; }
}
public static class CustomerEvent
{
/**
* Event Id
*/
@ApiMember(Description="Event Id", IsRequired=true)
public Integer eventId = null;
/**
* Event Description
*/
@ApiMember(Description="Event Description ", IsRequired=true)
public String eventDescription = null;
/**
* Event Other
*/
@ApiMember(Description="Event Other", IsRequired=true)
public String eventTypeOther = null;
/**
* Comment
*/
@ApiMember(Description="Comment", IsRequired=true)
public String comment = null;
/**
* Event Day
*/
@ApiMember(Description="Event Day", IsRequired=true)
public Integer eventDay = null;
/**
* Event Month
*/
@ApiMember(Description="Event Month", IsRequired=true)
public Integer eventMonth = null;
/**
* Event Year
*/
@ApiMember(Description="Event Year", IsRequired=true)
public Integer eventYear = null;
public Integer getEventId() { return eventId; }
public CustomerEvent setEventId(Integer value) { this.eventId = value; return this; }
public String getEventDescription() { return eventDescription; }
public CustomerEvent setEventDescription(String value) { this.eventDescription = value; return this; }
public String getEventTypeOther() { return eventTypeOther; }
public CustomerEvent setEventTypeOther(String value) { this.eventTypeOther = value; return this; }
public String getComment() { return comment; }
public CustomerEvent setComment(String value) { this.comment = value; return this; }
public Integer getEventDay() { return eventDay; }
public CustomerEvent setEventDay(Integer value) { this.eventDay = value; return this; }
public Integer getEventMonth() { return eventMonth; }
public CustomerEvent setEventMonth(Integer value) { this.eventMonth = value; return this; }
public Integer getEventYear() { return eventYear; }
public CustomerEvent setEventYear(Integer value) { this.eventYear = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
id: 0,
sapId: String,
customerReference: String,
gender: String,
personalTitle: String,
firstName: String,
lastName: String,
firstNameNotLatin: String,
lastNameNotLatin: String,
middleName: String,
canBeContacted: False,
language: String,
countryId: String,
brand: String,
emails:
[
{
description: String,
email: String,
isMain: False
}
],
phones:
[
{
description: String,
phone: String,
isMain: False,
prefixCountryId: String,
telephonePrefix: String
}
],
events:
[
{
eventId: 0,
eventDescription: String,
eventTypeOther: String,
comment: String,
eventDay: 0,
eventMonth: 0,
eventYear: 0
}
],
registrationDate: 0001-01-01
}