Richemont.Booster2.PublicApi

<back to all web services

ExportSellOut

Requires Authentication
The following routes are available for this service:
POST/warranty/{brand}/exportExport Sell-Out DataCreate a sell-out in a POS you are authorised for
import 'package:servicestack/servicestack.dart';

class ExportSellOutResponse implements IConvertible
{
    /**
    * Unique Identifier of the Export Request created
    */
    // @ApiMember(Description="Unique Identifier of the Export Request created", IsRequired=true)
    String? asyncTaskId;

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

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

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

    getTypeName() => "ExportSellOutResponse";
    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 ExportSellOut implements IConvertible
{
    /**
    * Brand Trigram, e.g. CAR, IWC
    */
    // @ApiMember(Description="Brand Trigram, e.g. CAR, IWC", IsRequired=true)
    String? brand;

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

    /**
    * Date To
    */
    // @ApiMember(Description="Date To")
    DateTime? dateTo;

    /**
    * Date From
    */
    // @ApiMember(Description="Date From")
    DateTime? dateFrom;

    /**
    * Item Article Codes, both Global and Local
    */
    // @ApiMember(Description="Item Article Codes, both Global and Local")
    List<String>? articleCodes;

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

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

    /**
    * Sellout Type: 'sellout' for sales, 'return' for returns, null for both
    */
    // @ApiMember(Description="Sellout Type: 'sellout' for sales, 'return' for returns, null for both")
    String? selloutType;

    /**
    * Type: 'consigned' or 'standard', null for both
    */
    // @ApiMember(Description="Type: 'consigned' or 'standard', null for both")
    String? type;

    /**
    * Possible warranty extention status IDs, 1 (Activated), 2 (Requested), 3 (Refused), 4 (Error)
    */
    // @ApiMember(Description="Possible warranty extention status IDs, 1 (Activated), 2 (Requested), 3 (Refused), 4 (Error)")
    List<int>? warrantyExtensionStatusIds;

    /**
    * Export Request ID of the API Consumers
    */
    // @ApiMember(Description="Export Request ID of the API Consumers", IsRequired=true)
    String? downloadRequestId;

    ExportSellOut({this.brand,this.posCodes,this.dateTo,this.dateFrom,this.articleCodes,this.productCategories,this.saleRepresentativeEmails,this.selloutType,this.type,this.warrantyExtensionStatusIds,this.downloadRequestId});
    ExportSellOut.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        brand = json['brand'];
        posCodes = JsonConverters.fromJson(json['posCodes'],'List<String>',context!);
        dateTo = JsonConverters.fromJson(json['dateTo'],'DateTime',context!);
        dateFrom = JsonConverters.fromJson(json['dateFrom'],'DateTime',context!);
        articleCodes = JsonConverters.fromJson(json['articleCodes'],'List<String>',context!);
        productCategories = JsonConverters.fromJson(json['productCategories'],'List<ProductCategory>',context!);
        saleRepresentativeEmails = JsonConverters.fromJson(json['saleRepresentativeEmails'],'List<String>',context!);
        selloutType = json['selloutType'];
        type = json['type'];
        warrantyExtensionStatusIds = JsonConverters.fromJson(json['warrantyExtensionStatusIds'],'List<int>',context!);
        downloadRequestId = json['downloadRequestId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'brand': brand,
        'posCodes': JsonConverters.toJson(posCodes,'List<String>',context!),
        'dateTo': JsonConverters.toJson(dateTo,'DateTime',context!),
        'dateFrom': JsonConverters.toJson(dateFrom,'DateTime',context!),
        'articleCodes': JsonConverters.toJson(articleCodes,'List<String>',context!),
        'productCategories': JsonConverters.toJson(productCategories,'List<ProductCategory>',context!),
        'saleRepresentativeEmails': JsonConverters.toJson(saleRepresentativeEmails,'List<String>',context!),
        'selloutType': selloutType,
        'type': type,
        'warrantyExtensionStatusIds': JsonConverters.toJson(warrantyExtensionStatusIds,'List<int>',context!),
        'downloadRequestId': downloadRequestId
    };

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

TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
    'ExportSellOutResponse': TypeInfo(TypeOf.Class, create:() => ExportSellOutResponse()),
    'ProductCategory': TypeInfo(TypeOf.Class, create:() => ProductCategory()),
    'ExportSellOut': TypeInfo(TypeOf.Class, create:() => ExportSellOut()),
    'List<ProductCategory>': TypeInfo(TypeOf.Class, create:() => <ProductCategory>[]),
});

Dart ExportSellOut DTOs

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

HTTP + CSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /warranty/{brand}/export HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"brand":"String","posCodes":["String"],"dateTo":"\/Date(-62135596800000-0000)\/","dateFrom":"\/Date(-62135596800000-0000)\/","articleCodes":["String"],"productCategories":[{"brandCategoryId":"String","grandCategoryId":"String","masterCategoryId":"String","categoryId":"String","subCategoryId":"String"}],"saleRepresentativeEmails":["String"],"selloutType":"String","type":"String","warrantyExtensionStatusIds":[0],"downloadRequestId":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"asyncTaskId":"00000000000000000000000000000000"}