Richemont.Booster2.PublicApi

<back to all web services

GetStock

Requires Authentication
The following routes are available for this service:
GET/stock/{brand}Get stock
"use strict";
export class StockRequest {
    /** @param {{brand?:string,posCodes?:string[],articleCodes?:string[],includeExtraInfo?:boolean,clusterIds?:string[],includeConsignmentNotAuthorizedPOS?:boolean,includeRSP?:boolean,dateFrom?:string,dateTo?:string,type?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Brand */
    brand;
    /**
     * @type {string[]}
     * @description POS Legacy */
    posCodes;
    /**
     * @type {string[]}
     * @description Article Codes */
    articleCodes;
    /**
     * @type {boolean}
     * @description Include Extra Info */
    includeExtraInfo;
    /**
     * @type {string[]}
     * @description Cluster Id */
    clusterIds;
    /**
     * @type {boolean}
     * @description Include Consignment NotAuthorized POS */
    includeConsignmentNotAuthorizedPOS;
    /**
     * @type {boolean}
     * @description Include Retail Sales Price in the Output, by default: false */
    includeRSP;
    /**
     * @type {?string}
     * @description In Stock Since date from  */
    dateFrom;
    /**
     * @type {?string}
     * @description In Stock Since date to */
    dateTo;
    /**
     * @type {string}
     * @description Item type, 'standard' OR 'consigned'. By default, all are coming */
    type;
}
export class Pos {
    /** @param {{name?:string,posCode?:string,posCodeToBeDisplayed?:string,country?:string,city?:string,postalCode?:string,state?:string,street?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Name of the POS */
    name;
    /**
     * @type {string}
     * @description POS Code */
    posCode;
    /**
     * @type {string}
     * @description Pos Code To Be Displayed */
    posCodeToBeDisplayed;
    /**
     * @type {string}
     * @description Country of the POS */
    country;
    /**
     * @type {string}
     * @description City of the POS */
    city;
    /**
     * @type {string}
     * @description Postal Code */
    postalCode;
    /**
     * @type {string}
     * @description State */
    state;
    /**
     * @type {string}
     * @description Street */
    street;
}
export class UnitNetAmount {
    /** @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 StockPositionItem {
    /** @param {{quantity?:number,serialNumber?:string,stockDate?:string,loadedOnDate?:string,type?:string,isConsignmentSellable?:boolean,unitNetAmount?:UnitNetAmount,retailSalesPrice?:UnitNetAmount}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {number}
     * @description Quantity */
    quantity;
    /**
     * @type {string}
     * @description Serial Number */
    serialNumber;
    /**
     * @type {string}
     * @description Stock Date */
    stockDate;
    /**
     * @type {string}
     * @description Loaded On Date */
    loadedOnDate;
    /**
     * @type {string}
     * @description Type e.g. consignment or standard */
    type;
    /**
     * @type {boolean}
     * @description Is Consignment Sellable  */
    isConsignmentSellable;
    /**
     * @type {UnitNetAmount}
     * @description Sell-In Price. Disclaimer: this data will be arriving empty/null due to DealerCost project still being in test phase. */
    unitNetAmount;
    /**
     * @type {UnitNetAmount}
     * @description Retail Sales Price */
    retailSalesPrice;
}
export class StockItem {
    /** @param {{articleCode?:string,currentStockQuantity?:number,serialNumbers?:string[],stockPositions?:StockPositionItem[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Article Code */
    articleCode;
    /**
     * @type {number}
     * @description Current Stock Quantity */
    currentStockQuantity;
    /**
     * @type {string[]}
     * @description Serial Numbers */
    serialNumbers;
    /**
     * @type {StockPositionItem[]}
     * @description Stock Item in Details */
    stockPositions;
}
export class PosStockItem {
    /** @param {{brand?:string,posCode?:string,sharedStockLocation?:Pos,stockItems?:StockItem[]}} [init] */
    constructor(init) { Object.assign(this, init) }
    /**
     * @type {string}
     * @description Brand */
    brand;
    /**
     * @type {string}
     * @description Pos Code */
    posCode;
    /**
     * @type {Pos}
     * @description Shared Stock Location */
    sharedStockLocation;
    /**
     * @type {StockItem[]}
     * @description Stock Items */
    stockItems;
}
export class GetStockResponse extends Array {
    constructor(init) { super(init); Object.assign(this, init) }
}
export class GetStock extends StockRequest {
    /** @param {{brand?:string,posCodes?:string[],articleCodes?:string[],includeExtraInfo?:boolean,clusterIds?:string[],includeConsignmentNotAuthorizedPOS?:boolean,includeRSP?:boolean,dateFrom?:string,dateTo?:string,type?:string}} [init] */
    constructor(init) { super(init); Object.assign(this, init) }
}

JavaScript GetStock DTOs

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

HTTP + XML

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

GET /stock/{brand} HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ArrayOfPosStockItem xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Stock.ServiceModel" />