| GET | /customer/{brand}/slim | Get customers list | Get slim list of customers paginated and sorted |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class GetCustomerPaginated extends SearchCustomer implements IPagedRequest
{
/**
* Index of the result set returned
*/
@ApiMember(Description="Index of the result set returned")
public Integer page = null;
/**
* Size of the result set returned
*/
@ApiMember(Description="Size of the result set returned")
public Integer items = null;
/**
* Omit precise record count - save on performance
*/
@ApiMember(Description="Omit precise record count - save on performance")
public Boolean noCount = null;
/**
* Values can be 'NameDESC', 'NameASC', 'RegASC', 'RegDESC'
*/
@ApiMember(Description="Values can be 'NameDESC', 'NameASC', 'RegASC', 'RegDESC'")
public String sortBy = null;
public Integer getPage() { return page; }
public GetCustomerPaginated setPage(Integer value) { this.page = value; return this; }
public Integer getItems() { return items; }
public GetCustomerPaginated setItems(Integer value) { this.items = value; return this; }
public Boolean isNoCount() { return noCount; }
public GetCustomerPaginated setNoCount(Boolean value) { this.noCount = value; return this; }
public String getSortBy() { return sortBy; }
public GetCustomerPaginated setSortBy(String value) { this.sortBy = value; return this; }
}
public static class SearchCustomer
{
/**
* Brand
*/
@ApiMember(Description="Brand", IsRequired=true)
public String brand = null;
/**
* POS Legacy
*/
@ApiMember(Description="POS Legacy", IsRequired=true)
public ArrayList<String> posCodes = null;
/**
* Search key could be: 'Name', 'Email', 'Phone' without prefix, 'BoosterCustomerId' OR 'SapCRMId'
*/
@ApiMember(Description="Search key could be: 'Name', 'Email', 'Phone' without prefix, 'BoosterCustomerId' OR 'SapCRMId'")
public String searchKey = null;
/**
* Search by phone number - exact match
*/
@ApiMember(Description="Search by phone number - exact match")
public String phoneNumber = null;
/**
* Search by email address - exact match
*/
@ApiMember(Description="Search by email address - exact match")
public String email = null;
/**
* Values can be 'it', 'en' etc.
*/
@ApiMember(Description="Values can be 'it', 'en' etc.")
public ArrayList<String> locationCountryIds = null;
/**
* Client Spending From e.g. '100'
*/
@ApiMember(Description="Client Spending From e.g. '100'")
public Double clientSpendingFrom = null;
/**
* Client Spending To e.g. '50000'
*/
@ApiMember(Description="Client Spending To e.g. '50000'")
public Double clientSpendingTo = null;
/**
* Customer Creation Date From e.g. '2022-01-01'
*/
@ApiMember(Description="Customer Creation Date From e.g. '2022-01-01'")
public Date creationDateFrom = null;
/**
* Customer Creation Date To e.g. '2023-11-01'
*/
@ApiMember(Description="Customer Creation Date To e.g. '2023-11-01'")
public Date creationDateTo = null;
/**
* Transaction Date From e.g. '2022-01-01'
*/
@ApiMember(Description="Transaction Date From e.g. '2022-01-01'")
public Date transactionDateFrom = null;
/**
* Transaction Date To e.g. '2023-11-01'
*/
@ApiMember(Description="Transaction Date To e.g. '2023-11-01'")
public Date transactionDateTo = null;
/**
* Values can be 'true' or 'false'
*/
@ApiMember(Description="Values can be 'true' or 'false'")
public Boolean canBeContactedByMaison = null;
/**
* Values can be 1 for 'January', 2 for 'February', 3 for 'March', 4 for 'April', 5 for 'May', 6 for 'June', 7 for 'July', 8 for 'August', 9 for 'September', 10 for 'October', 11 for 'November', 12 for 'December'
*/
@ApiMember(Description="Values can be 1 for 'January', 2 for 'February', 3 for 'March', 4 for 'April', 5 for 'May', 6 for 'June', 7 for 'July', 8 for 'August', 9 for 'September', 10 for 'October', 11 for 'November', 12 for 'December'")
public ArrayList<Integer> birthdateMonths = null;
/**
* Customer interest filter
*/
@ApiMember(Description="Customer interest filter")
public ArrayList<GetCustomerInterest> interests = null;
/**
* Customer hobby filter
*/
@ApiMember(Description="Customer hobby filter")
public ArrayList<GetCustomerHobby> hobbies = null;
/**
* Customer product collection filter
*/
@ApiMember(Description="Customer product collection filter")
public ArrayList<GetCustomerProductCollection> productCollections = null;
/**
* Customer Status e.g. 'Prospect', 'Client'
*/
@ApiMember(Description="Customer Status e.g. 'Prospect', 'Client'")
public ArrayList<String> customerStatus = null;
/**
* List of BoosterCustomerIds, e.g. 1234567,1231231,12323423
*/
@ApiMember(Description="List of BoosterCustomerIds, e.g. 1234567,1231231,12323423")
public ArrayList<Integer> boosterCustomerIds = null;
/**
* Values can be 'true' or 'false'
*/
@ApiMember(Description="Values can be 'true' or 'false'")
public Boolean hasSapCrmError = null;
/**
* Product Categories
*/
@ApiMember(Description="Product Categories")
public ArrayList<ProductCategory> productCategories = null;
/**
* Sale Reprentative Emails
*/
@ApiMember(Description="Sale Reprentative Emails")
public ArrayList<String> saleRepresentativeEmails = null;
public String getBrand() { return brand; }
public SearchCustomer setBrand(String value) { this.brand = value; return this; }
public ArrayList<String> getPosCodes() { return posCodes; }
public SearchCustomer setPosCodes(ArrayList<String> value) { this.posCodes = value; return this; }
public String getSearchKey() { return searchKey; }
public SearchCustomer setSearchKey(String value) { this.searchKey = value; return this; }
public String getPhoneNumber() { return phoneNumber; }
public SearchCustomer setPhoneNumber(String value) { this.phoneNumber = value; return this; }
public String getEmail() { return email; }
public SearchCustomer setEmail(String value) { this.email = value; return this; }
public ArrayList<String> getLocationCountryIds() { return locationCountryIds; }
public SearchCustomer setLocationCountryIds(ArrayList<String> value) { this.locationCountryIds = value; return this; }
public Double getClientSpendingFrom() { return clientSpendingFrom; }
public SearchCustomer setClientSpendingFrom(Double value) { this.clientSpendingFrom = value; return this; }
public Double getClientSpendingTo() { return clientSpendingTo; }
public SearchCustomer setClientSpendingTo(Double value) { this.clientSpendingTo = value; return this; }
public Date getCreationDateFrom() { return creationDateFrom; }
public SearchCustomer setCreationDateFrom(Date value) { this.creationDateFrom = value; return this; }
public Date getCreationDateTo() { return creationDateTo; }
public SearchCustomer setCreationDateTo(Date value) { this.creationDateTo = value; return this; }
public Date getTransactionDateFrom() { return transactionDateFrom; }
public SearchCustomer setTransactionDateFrom(Date value) { this.transactionDateFrom = value; return this; }
public Date getTransactionDateTo() { return transactionDateTo; }
public SearchCustomer setTransactionDateTo(Date value) { this.transactionDateTo = value; return this; }
public Boolean isCanBeContactedByMaison() { return canBeContactedByMaison; }
public SearchCustomer setCanBeContactedByMaison(Boolean value) { this.canBeContactedByMaison = value; return this; }
public ArrayList<Integer> getBirthdateMonths() { return birthdateMonths; }
public SearchCustomer setBirthdateMonths(ArrayList<Integer> value) { this.birthdateMonths = value; return this; }
public ArrayList<GetCustomerInterest> getInterests() { return interests; }
public SearchCustomer setInterests(ArrayList<GetCustomerInterest> value) { this.interests = value; return this; }
public ArrayList<GetCustomerHobby> getHobbies() { return hobbies; }
public SearchCustomer setHobbies(ArrayList<GetCustomerHobby> value) { this.hobbies = value; return this; }
public ArrayList<GetCustomerProductCollection> getProductCollections() { return productCollections; }
public SearchCustomer setProductCollections(ArrayList<GetCustomerProductCollection> value) { this.productCollections = value; return this; }
public ArrayList<String> getCustomerStatus() { return customerStatus; }
public SearchCustomer setCustomerStatus(ArrayList<String> value) { this.customerStatus = value; return this; }
public ArrayList<Integer> getBoosterCustomerIds() { return boosterCustomerIds; }
public SearchCustomer setBoosterCustomerIds(ArrayList<Integer> value) { this.boosterCustomerIds = value; return this; }
public Boolean isHasSapCrmError() { return hasSapCrmError; }
public SearchCustomer setHasSapCrmError(Boolean value) { this.hasSapCrmError = value; return this; }
public ArrayList<ProductCategory> getProductCategories() { return productCategories; }
public SearchCustomer setProductCategories(ArrayList<ProductCategory> value) { this.productCategories = value; return this; }
public ArrayList<String> getSaleRepresentativeEmails() { return saleRepresentativeEmails; }
public SearchCustomer setSaleRepresentativeEmails(ArrayList<String> value) { this.saleRepresentativeEmails = value; return this; }
}
public static class GetCustomerInterest
{
/**
* Interest description
*/
@ApiMember(Description="Interest description", IsRequired=true)
public String interest = null;
/**
* SAP Interest ID, e.g. 'CA-1'
*/
@ApiMember(Description="SAP Interest ID, e.g. 'CA-1'", IsRequired=true)
public String sapInterestId = null;
public String getInterest() { return interest; }
public GetCustomerInterest setInterest(String value) { this.interest = value; return this; }
public String getSapInterestId() { return sapInterestId; }
public GetCustomerInterest setSapInterestId(String value) { this.sapInterestId = value; return this; }
}
public static class GetCustomerHobby
{
/**
* Hobby description
*/
@ApiMember(Description="Hobby description")
public String hobby = null;
/**
* SAP Hobby ID, e.g. 'ART'
*/
@ApiMember(Description="SAP Hobby ID, e.g. 'ART'")
public String sapHobbyId = null;
public String getHobby() { return hobby; }
public GetCustomerHobby setHobby(String value) { this.hobby = value; return this; }
public String getSapHobbyId() { return sapHobbyId; }
public GetCustomerHobby setSapHobbyId(String value) { this.sapHobbyId = value; return this; }
}
public static class GetCustomerProductCollection
{
/**
* Product Collection description
*/
@ApiMember(Description="Product Collection description", IsRequired=true)
public String productCollection = null;
/**
* SAP ProductCollection ID, e.g. 'CA-1'
*/
@ApiMember(Description="SAP ProductCollection ID, e.g. 'CA-1'", IsRequired=true)
public String sapProductCollectionId = null;
public String getProductCollection() { return productCollection; }
public GetCustomerProductCollection setProductCollection(String value) { this.productCollection = value; return this; }
public String getSapProductCollectionId() { return sapProductCollectionId; }
public GetCustomerProductCollection setSapProductCollectionId(String value) { this.sapProductCollectionId = value; return this; }
}
public static class ProductCategory
{
/**
* Brand Category ID
*/
@ApiMember(Description="Brand Category ID")
public String brandCategoryId = null;
/**
* Grand Category ID
*/
@ApiMember(Description="Grand Category ID", IsRequired=true)
public String grandCategoryId = null;
/**
* Master Category ID
*/
@ApiMember(Description="Master Category ID")
public String masterCategoryId = null;
/**
* Category ID
*/
@ApiMember(Description="Category ID")
public String categoryId = null;
/**
* Sub Category ID
*/
@ApiMember(Description="Sub Category ID")
public String subCategoryId = null;
public String getBrandCategoryId() { return brandCategoryId; }
public ProductCategory setBrandCategoryId(String value) { this.brandCategoryId = value; return this; }
public String getGrandCategoryId() { return grandCategoryId; }
public ProductCategory setGrandCategoryId(String value) { this.grandCategoryId = value; return this; }
public String getMasterCategoryId() { return masterCategoryId; }
public ProductCategory setMasterCategoryId(String value) { this.masterCategoryId = value; return this; }
public String getCategoryId() { return categoryId; }
public ProductCategory setCategoryId(String value) { this.categoryId = value; return this; }
public String getSubCategoryId() { return subCategoryId; }
public ProductCategory setSubCategoryId(String value) { this.subCategoryId = value; return this; }
}
public static class GetCustomerPaginatedResponse
{
/**
* Total Pages
*/
@ApiMember(Description="Total Pages", IsRequired=true)
public Integer totalPages = null;
/**
* Total Results
*/
@ApiMember(Description="Total Results", IsRequired=true)
public Integer totalResults = null;
/**
* Index of the result set returned
*/
@ApiMember(Description="Index of the result set returned", IsRequired=true)
public Integer page = null;
/**
* Size of the result set returned
*/
@ApiMember(Description="Size of the result set returned", IsRequired=true)
public Integer items = null;
/**
* List of customers
*/
@ApiMember(Description="List of customers", IsRequired=true)
public ArrayList<GetCustomerPaginatedElement> elements = null;
public Integer getTotalPages() { return totalPages; }
public GetCustomerPaginatedResponse setTotalPages(Integer value) { this.totalPages = value; return this; }
public Integer getTotalResults() { return totalResults; }
public GetCustomerPaginatedResponse setTotalResults(Integer value) { this.totalResults = value; return this; }
public Integer getPage() { return page; }
public GetCustomerPaginatedResponse setPage(Integer value) { this.page = value; return this; }
public Integer getItems() { return items; }
public GetCustomerPaginatedResponse setItems(Integer value) { this.items = value; return this; }
public ArrayList<GetCustomerPaginatedElement> getElements() { return elements; }
public GetCustomerPaginatedResponse setElements(ArrayList<GetCustomerPaginatedElement> value) { this.elements = value; return this; }
}
public static class GetCustomerPaginatedElement
{
/**
* Booster Customer Id
*/
@ApiMember(Description="Booster Customer Id", IsRequired=true)
public Integer boosterCustomerId = null;
/**
* First name
*/
@ApiMember(Description="First name", IsRequired=true)
public String firstName = null;
/**
* Middle name
*/
@ApiMember(Description="Middle name", IsRequired=true)
public String middleName = null;
/**
* Last name
*/
@ApiMember(Description="Last name", IsRequired=true)
public String lastName = null;
/**
* First name Not Latin
*/
@ApiMember(Description="First name Not Latin", IsRequired=true)
public String firstNameNotLatin = null;
/**
* Last name Not Latin
*/
@ApiMember(Description="Last name Not Latin", IsRequired=true)
public String lastNameNotLatin = null;
/**
* Customer phone
*/
@ApiMember(Description="Customer phone", IsRequired=true)
public String phone = null;
/**
* Phone Country Prefix
*/
@ApiMember(Description="Phone Country Prefix", IsRequired=true)
public String countryPrefix = null;
/**
* Customer email
*/
@ApiMember(Description="Customer email", IsRequired=true)
public String email = null;
/**
* Data Sharing Consent
*/
@ApiMember(Description="Data Sharing Consent", IsRequired=true)
public Boolean dataSharingConsent = null;
/**
* Sellout Transaction Count
*/
@ApiMember(Description="Sellout Transaction Count", IsRequired=true)
public Integer selloutTransactionCount = null;
/**
* Elevate Customer ID
*/
@ApiMember(Description="Elevate Customer ID")
public String elevateCustomerId = null;
/**
* Elevate Consent Status
*/
@ApiMember(Description="Elevate Consent Status")
public String elevateConsentStatus = null;
/**
* Customer Country Id
*/
@ApiMember(Description="Customer Country Id")
public String countryId = null;
/**
* Registration date
*/
@ApiMember(Description="Registration date")
public Date registrationDate = null;
/**
* Sap Crm Error Message
*/
@ApiMember(Description="Sap Crm Error Message")
public String sapCrmErrorMessage = null;
public Integer getBoosterCustomerId() { return boosterCustomerId; }
public GetCustomerPaginatedElement setBoosterCustomerId(Integer value) { this.boosterCustomerId = value; return this; }
public String getFirstName() { return firstName; }
public GetCustomerPaginatedElement setFirstName(String value) { this.firstName = value; return this; }
public String getMiddleName() { return middleName; }
public GetCustomerPaginatedElement setMiddleName(String value) { this.middleName = value; return this; }
public String getLastName() { return lastName; }
public GetCustomerPaginatedElement setLastName(String value) { this.lastName = value; return this; }
public String getFirstNameNotLatin() { return firstNameNotLatin; }
public GetCustomerPaginatedElement setFirstNameNotLatin(String value) { this.firstNameNotLatin = value; return this; }
public String getLastNameNotLatin() { return lastNameNotLatin; }
public GetCustomerPaginatedElement setLastNameNotLatin(String value) { this.lastNameNotLatin = value; return this; }
public String getPhone() { return phone; }
public GetCustomerPaginatedElement setPhone(String value) { this.phone = value; return this; }
public String getCountryPrefix() { return countryPrefix; }
public GetCustomerPaginatedElement setCountryPrefix(String value) { this.countryPrefix = value; return this; }
public String getEmail() { return email; }
public GetCustomerPaginatedElement setEmail(String value) { this.email = value; return this; }
public Boolean isDataSharingConsent() { return dataSharingConsent; }
public GetCustomerPaginatedElement setDataSharingConsent(Boolean value) { this.dataSharingConsent = value; return this; }
public Integer getSelloutTransactionCount() { return selloutTransactionCount; }
public GetCustomerPaginatedElement setSelloutTransactionCount(Integer value) { this.selloutTransactionCount = value; return this; }
public String getElevateCustomerId() { return elevateCustomerId; }
public GetCustomerPaginatedElement setElevateCustomerId(String value) { this.elevateCustomerId = value; return this; }
public String getElevateConsentStatus() { return elevateConsentStatus; }
public GetCustomerPaginatedElement setElevateConsentStatus(String value) { this.elevateConsentStatus = value; return this; }
public String getCountryId() { return countryId; }
public GetCustomerPaginatedElement setCountryId(String value) { this.countryId = value; return this; }
public Date getRegistrationDate() { return registrationDate; }
public GetCustomerPaginatedElement setRegistrationDate(Date value) { this.registrationDate = value; return this; }
public String getSapCrmErrorMessage() { return sapCrmErrorMessage; }
public GetCustomerPaginatedElement setSapCrmErrorMessage(String value) { this.sapCrmErrorMessage = value; return this; }
}
}
Java GetCustomerPaginated DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /customer/{brand}/slim HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"totalPages":0,"totalResults":0,"page":0,"items":0}