Richemont.Booster2.PublicApi

<back to all web services

ExportCustomer

Requires Authentication
The following routes are available for this service:
POST/customer/{brand}/exportExport Customer Data
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 ExportCustomerResponse implements IConvertible
{
    /**
    * Unique Identifier of the Export Request created
    */
    // @ApiMember(Description="Unique Identifier of the Export Request created", IsRequired=true)
    String? asyncTaskId;

    ExportCustomerResponse({this.asyncTaskId});
    ExportCustomerResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class ExportCustomer extends SearchCustomer implements IConvertible
{
    /**
    * Export Request ID of the API Consumers
    */
    // @ApiMember(Description="Export Request ID of the API Consumers", IsRequired=true)
    String? downloadRequestId;

    ExportCustomer({this.downloadRequestId});
    ExportCustomer.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'downloadRequestId': downloadRequestId
    });

    getTypeName() => "ExportCustomer";
    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>[]),
    'ExportCustomerResponse': TypeInfo(TypeOf.Class, create:() => ExportCustomerResponse()),
    'ExportCustomer': TypeInfo(TypeOf.Class, create:() => ExportCustomer()),
});

Dart ExportCustomer 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

HTTP + JSON

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/json
Content-Type: application/json
Content-Length: length

{"downloadRequestId":"String","brand":"String","posCodes":["String"],"searchKey":"String","phoneNumber":"String","email":"String","locationCountryIds":["String"],"clientSpendingFrom":0,"clientSpendingTo":0,"creationDateFrom":"\/Date(-62135596800000-0000)\/","creationDateTo":"\/Date(-62135596800000-0000)\/","transactionDateFrom":"\/Date(-62135596800000-0000)\/","transactionDateTo":"\/Date(-62135596800000-0000)\/","canBeContactedByMaison":false,"birthdateMonths":[0],"interests":[{"interest":"String","sapInterestId":"String"}],"hobbies":[{"hobby":"String","sapHobbyId":"String"}],"productCollections":[{"productCollection":"String","sapProductCollectionId":"String"}],"customerStatus":["String"],"boosterCustomerIds":[0],"hasSapCrmError":false,"productCategories":[{"brandCategoryId":"String","grandCategoryId":"String","masterCategoryId":"String","categoryId":"String","subCategoryId":"String"}],"saleRepresentativeEmails":["String"]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"asyncTaskId":"00000000000000000000000000000000"}