| POST | /customer/{brand}/export | Export Customer Data |
|---|
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using Richemont.Booster2.PublicApi.CRM.ServiceModel;
using Richemont.Booster2.PublicApi.Common.ServiceModel;
namespace Richemont.Booster2.PublicApi.Common.ServiceModel
{
public partial class ProductCategory
{
///<summary>
///Brand Category ID
///</summary>
[ApiMember(Description="Brand Category ID")]
public virtual string brandCategoryId { get; set; }
///<summary>
///Grand Category ID
///</summary>
[ApiMember(Description="Grand Category ID", IsRequired=true)]
public virtual string grandCategoryId { get; set; }
///<summary>
///Master Category ID
///</summary>
[ApiMember(Description="Master Category ID")]
public virtual string masterCategoryId { get; set; }
///<summary>
///Category ID
///</summary>
[ApiMember(Description="Category ID")]
public virtual string categoryId { get; set; }
///<summary>
///Sub Category ID
///</summary>
[ApiMember(Description="Sub Category ID")]
public virtual string subCategoryId { get; set; }
}
}
namespace Richemont.Booster2.PublicApi.CRM.ServiceModel
{
public partial class ExportCustomer
: SearchCustomer
{
///<summary>
///Export Request ID of the API Consumers
///</summary>
[ApiMember(Description="Export Request ID of the API Consumers", IsRequired=true)]
public virtual string downloadRequestId { get; set; }
}
public partial class ExportCustomerResponse
{
///<summary>
///Unique Identifier of the Export Request created
///</summary>
[ApiMember(Description="Unique Identifier of the Export Request created", IsRequired=true)]
public virtual Guid asyncTaskId { get; set; }
}
public partial class GetCustomerHobby
{
///<summary>
///Hobby description
///</summary>
[ApiMember(Description="Hobby description")]
public virtual string hobby { get; set; }
///<summary>
///SAP Hobby ID, e.g. 'ART'
///</summary>
[ApiMember(Description="SAP Hobby ID, e.g. 'ART'")]
public virtual string sapHobbyId { get; set; }
}
public partial class GetCustomerInterest
{
///<summary>
///Interest description
///</summary>
[ApiMember(Description="Interest description", IsRequired=true)]
public virtual string interest { get; set; }
///<summary>
///SAP Interest ID, e.g. 'CA-1'
///</summary>
[ApiMember(Description="SAP Interest ID, e.g. 'CA-1'", IsRequired=true)]
public virtual string sapInterestId { get; set; }
}
public partial class GetCustomerProductCollection
{
///<summary>
///Product Collection description
///</summary>
[ApiMember(Description="Product Collection description", IsRequired=true)]
public virtual string productCollection { get; set; }
///<summary>
///SAP ProductCollection ID, e.g. 'CA-1'
///</summary>
[ApiMember(Description="SAP ProductCollection ID, e.g. 'CA-1'", IsRequired=true)]
public virtual string sapProductCollectionId { get; set; }
}
public partial class SearchCustomer
{
public SearchCustomer()
{
posCodes = new List<string>{};
locationCountryIds = new List<string>{};
birthdateMonths = new List<int>{};
interests = new List<GetCustomerInterest>{};
hobbies = new List<GetCustomerHobby>{};
productCollections = new List<GetCustomerProductCollection>{};
customerStatus = new List<string>{};
boosterCustomerIds = new List<int>{};
productCategories = new List<ProductCategory>{};
saleRepresentativeEmails = new List<string>{};
}
///<summary>
///Brand
///</summary>
[ApiMember(Description="Brand", IsRequired=true)]
public virtual string brand { get; set; }
///<summary>
///POS Legacy
///</summary>
[ApiMember(Description="POS Legacy", IsRequired=true)]
public virtual List<string> posCodes { get; set; }
///<summary>
///Search key could be: 'Name', 'Email', 'Phone' without prefix, 'BoosterCustomerId' OR 'SapCRMId'
///</summary>
[ApiMember(Description="Search key could be: 'Name', 'Email', 'Phone' without prefix, 'BoosterCustomerId' OR 'SapCRMId'")]
public virtual string searchKey { get; set; }
///<summary>
///Search by phone number - exact match
///</summary>
[ApiMember(Description="Search by phone number - exact match")]
public virtual string phoneNumber { get; set; }
///<summary>
///Search by email address - exact match
///</summary>
[ApiMember(Description="Search by email address - exact match")]
public virtual string email { get; set; }
///<summary>
///Values can be 'it', 'en' etc.
///</summary>
[ApiMember(Description="Values can be 'it', 'en' etc.")]
public virtual List<string> locationCountryIds { get; set; }
///<summary>
///Client Spending From e.g. '100'
///</summary>
[ApiMember(Description="Client Spending From e.g. '100'")]
public virtual double? clientSpendingFrom { get; set; }
///<summary>
///Client Spending To e.g. '50000'
///</summary>
[ApiMember(Description="Client Spending To e.g. '50000'")]
public virtual double? clientSpendingTo { get; set; }
///<summary>
///Customer Creation Date From e.g. '2022-01-01'
///</summary>
[ApiMember(Description="Customer Creation Date From e.g. '2022-01-01'")]
public virtual DateTime? creationDateFrom { get; set; }
///<summary>
///Customer Creation Date To e.g. '2023-11-01'
///</summary>
[ApiMember(Description="Customer Creation Date To e.g. '2023-11-01'")]
public virtual DateTime? creationDateTo { get; set; }
///<summary>
///Transaction Date From e.g. '2022-01-01'
///</summary>
[ApiMember(Description="Transaction Date From e.g. '2022-01-01'")]
public virtual DateTime? transactionDateFrom { get; set; }
///<summary>
///Transaction Date To e.g. '2023-11-01'
///</summary>
[ApiMember(Description="Transaction Date To e.g. '2023-11-01'")]
public virtual DateTime? transactionDateTo { get; set; }
///<summary>
///Values can be 'true' or 'false'
///</summary>
[ApiMember(Description="Values can be 'true' or 'false'")]
public virtual bool? canBeContactedByMaison { get; set; }
///<summary>
///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'
///</summary>
[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 virtual List<int> birthdateMonths { get; set; }
///<summary>
///Customer interest filter
///</summary>
[ApiMember(Description="Customer interest filter")]
public virtual List<GetCustomerInterest> interests { get; set; }
///<summary>
///Customer hobby filter
///</summary>
[ApiMember(Description="Customer hobby filter")]
public virtual List<GetCustomerHobby> hobbies { get; set; }
///<summary>
///Customer product collection filter
///</summary>
[ApiMember(Description="Customer product collection filter")]
public virtual List<GetCustomerProductCollection> productCollections { get; set; }
///<summary>
///Customer Status e.g. 'Prospect', 'Client'
///</summary>
[ApiMember(Description="Customer Status e.g. 'Prospect', 'Client'")]
public virtual List<string> customerStatus { get; set; }
///<summary>
///List of BoosterCustomerIds, e.g. 1234567,1231231,12323423
///</summary>
[ApiMember(Description="List of BoosterCustomerIds, e.g. 1234567,1231231,12323423")]
public virtual List<int> boosterCustomerIds { get; set; }
///<summary>
///Values can be 'true' or 'false'
///</summary>
[ApiMember(Description="Values can be 'true' or 'false'")]
public virtual bool? hasSapCrmError { get; set; }
///<summary>
///Product Categories
///</summary>
[ApiMember(Description="Product Categories")]
public virtual List<ProductCategory> productCategories { get; set; }
///<summary>
///Sale Reprentative Emails
///</summary>
[ApiMember(Description="Sale Reprentative Emails")]
public virtual List<string> saleRepresentativeEmails { 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.
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>