| POST | /stock/{brand}/movement/export | Export Stock Movement Data |
|---|
import 'package:servicestack/servicestack.dart';
class MovementsRequest implements IConvertible
{
/**
* Brand
*/
// @ApiMember(Description="Brand", IsRequired=true)
String? brand;
/**
* POS Legacy
*/
// @ApiMember(Description="POS Legacy", IsRequired=true)
List<String>? posCodes;
/**
* Movement Type Ids
*/
// @ApiMember(Description="Movement Type Ids")
List<int>? movementTypeIds;
/**
* Search Key (Article or SerialNumber)
*/
// @ApiMember(Description="Search Key (Article or SerialNumber)")
String? searchKey;
/**
* In Stock Since date from
*/
// @ApiMember(Description="In Stock Since date from ")
DateTime? dateFrom;
/**
* In Stock Since date to
*/
// @ApiMember(Description="In Stock Since date to")
DateTime? dateTo;
/**
* Sort by date could be: 'DateDESC' or 'DateASC' (default is descending)
*/
// @ApiMember(Description="Sort by date could be: 'DateDESC' or 'DateASC' (default is descending) ")
String? sortBy;
MovementsRequest({this.brand,this.posCodes,this.movementTypeIds,this.searchKey,this.dateFrom,this.dateTo,this.sortBy});
MovementsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
brand = json['brand'];
posCodes = JsonConverters.fromJson(json['posCodes'],'List<String>',context!);
movementTypeIds = JsonConverters.fromJson(json['movementTypeIds'],'List<int>',context!);
searchKey = json['searchKey'];
dateFrom = JsonConverters.fromJson(json['dateFrom'],'DateTime',context!);
dateTo = JsonConverters.fromJson(json['dateTo'],'DateTime',context!);
sortBy = json['sortBy'];
return this;
}
Map<String, dynamic> toJson() => {
'brand': brand,
'posCodes': JsonConverters.toJson(posCodes,'List<String>',context!),
'movementTypeIds': JsonConverters.toJson(movementTypeIds,'List<int>',context!),
'searchKey': searchKey,
'dateFrom': JsonConverters.toJson(dateFrom,'DateTime',context!),
'dateTo': JsonConverters.toJson(dateTo,'DateTime',context!),
'sortBy': sortBy
};
getTypeName() => "MovementsRequest";
TypeContext? context = _ctx;
}
class ExportMovementResponse implements IConvertible
{
/**
* Unique Identifier of the Export Request created
*/
// @ApiMember(Description="Unique Identifier of the Export Request created", IsRequired=true)
String? asyncTaskId;
ExportMovementResponse({this.asyncTaskId});
ExportMovementResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
asyncTaskId = json['asyncTaskId'];
return this;
}
Map<String, dynamic> toJson() => {
'asyncTaskId': asyncTaskId
};
getTypeName() => "ExportMovementResponse";
TypeContext? context = _ctx;
}
class ExportMovement extends MovementsRequest implements IConvertible
{
/**
* Export Request ID of the API Consumers
*/
// @ApiMember(Description="Export Request ID of the API Consumers", IsRequired=true)
String? downloadRequestId;
ExportMovement({this.downloadRequestId});
ExportMovement.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() => "ExportMovement";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'dev_api_booster.richemont.com', types: <String, TypeInfo> {
'MovementsRequest': TypeInfo(TypeOf.Class, create:() => MovementsRequest()),
'ExportMovementResponse': TypeInfo(TypeOf.Class, create:() => ExportMovementResponse()),
'ExportMovement': TypeInfo(TypeOf.Class, create:() => ExportMovement()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /stock/{brand}/movement/export HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"downloadRequestId":"String","brand":"String","posCodes":["String"],"movementTypeIds":[0],"searchKey":"String","dateFrom":"\/Date(-62135596800000-0000)\/","dateTo":"\/Date(-62135596800000-0000)\/","sortBy":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"asyncTaskId":"00000000000000000000000000000000"}