| GET | /stock/{brand}/{posCode}/{articleCode} | Get stock details |
|---|
import Foundation
import ServiceStack
public class GetStockDetail : Codable
{
/**
* Brand
*/
// @ApiMember(Description="Brand", IsRequired=true)
public var brand:String
/**
* POS Legacy
*/
// @ApiMember(Description="POS Legacy", IsRequired=true)
public var posCode:String
/**
* Article Code
*/
// @ApiMember(Description="Article Code", IsRequired=true)
public var articleCode:String
required public init(){}
}
public class GetStockDetailResponse : Codable
{
/**
* Article code
*/
// @ApiMember(Description="Article code", IsRequired=true)
public var articleCode:String
/**
* Brand
*/
// @ApiMember(Description="Brand", IsRequired=true)
public var brand:String
/**
* Pos Code
*/
// @ApiMember(Description="Pos Code", IsRequired=true)
public var posCode:String
/**
* Current Stock Quantity
*/
// @ApiMember(Description="Current Stock Quantity", IsRequired=true)
public var currentStockQuantity:Int
/**
* Shared Stock Location
*/
// @ApiMember(Description="Shared Stock Location", IsRequired=true)
public var sharedStockLocation:Pos
/**
* Stock Positions
*/
// @ApiMember(Description="Stock Positions", IsRequired=true)
public var stockPositions:[StockPositionItem] = []
required public init(){}
}
public class Pos : Codable
{
/**
* Name of the POS
*/
// @ApiMember(Description="Name of the POS", IsRequired=true)
public var name:String
/**
* POS Code
*/
// @ApiMember(Description="POS Code", IsRequired=true)
public var posCode:String
/**
* Pos Code To Be Displayed
*/
// @ApiMember(Description="Pos Code To Be Displayed", IsRequired=true)
public var posCodeToBeDisplayed:String
/**
* Country of the POS
*/
// @ApiMember(Description="Country of the POS", IsRequired=true)
public var country:String
/**
* City of the POS
*/
// @ApiMember(Description="City of the POS", IsRequired=true)
public var city:String
/**
* Postal Code
*/
// @ApiMember(Description="Postal Code", IsRequired=true)
public var postalCode:String
/**
* State
*/
// @ApiMember(Description="State", IsRequired=true)
public var state:String
/**
* Street
*/
// @ApiMember(Description="Street", IsRequired=true)
public var street:String
required public init(){}
}
public class StockPositionItem : Codable
{
/**
* Quantity
*/
// @ApiMember(Description="Quantity", IsRequired=true)
public var quantity:Int
/**
* Serial Number
*/
// @ApiMember(Description="Serial Number")
public var serialNumber:String
/**
* Stock Date
*/
// @ApiMember(Description="Stock Date", IsRequired=true)
public var stockDate:String
/**
* Loaded On Date
*/
// @ApiMember(Description="Loaded On Date", IsRequired=true)
public var loadedOnDate:String
/**
* Type e.g. consignment or standard
*/
// @ApiMember(Description="Type e.g. consignment or standard", IsRequired=true)
public var type:String
/**
* Is Consignment Sellable
*/
// @ApiMember(Description="Is Consignment Sellable ", IsRequired=true)
public var isConsignmentSellable:Bool
/**
* 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 var unitNetAmount:UnitNetAmount
/**
* Retail Sales Price
*/
// @ApiMember(Description="Retail Sales Price")
public var retailSalesPrice:UnitNetAmount
required public init(){}
}
public class UnitNetAmount : Codable
{
/**
* Currency Iso Code
*/
// @ApiMember(Description="Currency Iso Code", IsRequired=true)
public var currencyIsoCode:String
/**
* Value
*/
// @ApiMember(Description="Value", IsRequired=true)
public var value:Double?
required public init(){}
}
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
}
}
]
}