Richemont.Booster2.PublicApi

<back to all web services

GetCustomerPaginated

Requires Authentication
The following routes are available for this service:
GET/customer/{brand}/slimGet customers listGet slim list of customers paginated and sorted
import 'package:servicestack/servicestack.dart';

class GetCustomerInterest implements IConvertible
{
    /**
    * Interest description
    */
    // @ApiMember(Description="Interest description", IsRequired=true)
    String? interest;

    /**
    * SAP Interest ID, e.g. 'CA-1'
    */
    // @ApiMember(Description="SAP Interest ID, e.g. 'CA-1'", IsRequired=true)
    String? sapInterestId;

    GetCustomerInterest({this.interest,this.sapInterestId});
    GetCustomerInterest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        interest = json['interest'];
        sapInterestId = json['sapInterestId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'interest': interest,
        'sapInterestId': sapInterestId
    };

    getTypeName() => "GetCustomerInterest";
    TypeContext? context = _ctx;
}

class GetCustomerHobby implements IConvertible
{
    /**
    * Hobby description
    */
    // @ApiMember(Description="Hobby description")
    String? hobby;

    /**
    * SAP Hobby ID, e.g. 'ART'
    */
    // @ApiMember(Description="SAP Hobby ID, e.g. 'ART'")
    String? sapHobbyId;

    GetCustomerHobby({this.hobby,this.sapHobbyId});
    GetCustomerHobby.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        hobby = json['hobby'];
        sapHobbyId = json['sapHobbyId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'hobby': hobby,
        'sapHobbyId': sapHobbyId
    };

    getTypeName() => "GetCustomerHobby";
    TypeContext? context = _ctx;
}

class GetCustomerProductCollection implements IConvertible
{
    /**
    * Product Collection description
    */
    // @ApiMember(Description="Product Collection description", IsRequired=true)
    String? productCollection;

    /**
    * SAP ProductCollection ID, e.g. 'CA-1'
    */
    // @ApiMember(Description="SAP ProductCollection ID, e.g. 'CA-1'", IsRequired=true)
    String? sapProductCollectionId;

    GetCustomerProductCollection({this.productCollection,this.sapProductCollectionId});
    GetCustomerProductCollection.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        productCollection = json['productCollection'];
        sapProductCollectionId = json['sapProductCollectionId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'productCollection': productCollection,
        'sapProductCollectionId': sapProductCollectionId
    };

    getTypeName() => "GetCustomerProductCollection";
    TypeContext? context = _ctx;
}

class ProductCategory implements IConvertible
{
    /**
    * Brand Category ID
    */
    // @ApiMember(Description="Brand Category ID")
    String? brandCategoryId;

    /**
    * Grand Category ID
    */
    // @ApiMember(Description="Grand Category ID", IsRequired=true)
    String? grandCategoryId;

    /**
    * Master Category ID
    */
    // @ApiMember(Description="Master Category ID")
    String? masterCategoryId;

    /**
    * Category ID
    */
    // @ApiMember(Description="Category ID")
    String? categoryId;

    /**
    * Sub Category ID
    */
    // @ApiMember(Description="Sub Category ID")
    String? subCategoryId;

    ProductCategory({this.brandCategoryId,this.grandCategoryId,this.masterCategoryId,this.categoryId,this.subCategoryId});
    ProductCategory.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        brandCategoryId = json['brandCategoryId'];
        grandCategoryId = json['grandCategoryId'];
        masterCategoryId = json['masterCategoryId'];
        categoryId = json['categoryId'];
        subCategoryId = json['subCategoryId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'brandCategoryId': brandCategoryId,
        'grandCategoryId': grandCategoryId,
        'masterCategoryId': masterCategoryId,
        'categoryId': categoryId,
        'subCategoryId': subCategoryId
    };

    getTypeName() => "ProductCategory";
    TypeContext? context = _ctx;
}

class SearchCustomer implements IConvertible
{
    /**
    * Brand
    */
    // @ApiMember(Description="Brand", IsRequired=true)
    String? brand;

