| GET | /stock/{brand}/{posCode} | Get Paginated Stock |
|---|
"use strict";
export class RetailSalesPrice {
/** @param {{currencyIsoCode?:string,value?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Currency Iso Code */
currencyIsoCode;
/**
* @type {number}
* @description Value */
value;
}
export class PaginatedStockElement {
/** @param {{posCode?:string,posCodeToBeDisplayed?:string,articleCode?:string,serialNumber?:string,quantity?:number,type?:string,isConsignmentSellable?:boolean,retailSalesPrice?:RetailSalesPrice}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Pos Code */
posCode;
/**
* @type {string}
* @description Pos Code To Be Displayed */
posCodeToBeDisplayed;
/**
* @type {string}
* @description Article Code */
articleCode;
/**
* @type {string}
* @description Serial Number */
serialNumber;
/**
* @type {number}
* @description Current Stock Quantity */
quantity;
/**
* @type {string}
* @description Type e.g. consignment or standard */
type;
/**
* @type {boolean}
* @description Is Consignment Sellable */
isConsignmentSellable;
/**
* @type {RetailSalesPrice}
* @description Retail Sales Price */
retailSalesPrice;
}
export class GetStockPaginatedResponse {
/** @param {{totalPages?:number,totalResults?:number,page?:number,items?:number,elements?:PaginatedStockElement[]}} [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 {PaginatedStockElement[]}
* @description List of movements */
elements;
}
export class GetStockPaginated {
/** @param {{brand?:string,posCode?:string,searchKey?:string,page?:number,items?:number,noCount?:boolean,sortBy?:string,includeChainPosesStock?:boolean,includeRSP?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {string}
* @description Brand */
brand;
/**
* @type {string}
* @description POS Legacy */
posCode;
/**
* @type {string}
* @description Search Key (Article or SerialNumber) */
searchKey;
/**
* @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 Sorting expression */
sortBy;
/**
* @type {boolean}
* @description Parameter - Include Chain POSes Stock */
includeChainPosesStock;
/**
* @type {boolean}
* @description Include Retail Sales Price in the Output, by default: false */
includeRSP;
}
JavaScript GetStockPaginated DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /stock/{brand}/{posCode} 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
}