| GET | /customer/{brand}/slim | Get customers list | Get slim list of customers paginated and sorted |
|---|
"use strict";
export class GetCustomerInterest {
/** @param {{interest?:string,sapInterestId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Interest description */
interest;
/**
* @type {string}
* @description SAP Interest ID, e.g. 'CA-1' */
sapInterestId;
}
export class GetCustomerHobby {
/** @param {{hobby?:string,sapHobbyId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Hobby description */
hobby;
/**
* @type {string}
* @description SAP Hobby ID, e.g. 'ART' */
sapHobbyId;
}
export class GetCustomerProductCollection {
/** @param {{productCollection?:string,sapProductCollectionId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Product Collection description */
productCollection;
/**
* @type {string}
* @description SAP ProductCollection ID, e.g. 'CA-1' */
sapProductCollectionId;
}
export class ProductCategory {
/** @param {{brandCategoryId?:string,grandCategoryId?:string,masterCategoryId?:string,categoryId?:string,subCategoryId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Brand Category ID */
brandCategoryId;
/**
* @type {string}
* @description Grand Category ID */
grandCategoryId;
/**
* @type {string}
* @description Master Category ID */
masterCategoryId;
/**
* @type {string}
* @description Category ID */
categoryId;
/**
* @type {string}
* @description Sub Category ID */
subCategoryId;
}
export class SearchCustomer {
/** @param {{brand?:string,posCodes?:string[],searchKey?:string,phoneNumber?:string,email?:string,locationCountryIds?:string[],clientSpendingFrom?:number,clientSpendingTo?:number,creationDateFrom?:string,creationDateTo?:string,transactionDateFrom?:string,transactionDateTo?:string,canBeContactedByMaison?:boolean,birthdateMonths?:number[],interests?:GetCustomerInterest[],hobbies?:GetCustomerHobby[],productCollections?:GetCustomerProductCollection[],customerStatus?:string[],boosterCustomerIds?:number[],hasSapCrmError?:boolean,productCategories?:ProductCategory[],saleRepresentativeEmails?:string[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Brand */
brand;
/**
* @type {string[]}
* @description POS Legacy */
posCodes;
/**
* @type {string}
* @description Search key could be: 'Name', 'Email', 'Phone' without prefix, 'BoosterCustomerId' OR 'SapCRMId' */
searchKey;
/**
* @type {string}
* @description Search by phone number - exact match */
phoneNumber;
/**
* @type {string}
* @description Search by email address - exact match */
email;
/**
* @type {string[]}
* @description Values can be 'it', 'en' etc. */
locationCountryIds;
/**
* @type {?number}
* @description Client Spending From e.g. '100' */
clientSpendingFrom;
/**
* @type {?number}
* @description Client Spending To e.g. '50000' */
clientSpendingTo;
/**
* @type {?string}
* @description Customer Creation Date From e.g. '2022-01-01' */
creationDateFrom;
/**
* @type {?string}
* @description Customer Creation Date To e.g. '2023-11-01' */
creationDateTo;
/**
* @type {?string}
* @description Transaction Date From e.g. '2022-01-01' */
transactionDateFrom;
/**
* @type {?string}
* @description Transaction Date To e.g. '2023-11-01' */
transactionDateTo;
/**
* @type {?boolean}
* @description Values can be 'true' or 'false' */
canBeContactedByMaison;
/**
* @type {number[]}
* @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' */
birthdateMonths;
/**
* @type {GetCustomerInterest[]}
* @description Customer interest filter */
interests;
/**
* @type {GetCustomerHobby[]}
* @description Customer hobby filter */
hobbies;
/**
* @type {GetCustomerProductCollection[]}
* @description Customer product collection filter */
productCollections;
/**
* @type {string[]}
* @description Customer Status e.g. 'Prospect', 'Client' */
customerStatus;
/**
* @type {number[]}
* @description List of BoosterCustomerIds, e.g. 1234567,1231231,12323423 */
boosterCustomerIds;
/**
* @type {?boolean}
* @description Values can be 'true' or 'false' */
hasSapCrmError;
/**
* @type {ProductCategory[]}
* @description Product Categories */
productCategories;
/**
* @type {string[]}
* @description Sale Reprentative Emails */
saleRepresentativeEmails;
}
export class GetCustomerPaginatedElement {
/** @param {{boosterCustomerId?:number,firstName?:string,middleName?:string,lastName?:string,firstNameNotLatin?:string,lastNameNotLatin?:string,phone?:string,countryPrefix?:string,email?:string,dataSharingConsent?:boolean,selloutTransactionCount?:number,elevateCustomerId?:string,elevateConsentStatus?:string,countryId?:string,registrationDate?:string,sapCrmErrorMessage?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description Booster Customer Id */
boosterCustomerId;
/**
* @type {string}
* @description First name */
firstName;
/**
* @type {string}
* @description Middle name */
middleName;
/**
* @type {string}
* @description Last name */
lastName;
/**
* @type {string}
* @description First name Not Latin */
firstNameNotLatin;
/**
* @type {string}
* @description Last name Not Latin */
lastNameNotLatin;
/**
* @type {string}
* @description Customer phone */
phone;
/**
* @type {string}
* @description Phone Country Prefix */
countryPrefix;
/**
* @type {string}
* @description Customer email */
email;
/**
* @type {boolean}
* @description Data Sharing Consent */
dataSharingConsent;
/**
* @type {number}
* @description Sellout Transaction Count */
selloutTransactionCount;
/**
* @type {string}
* @description Elevate Customer ID */
elevateCustomerId;
/**
* @type {string}
* @description Elevate Consent Status */
elevateConsentStatus;
/**
* @type {string}
* @description Customer Country Id */
countryId;
/**
* @type {?string}
* @description Registration date */
registrationDate;
/**
* @type {string}
* @description Sap Crm Error Message */
sapCrmErrorMessage;
}
export class GetCustomerPaginatedResponse {
/** @param {{totalPages?:number,totalResults?:number,page?:number,items?:number,elements?:GetCustomerPaginatedElement[]}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description Total Pages */
totalPages;
/**
* @type {number}
* @description Total Results */
totalResults;
/**
* @type {number}
* @description Index of the result set returned */
page;
/**
* @type {number}
* @description Size of the result set returned */
items;
/**
* @type {GetCustomerPaginatedElement[]}
* @description List of customers */
elements;
}
export class GetCustomerPaginated extends SearchCustomer {
/** @param {{page?:number,items?:number,noCount?:boolean,sortBy?:string,brand?:string,posCodes?:string[],searchKey?:string,phoneNumber?:string,email?:string,locationCountryIds?:string[],clientSpendingFrom?:number,clientSpendingTo?:number,creationDateFrom?:string,creationDateTo?:string,transactionDateFrom?:string,transactionDateTo?:string,canBeContactedByMaison?:boolean,birthdateMonths?:number[],interests?:GetCustomerInterest[],hobbies?:GetCustomerHobby[],productCollections?:GetCustomerProductCollection[],customerStatus?:string[],boosterCustomerIds?:number[],hasSapCrmError?:boolean,productCategories?:ProductCategory[],saleRepresentativeEmails?:string[]}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {number}
* @description Index of the result set returned */
page;
/**
* @type {number}
* @description Size of the result set returned */
items;
/**
* @type {boolean}
* @description Omit precise record count - save on performance */
noCount;
/**
* @type {string}
* @description Values can be 'NameDESC', 'NameASC', 'RegASC', 'RegDESC' */
sortBy;
}
JavaScript GetCustomerPaginated DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
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: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"totalPages":0,"totalResults":0,"page":0,"items":0}