    /**
    * POS Legacy
    */
    // @ApiMember(Description="POS Legacy", IsRequired=true)
    List<String>? posCodes;

    /**
    * 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'")
    String? searchKey;

    /**
    * Search by phone number - exact match
    */
    // @ApiMember(Description="Search by phone number - exact match")
    String? phoneNumber;

    /**
    * Search by email address - exact match
    */
    // @ApiMember(Description="Search by email address - exact match")
    String? email;

    /**
    * Values can be 'it', 'en' etc.
    */
    // @ApiMember(Description="Values can be 'it', 'en' etc.")
    List<String>? locationCountryIds;

    /**
    * Client Spending From e.g. '100'
    */
    // @ApiMember(Description="Client Spending From e.g. '100'")
    double? clientSpendingFrom;

    /**
    * Client Spending To e.g. '50000'
    */
    // @ApiMember(Description="Client Spending To e.g. '50000'")
    double? clientSpendingTo;

    /**
    * Customer Creation Date From e.g. '2022-01-01'
    */
    // @ApiMember(Description="Customer Creation Date From e.g. '2022-01-01'")
    DateTime? creationDateFrom;

    /**
    * Customer Creation Date To e.g. '2023-11-01'
    */
    // @ApiMember(Description="Customer Creation Date To e.g. '2023-11-01'")
    DateTime? creationDateTo;

    /**
    * Transaction Date From e.g. '2022-01-01'
    */
    // @ApiMember(Description="Transaction Date From e.g. '2022-01-01'")
    DateTime? transactionDateFrom;

    /**
    * Transaction Date To e.g. '2023-11-01'
    */
    // @ApiMember(Description="Transaction Date To e.g. '2023-11-01'")
    DateTime? transactionDateTo;

    /**
    * Values can be 'true' or 'false'
    */
    // @ApiMember(Description="Values can be 'true' or 'false'")
    bool? canBeContactedByMaison;

    /**
    * 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'")
    List<int>? birthdateMonths;

    /**
    * Customer interest filter
    */
    // @ApiMember(Description="Customer interest filter")
    List<GetCustomerInterest>? interests;

    /**
    * Customer hobby filter
    */
    // @ApiMember(Description="Customer hobby filter")
    List<GetCustomerHobby>? hobbies;

    /**
    * Customer product collection filter
    */
    // @ApiMember(Description="Customer product collection filter")
    List<GetCustomerProductCollection>? productCollections;

    /**
    * Customer Status e.g. 'Prospect', 'Client'
    */
    // @ApiMember(Description="Customer Status e.g. 'Prospect', 'Client'")
    List<String>? customerStatus;

    /**
    * List of BoosterCustomerIds, e.g. 1234567,1231231,12323423
    */
    // @ApiMember(Description="List of BoosterCustomerIds, e.g. 1234567,1231231,12323423")
    List<int>? boosterCustomerIds;

    /**
    * Values can be 'true' or 'false'
    */
    // @ApiMember(Description="Values can be 'true' or 'false'")
    bool? hasSapCrmError;

    /**
    * Product Categories
    */
    // @ApiMember(Description="Product Categories")
    List<ProductCategory>? productCategories;

    /**
    * Sale Reprentative Emails
    */
    // @ApiMember(Description="Sale Reprentative Emails")
    List<String>? saleRepresentativeEmails;

