Richemont.Booster2.PublicApi

<back to all web services

GetStock

Requires Authentication
The following routes are available for this service:
GET/stock/{brand}Get stock
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class GetStock extends StockRequest
    {
        
    }

    public static class StockRequest
    {
        /**
        * Brand
        */
        @ApiMember(Description="Brand", IsRequired=true)
        public String brand = null;

        /**
        * POS Legacy
        */
        @ApiMember(Description="POS Legacy")
        public ArrayList<String> posCodes = null;

        /**
        * Article Codes
        */
        @ApiMember(Description="Article Codes")
        public ArrayList<String> articleCodes = null;

        /**
        * Include Extra Info
        */
        @ApiMember(Description="Include Extra Info")
        public Boolean includeExtraInfo = null;

        /**
        * Cluster Id
        */
        @ApiMember(Description="Cluster Id")
        public ArrayList<String> clusterIds = null;

        /**
        * Include Consignment NotAuthorized POS
        */
        @ApiMember(Description="Include Consignment NotAuthorized POS")
        public Boolean includeConsignmentNotAuthorizedPOS = null;

        /**
        * Include Retail Sales Price in the Output, by default: false
        */
        @ApiMember(Description="Include Retail Sales Price in the Output, by default: false")
        public Boolean includeRSP = null;

        /**
        * In Stock Since date from 
        */
        @ApiMember(Description="In Stock Since date from ")
        public Date dateFrom = null;

        /**
        * In Stock Since date to
        */
        @ApiMember(Description="In Stock Since date to")
        public Date dateTo = null;

        /**
        * Item type, 'standard' OR 'consigned'. By default, all are coming
        */
        @ApiMember(Description="Item type, 'standard' OR 'consigned'. By default, all are coming")
        public String type = null;
        
        public String getBrand() { return brand; }
        public StockRequest setBrand(String value) { this.brand = value; return this; }
        public ArrayList<String> getPosCodes() { return posCodes; }
        public StockRequest setPosCodes(ArrayList<String> value) { this.posCodes = value; return this; }
        public ArrayList<String> getArticleCodes() { return articleCodes; }
        public StockRequest setArticleCodes(ArrayList<String> value) { this.articleCodes = value; return this; }
        public Boolean isIncludeExtraInfo() { return includeExtraInfo; }
        public StockRequest setIncludeExtraInfo(Boolean value) { this.includeExtraInfo = value; return this; }
        public ArrayList<String> getClusterIds() { return clusterIds; }
        public StockRequest setClusterIds(ArrayList<String> value) { this.clusterIds = value; return this; }
        public Boolean isIncludeConsignmentNotAuthorizedPOS() { return includeConsignmentNotAuthorizedPOS; }
        public StockRequest setIncludeConsignmentNotAuthorizedPOS(Boolean value) { this.includeConsignmentNotAuthorizedPOS = value; return this; }
        public Boolean isIncludeRSP() { return includeRSP; }
        public StockRequest setIncludeRSP(Boolean value) { this.includeRSP = value; return this; }
        public Date getDateFrom() { return dateFrom; }
        public StockRequest setDateFrom(Date value) { this.dateFrom = value; return this; }
        public Date getDateTo() { return dateTo; }
        public StockRequest setDateTo(Date value) { this.dateTo = value; return this; }
        public String getType() { return type; }
        public StockRequest setType(String value) { this.type = value; return this; }
    }

    public static class GetStockResponse extends ArrayList<PosStockItem>
    {
        
    }

    public static class PosStockItem
    {
        /**
        * Brand
        */
        @ApiMember(Description="Brand", IsRequired=true)
        public String brand = null;

        /**
        * Pos Code
        */
        @ApiMember(Description="Pos Code", IsRequired=true)
        public String posCode = null;

        /**
        * Shared Stock Location
        */
        @ApiMember(Description="Shared Stock Location", IsRequired=true)
        public Pos sharedStockLocation = null;

        /**
        * Stock Items
        */
        @ApiMember(Description="Stock Items")
        public ArrayList<StockItem> stockItems = null;
        
        public String getBrand() { return brand; }
        public PosStockItem setBrand(String value) { this.brand = value; return this; }
        public String getPosCode() { return posCode; }
        public PosStockItem setPosCode(String value) { this.posCode = value; return this; }
        public Pos getSharedStockLocation() { return sharedStockLocation; }
        public PosStockItem setSharedStockLocation(Pos value) { this.sharedStockLocation = value; return this; }
        public ArrayList<StockItem> getStockItems() { return stockItems; }
        public PosStockItem setStockItems(ArrayList<StockItem> value) { this.stockItems = value; return this; }
    }

    public static class Pos
    {
        /**
        * Name of the POS
        */
        @ApiMember(Description="Name of the POS", IsRequired=true)
        public String name = null;

        /**
        * POS Code
        */
        @ApiMember(Description="POS Code", IsRequired=true)
        public String posCode = null;

        /**
        * Pos Code To Be Displayed
        */
        @ApiMember(Description="Pos Code To Be Displayed", IsRequired=true)
        public String posCodeToBeDisplayed = null;

        /**
        * Country of the POS
        */
        @ApiMember(Description="Country of the POS", IsRequired=true)
        public String country = null;

        /**
        * City of the POS
        */
        @ApiMember(Description="City of the POS", IsRequired=true)
        public String city = null;

        /**
        * Postal Code
        */
        @ApiMember(Description="Postal Code", IsRequired=true)
        public String postalCode = null;

        /**
        * State
        */
        @ApiMember(Description="State", IsRequired=true)
        public String state = null;

        /**
        * Street
        */
        @ApiMember(Description="Street", IsRequired=true)
        public String street = null;
        
        public String getName() { return name; }
        public Pos setName(String value) { this.name = value; return this; }
        public String getPosCode() { return posCode; }
        public Pos setPosCode(String value) { this.posCode = value; return this; }
        public String getPosCodeToBeDisplayed() { return posCodeToBeDisplayed; }
        public Pos setPosCodeToBeDisplayed(String value) { this.posCodeToBeDisplayed = value; return this; }
        public String getCountry() { return country; }
        public Pos setCountry(String value) { this.country = value; return this; }
        public String getCity() { return city; }
        public Pos setCity(String value) { this.city = value; return this; }
        public String getPostalCode() { return postalCode; }
        public Pos setPostalCode(String value) { this.postalCode = value; return this; }
        public String getState() { return state; }
        public Pos setState(String value) { this.state = value; return this; }
        public String getStreet() { return street; }
        public Pos setStreet(String value) { this.street = value; return this; }
    }

    public static class StockItem
    {
        /**
        * Article Code
        */
        @ApiMember(Description="Article Code", IsRequired=true)
        public String articleCode = null;

        /**
        * Current Stock Quantity
        */
        @ApiMember(Description="Current Stock Quantity", IsRequired=true)
        public Integer currentStockQuantity = null;

        /**
        * Serial Numbers
        */
        @ApiMember(Description="Serial Numbers")
        public ArrayList<String> serialNumbers = null;

        /**
        * Stock Item in Details
        */
        @ApiMember(Description="Stock Item in Details", IsRequired=true)
        public ArrayList<StockPositionItem> stockPositions = null;
        
        public String getArticleCode() { return articleCode; }
        public StockItem setArticleCode(String value) { this.articleCode = value; return this; }
        public Integer getCurrentStockQuantity() { return currentStockQuantity; }
        public StockItem setCurrentStockQuantity(Integer value) { this.currentStockQuantity = value; return this; }
        public ArrayList<String> getSerialNumbers() { return serialNumbers; }
        public StockItem setSerialNumbers(ArrayList<String> value) { this.serialNumbers = value; return this; }
        public ArrayList<StockPositionItem> getStockPositions() { return stockPositions; }
        public StockItem setStockPositions(ArrayList<StockPositionItem> value) { this.stockPositions = value; return this; }
    }

    public static class StockPositionItem
    {
        /**
        * Quantity
        */
        @ApiMember(Description="Quantity", IsRequired=true)
        public Integer quantity = null;

        /**
        * Serial Number
        */
        @ApiMember(Description="Serial Number")
        public String serialNumber = null;

        /**
        * Stock Date
        */
        @ApiMember(Description="Stock Date", IsRequired=true)
        public String stockDate = null;

        /**
        * Loaded On Date
        */
        @ApiMember(Description="Loaded On Date", IsRequired=true)
        public String loadedOnDate = null;

        /**
        * Type e.g. consignment or standard
        */
        @ApiMember(Description="Type e.g. consignment or standard", IsRequired=true)
        public String type = null;

        /**
        * Is Consignment Sellable 
        */
        @ApiMember(Description="Is Consignment Sellable ", IsRequired=true)
        public Boolean isConsignmentSellable = null;

        /**
        * Sell-In Price. Disclaimer: this data will be arriving empty/null due to DealerCost project still being in test phase.
        */
        @ApiMember(Description="Sell-In Price. Disclaimer: this data will be arriving empty/null due to DealerCost project still being in test phase.")
        public UnitNetAmount unitNetAmount = null;

        /**
        * Retail Sales Price
        */
        @ApiMember(Description="Retail Sales Price")
        public UnitNetAmount retailSalesPrice = null;
        
        public Integer getQuantity() { return quantity; }
        public StockPositionItem setQuantity(Integer value) { this.quantity = value; return this; }
        public String getSerialNumber() { return serialNumber; }
        public StockPositionItem setSerialNumber(String value) { this.serialNumber = value; return this; }
        public String getStockDate() { return stockDate; }
        public StockPositionItem setStockDate(String value) { this.stockDate = value; return this; }
        public String getLoadedOnDate() { return loadedOnDate; }
        public StockPositionItem setLoadedOnDate(String value) { this.loadedOnDate = value; return this; }
        public String getType() { return type; }
        public StockPositionItem setType(String value) { this.type = value; return this; }
        public Boolean getIsConsignmentSellable() { return isConsignmentSellable; }
        public StockPositionItem setIsConsignmentSellable(Boolean value) { this.isConsignmentSellable = value; return this; }
        public UnitNetAmount getUnitNetAmount() { return unitNetAmount; }
        public StockPositionItem setUnitNetAmount(UnitNetAmount value) { this.unitNetAmount = value; return this; }
        public UnitNetAmount getRetailSalesPrice() { return retailSalesPrice; }
        public StockPositionItem setRetailSalesPrice(UnitNetAmount value) { this.retailSalesPrice = value; return this; }
    }

    public static class UnitNetAmount
    {
        /**
        * Currency Iso Code
        */
        @ApiMember(Description="Currency Iso Code", IsRequired=true)
        public String currencyIsoCode = null;

        /**
        * Value
        */
        @ApiMember(Description="Value", IsRequired=true)
        public BigDecimal value = null;
        
        public String getCurrencyIsoCode() { return currencyIsoCode; }
        public UnitNetAmount setCurrencyIsoCode(String value) { this.currencyIsoCode = value; return this; }
        public BigDecimal getValue() { return value; }
        public UnitNetAmount setValue(BigDecimal value) { this.value = value; return this; }
    }

}

Java 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" />