| GET | /stock/{brand}/{posCode}/{articleCode} | Get stock details |
|---|
namespace Richemont.Booster2.PublicApi.Stock.ServiceModel
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type Pos() =
///<summary>
///Name of the POS
///</summary>
[<ApiMember(Description="Name of the POS", IsRequired=true)>]
member val name:String = null with get,set
///<summary>
///POS Code
///</summary>
[<ApiMember(Description="POS Code", IsRequired=true)>]
member val posCode:String = null with get,set
///<summary>
///Pos Code To Be Displayed
///</summary>
[<ApiMember(Description="Pos Code To Be Displayed", IsRequired=true)>]
member val posCodeToBeDisplayed:String = null with get,set
///<summary>
///Country of the POS
///</summary>
[<ApiMember(Description="Country of the POS", IsRequired=true)>]
member val country:String = null with get,set
///<summary>
///City of the POS
///</summary>
[<ApiMember(Description="City of the POS", IsRequired=true)>]
member val city:String = null with get,set
///<summary>
///Postal Code
///</summary>
[<ApiMember(Description="Postal Code", IsRequired=true)>]
member val postalCode:String = null with get,set
///<summary>
///State
///</summary>
[<ApiMember(Description="State", IsRequired=true)>]
member val state:String = null with get,set
///<summary>
///Street
///</summary>
[<ApiMember(Description="Street", IsRequired=true)>]
member val street:String = null with get,set
[<AllowNullLiteral>]
type UnitNetAmount() =
///<summary>
///Currency Iso Code
///</summary>
[<ApiMember(Description="Currency Iso Code", IsRequired=true)>]
member val currencyIsoCode:String = null with get,set
///<summary>
///Value
///</summary>
[<ApiMember(Description="Value", IsRequired=true)>]
member val value:Nullable<Decimal> = new Nullable<Decimal>() with get,set
[<AllowNullLiteral>]
type StockPositionItem() =
///<summary>
///Quantity
///</summary>
[<ApiMember(Description="Quantity", IsRequired=true)>]
member val quantity:Int32 = new Int32() with get,set
///<summary>
///Serial Number
///</summary>
[<ApiMember(Description="Serial Number")>]
member val serialNumber:String = null with get,set
///<summary>
///Stock Date
///</summary>
[<ApiMember(Description="Stock Date", IsRequired=true)>]
member val stockDate:String = null with get,set
///<summary>
///Loaded On Date
///</summary>
[<ApiMember(Description="Loaded On Date", IsRequired=true)>]
member val loadedOnDate:String = null with get,set
///<summary>
///Type e.g. consignment or standard
///</summary>
[<ApiMember(Description="Type e.g. consignment or standard", IsRequired=true)>]
member val type:String = null with get,set
///<summary>
///Is Consignment Sellable
///</summary>
[<ApiMember(Description="Is Consignment Sellable ", IsRequired=true)>]
member val isConsignmentSellable:Boolean = new Boolean() with get,set
///<summary>
///Sell-In Price. Disclaimer: this data will be arriving empty/null due to DealerCost project still being in test phase.
///</summary>
[<ApiMember(Description="Sell-In Price. Disclaimer: this data will be arriving empty/null due to DealerCost project still being in test phase.")>]
member val unitNetAmount:UnitNetAmount = null with get,set
///<summary>
///Retail Sales Price
///</summary>
[<ApiMember(Description="Retail Sales Price")>]
member val retailSalesPrice:UnitNetAmount = null with get,set
[<AllowNullLiteral>]
type GetStockDetailResponse() =
///<summary>
///Article code
///</summary>
[<ApiMember(Description="Article code", IsRequired=true)>]
member val articleCode:String = null with get,set
///<summary>
///Brand
///</summary>
[<ApiMember(Description="Brand", IsRequired=true)>]
member val brand:String = null with get,set
///<summary>
///Pos Code
///</summary>
[<ApiMember(Description="Pos Code", IsRequired=true)>]
member val posCode:String = null with get,set
///<summary>
///Current Stock Quantity
///</summary>
[<ApiMember(Description="Current Stock Quantity", IsRequired=true)>]
member val currentStockQuantity:Int32 = new Int32() with get,set
///<summary>
///Shared Stock Location
///</summary>
[<ApiMember(Description="Shared Stock Location", IsRequired=true)>]
member val sharedStockLocation:Pos = null with get,set
///<summary>
///Stock Positions
///</summary>
[<ApiMember(Description="Stock Positions", IsRequired=true)>]
member val stockPositions:ResizeArray<StockPositionItem> = new ResizeArray<StockPositionItem>() with get,set
[<AllowNullLiteral>]
type GetStockDetail() =
///<summary>
///Brand
///</summary>
[<ApiMember(Description="Brand", IsRequired=true)>]
member val brand:String = null with get,set
///<summary>
///POS Legacy
///</summary>
[<ApiMember(Description="POS Legacy", IsRequired=true)>]
member val posCode:String = null with get,set
///<summary>
///Article Code
///</summary>
[<ApiMember(Description="Article Code", IsRequired=true)>]
member val articleCode:String = null with get,set
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}/{articleCode} HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
articleCode: String,
brand: String,
posCode: String,
currentStockQuantity: 0,
sharedStockLocation:
{
name: String,
posCode: String,
posCodeToBeDisplayed: String,
country: String,
city: String,
postalCode: String,
state: String,
street: String
},
stockPositions:
[
{
quantity: 0,
serialNumber: String,
stockDate: String,
loadedOnDate: String,
type: String,
isConsignmentSellable: False,
unitNetAmount:
{
currencyIsoCode: String,
value: 0
},
retailSalesPrice:
{
currencyIsoCode: String,
value: 0
}
}
]
}