    SearchCustomer({this.brand,this.posCodes,this.searchKey,this.phoneNumber,this.email,this.locationCountryIds,this.clientSpendingFrom,this.clientSpendingTo,this.creationDateFrom,this.creationDateTo,this.transactionDateFrom,this.transactionDateTo,this.canBeContactedByMaison,this.birthdateMonths,this.interests,this.hobbies,this.productCollections,this.customerStatus,this.boosterCustomerIds,this.hasSapCrmError,this.productCategories,this.saleRepresentativeEmails});
    SearchCustomer.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        brand = json['brand'];
        posCodes = JsonConverters.fromJson(json['posCodes'],'List<String>',context!);
        searchKey = json['searchKey'];
        phoneNumber = json['phoneNumber'];
        email = json['email'];
        locationCountryIds = JsonConverters.fromJson(json['locationCountryIds'],'List<String>',context!);
        clientSpendingFrom = JsonConverters.toDouble(json['clientSpendingFrom']);
        clientSpendingTo = JsonConverters.toDouble(json['clientSpendingTo']);
        creationDateFrom = JsonConverters.fromJson(json['creationDateFrom'],'DateTime',context!);
        creationDateTo = JsonConverters.fromJson(json['creationDateTo'],'DateTime',context!);
        transactionDateFrom = JsonConverters.fromJson(json['transactionDateFrom'],'DateTime',context!);
        transactionDateTo = JsonConverters.fromJson(json['transactionDateTo'],'DateTime',context!);
        canBeContactedByMaison = json['canBeContactedByMaison'];
        birthdateMonths = JsonConverters.fromJson(json['birthdateMonths'],'List<int>',context!);
        interests = JsonConverters.fromJson(json['interests'],'List<GetCustomerInterest>',context!);
        hobbies = JsonConverters.fromJson(json['hobbies'],'List<GetCustomerHobby>',context!);
        productCollections = JsonConverters.fromJson(json['productCollections'],'List<GetCustomerProductCollection>',context!);
        customerStatus = JsonConverters.fromJson(json['customerStatus'],'List<String>',context!);
        boosterCustomerIds = JsonConverters.fromJson(json['boosterCustomerIds'],'List<int>',context!);
        hasSapCrmError = json['hasSapCrmError'];
        productCategories = JsonConverters.fromJson(json['productCategories'],'List<ProductCategory>',context!);
        saleRepresentativeEmails = JsonConverters.fromJson(json['saleRepresentativeEmails'],'List<String>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'brand': brand,
        'posCodes': JsonConverters.toJson(posCodes,'List<String>',context!),
        'searchKey': searchKey,
        'phoneNumber': phoneNumber,
        'email': email,
        'locationCountryIds': JsonConverters.toJson(locationCountryIds,'List<String>',context!),
        'clientSpendingFrom': clientSpendingFrom,
        'clientSpendingTo': clientSpendingTo,
        'creationDateFrom': JsonConverters.toJson(creationDateFrom,'DateTime',context!),
        'creationDateTo': JsonConverters.toJson(creationDateTo,'DateTime',context!),
        'transactionDateFrom': JsonConverters.toJson(transactionDateFrom,'DateTime',context!),
        'transactionDateTo': JsonConverters.toJson(transactionDateTo,'DateTime',context!),
        'canBeContactedByMaison': canBeContactedByMaison,
        'birthdateMonths': JsonConverters.toJson(birthdateMonths,'List<int>',context!),
        'interests': JsonConverters.toJson(interests,'List<GetCustomerInterest>',context!),
        'hobbies': JsonConverters.toJson(hobbies,'List<GetCustomerHobby>',context!),
        'productCollections': JsonConverters.toJson(productCollections,'List<GetCustomerProductCollection>',context!),
        'customerStatus': JsonConverters.toJson(customerStatus,'List<String>',context!),
        'boosterCustomerIds': JsonConverters.toJson(boosterCustomerIds,'List<int>',context!),
        'hasSapCrmError': hasSapCrmError,
        'productCategories': JsonConverters.toJson(productCategories,'List<ProductCategory>',context!),
        'saleRepresentativeEmails': JsonConverters.toJson(saleRepresentativeEmails,'List<String>',context!)
    };

    getTypeName() => "SearchCustomer";
    TypeContext? context = _ctx;
}

class GetCustomerPaginatedElement implements IConvertible
{
    /**
    * Booster Customer Id
    */
    // @ApiMember(Description="Booster Customer Id", IsRequired=true)
    int? boosterCustomerId;

    /**
    * First name
    */
    // @ApiMember(Description="First name", IsRequired=true)
    String? firstName;

    /**
    * Middle name
    */
    // @ApiMember(Description="Middle name", IsRequired=true)
    String? middleName;

