| POST | /customer/{brand}/export | Export Customer Data |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class ExportCustomer extends SearchCustomer
{
/**
* Export Request ID of the API Consumers
*/
@ApiMember(Description="Export Request ID of the API Consumers", IsRequired=true)
public String downloadRequestId = null;
public String getDownloadRequestId() { return downloadRequestId; }
public ExportCustomer setDownloadRequestId(String value) { this.downloadRequestId = 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 ExportCustomerResponse
{
/**
* Unique Identifier of the Export Request created
*/
@ApiMember(Description="Unique Identifier of the Export Request created", IsRequired=true)
public UUID asyncTaskId = null;
public UUID getAsyncTaskId() { return asyncTaskId; }
public ExportCustomerResponse setAsyncTaskId(UUID value) { this.asyncTaskId = value; return this; }
}
}
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.
POST /customer/{brand}/export HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<ExportCustomer xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.CRM.ServiceModel">
<birthdateMonths xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</birthdateMonths>
<boosterCustomerIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:int>0</d2p1:int>
</boosterCustomerIds>
<brand>String</brand>
<canBeContactedByMaison>false</canBeContactedByMaison>
<clientSpendingFrom>0</clientSpendingFrom>
<clientSpendingTo>0</clientSpendingTo>
<creationDateFrom>0001-01-01T00:00:00</creationDateFrom>
<creationDateTo>0001-01-01T00:00:00</creationDateTo>
<customerStatus xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</customerStatus>
<email>String</email>
<hasSapCrmError>false</hasSapCrmError>
<hobbies>
<GetCustomerHobby>
<hobby>String</hobby>
<sapHobbyId>String</sapHobbyId>
</GetCustomerHobby>
</hobbies>
<interests>
<GetCustomerInterest>
<interest>String</interest>
<sapInterestId>String</sapInterestId>
</GetCustomerInterest>
</interests>
<locationCountryIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</locationCountryIds>
<phoneNumber>String</phoneNumber>
<posCodes xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</posCodes>
<productCategories xmlns:d2p1="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Common.ServiceModel">
<d2p1:ProductCategory>
<d2p1:brandCategoryId>String</d2p1:brandCategoryId>
<d2p1:categoryId>String</d2p1:categoryId>
<d2p1:grandCategoryId>String</d2p1:grandCategoryId>
<d2p1:masterCategoryId>String</d2p1:masterCategoryId>
<d2p1:subCategoryId>String</d2p1:subCategoryId>
</d2p1:ProductCategory>
</productCategories>
<productCollections>
<GetCustomerProductCollection>
<productCollection>String</productCollection>
<sapProductCollectionId>String</sapProductCollectionId>
</GetCustomerProductCollection>
</productCollections>
<saleRepresentativeEmails xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</saleRepresentativeEmails>
<searchKey>String</searchKey>
<transactionDateFrom>0001-01-01T00:00:00</transactionDateFrom>
<transactionDateTo>0001-01-01T00:00:00</transactionDateTo>
<downloadRequestId>String</downloadRequestId>
</ExportCustomer>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ExportCustomerResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.CRM.ServiceModel"> <asyncTaskId>00000000-0000-0000-0000-000000000000</asyncTaskId> </ExportCustomerResponse>