    /**
    * Last name
    */
    // @ApiMember(Description="Last name", IsRequired=true)
    String? lastName;

    /**
    * First name Not Latin
    */
    // @ApiMember(Description="First name Not Latin", IsRequired=true)
    String? firstNameNotLatin;

    /**
    * Last name Not Latin
    */
    // @ApiMember(Description="Last name Not Latin", IsRequired=true)
    String? lastNameNotLatin;

    /**
    * Customer phone
    */
    // @ApiMember(Description="Customer phone", IsRequired=true)
    String? phone;

    /**
    * Phone Country Prefix
    */
    // @ApiMember(Description="Phone Country Prefix", IsRequired=true)
    String? countryPrefix;

    /**
    * Customer email
    */
    // @ApiMember(Description="Customer email", IsRequired=true)
    String? email;

    /**
    * Data Sharing Consent
    */
    // @ApiMember(Description="Data Sharing Consent", IsRequired=true)
    bool? dataSharingConsent;

    /**
    * Sellout Transaction Count
    */
    // @ApiMember(Description="Sellout Transaction Count", IsRequired=true)
    int? selloutTransactionCount;

    /**
    * Elevate Customer ID
    */
    // @ApiMember(Description="Elevate Customer ID")
    String? elevateCustomerId;

    /**
    * Elevate Consent Status
    */
    // @ApiMember(Description="Elevate Consent Status")
    String? elevateConsentStatus;

    /**
    * Customer Country Id
    */
    // @ApiMember(Description="Customer Country Id")
    String? countryId;

    /**
    * Registration date
    */
    // @ApiMember(Description="Registration date")
    DateTime? registrationDate;

    /**
    * Sap Crm Error Message
    */
    // @ApiMember(Description="Sap Crm Error Message")
    String? sapCrmErrorMessage;

    GetCustomerPaginatedElement({this.boosterCustomerId,this.firstName,this.middleName,this.lastName,this.firstNameNotLatin,this.lastNameNotLatin,this.phone,this.countryPrefix,this.email,this.dataSharingConsent,this.selloutTransactionCount,this.elevateCustomerId,this.elevateConsentStatus,this.countryId,this.registrationDate,this.sapCrmErrorMessage});
    GetCustomerPaginatedElement.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        boosterCustomerId = json['boosterCustomerId'];
        firstName = json['firstName'];
        middleName = json['middleName'];
        lastName = json['lastName'];
        firstNameNotLatin = json['firstNameNotLatin'];
        lastNameNotLatin = json['lastNameNotLatin'];
        phone = json['phone'];
        countryPrefix = json['countryPrefix'];
        email = json['email'];
        dataSharingConsent = json['dataSharingConsent'];
        selloutTransactionCount = json['selloutTransactionCount'];
        elevateCustomerId = json['elevateCustomerId'];
        elevateConsentStatus = json['elevateConsentStatus'];
        countryId = json['countryId'];
        registrationDate = JsonConverters.fromJson(json['registrationDate'],'DateTime',context!);
        sapCrmErrorMessage = json['sapCrmErrorMessage'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'boosterCustomerId': boosterCustomerId,
        'firstName': firstName,
        'middleName': middleName,
        'lastName': lastName,
        'firstNameNotLatin': firstNameNotLatin,
        'lastNameNotLatin': lastNameNotLatin,
        'phone': phone,
        'countryPrefix': countryPrefix,
        'email': email,
        'dataSharingConsent': dataSharingConsent,
        'selloutTransactionCount': selloutTransactionCount,
        'elevateCustomerId': elevateCustomerId,
        'elevateConsentStatus': elevateConsentStatus,
        'countryId': countryId,
        'registrationDate': JsonConverters.toJson(registrationDate,'DateTime',context!),
        'sapCrmErrorMessage': sapCrmErrorMessage
    };

    getTypeName() => "GetCustomerPaginatedElement";
    TypeContext? context = _ctx;
}

class GetCustomerPaginatedResponse implements IConvertible
{
    /**
    * Total Pages
    */
    // @ApiMember(Description="Total Pages", IsRequired=true)
    int? totalPages;

    /**
    * Total Results
    */
    // @ApiMember(Description="Total Results", IsRequired=true)
    int? totalResults;

    /**
    * Index of the result set returned
    */
    // @ApiMember(Description="Index of the result set returned", IsRequired=true)
    int? page;

    /**
    * Size of the result set returned
    */
    // @ApiMember(Description="Size of the result set returned", IsRequired=true)
    int? items;

    /**
    * List of customers
    */
    // @ApiMember(Description="List of customers", IsRequired=true)
    List<GetCustomerPaginatedElement>? elements;

    GetCustomerPaginatedResponse({this.totalPages,this.totalResults,this.page,this.items,this.elements});
    GetCustomerPaginatedResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        totalPages = json['totalPages'];
        totalResults = json['totalResults'];
        page = json['page'];
        items = json['items'];
        elements = JsonConverters.fromJson(json['elements'],'List<GetCustomerPaginatedElement>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'totalPages': totalPages,
        'totalResults': totalResults,
        'page': page,
        'items': items,
        'elements': JsonConverters.toJson(elements,'List<GetCustomerPaginatedElement>',context!)
    };

    getTypeName() => "GetCustomerPaginatedResponse";
    TypeContext? context = _ctx;
}

class GetCustomerPaginated extends SearchCustomer implements IPagedRequest, IConvertible
{
    /**
    * Index of the result set returned
    */
    // @ApiMember(Description="Index of the result set returned")
    int? page;

    /**
    * Size of the result set returned
    */
    // @ApiMember(Description="Size of the result set returned")
    int? items;

    /**
    * Omit precise record count - save on performance
    */
    // @ApiMember(Description="Omit precise record count - save on performance")
    bool? noCount;

    /**
    * Values can be 'NameDESC', 'NameASC', 'RegASC', 'RegDESC'
    */
    // @ApiMember(Description="Values can be 'NameDESC', 'NameASC', 'RegASC', 'RegDESC'")
    String? sortBy;

    GetCustomerPaginated({this.page,this.items,this.noCount,this.sortBy});
    GetCustomerPaginated.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        page = json['page'];
        items = json['items'];
        noCount = json['noCount'];
        sortBy = json['sortBy'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'page': page,
        'items': items,
        'noCount': noCount,
        'sortBy': sortBy
    });

    getTypeName() => "GetCustomerPaginated";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'GetCustomerInterest': TypeInfo(TypeOf.Class, create:() => GetCustomerInterest()),
    'GetCustomerHobby': TypeInfo(TypeOf.Class, create:() => GetCustomerHobby()),
    'GetCustomerProductCollection': TypeInfo(TypeOf.Class, create:() => GetCustomerProductCollection()),
    'ProductCategory': TypeInfo(TypeOf.Class, create:() => ProductCategory()),
    'SearchCustomer': TypeInfo(TypeOf.Class, create:() => SearchCustomer()),
    'List<GetCustomerInterest>': TypeInfo(TypeOf.Class, create:() => <GetCustomerInterest>[]),
    'List<GetCustomerHobby>': TypeInfo(TypeOf.Class, create:() => <GetCustomerHobby>[]),
    'List<GetCustomerProductCollection>': TypeInfo(TypeOf.Class, create:() => <GetCustomerProductCollection>[]),
    'List<ProductCategory>': TypeInfo(TypeOf.Class, create:() => <ProductCategory>[]),
    'GetCustomerPaginatedElement': TypeInfo(TypeOf.Class, create:() => GetCustomerPaginatedElement()),
    'GetCustomerPaginatedResponse': TypeInfo(TypeOf.Class, create:() => GetCustomerPaginatedResponse()),
    'List<GetCustomerPaginatedElement>': TypeInfo(TypeOf.Class, create:() => <GetCustomerPaginatedElement>[]),
    'GetCustomerPaginated': TypeInfo(TypeOf.Class, create:() => GetCustomerPaginated()),
});

Dart GetCustomerPaginated DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

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/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	totalPages: 0,
	totalResults: 0,
	page: 0,
	items: 0
}