| GET | /stock/{brand}/{posCode}/{articleCode} | Get stock details |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Richemont.Booster2.PublicApi.Stock.ServiceModel
Namespace Global
Namespace Richemont.Booster2.PublicApi.Stock.ServiceModel
Public Partial Class GetStockDetail
'''<Summary>
'''Brand
'''</Summary>
<ApiMember(Description:="Brand", IsRequired:=true)>
Public Overridable Property brand As String
'''<Summary>
'''POS Legacy
'''</Summary>
<ApiMember(Description:="POS Legacy", IsRequired:=true)>
Public Overridable Property posCode As String
'''<Summary>
'''Article Code
'''</Summary>
<ApiMember(Description:="Article Code", IsRequired:=true)>
Public Overridable Property articleCode As String
End Class
Public Partial Class GetStockDetailResponse
Public Sub New()
stockPositions = New List(Of StockPositionItem)
End Sub
'''<Summary>
'''Article code
'''</Summary>
<ApiMember(Description:="Article code", IsRequired:=true)>
Public Overridable Property articleCode As String
'''<Summary>
'''Brand
'''</Summary>
<ApiMember(Description:="Brand", IsRequired:=true)>
Public Overridable Property brand As String
'''<Summary>
'''Pos Code
'''</Summary>
<ApiMember(Description:="Pos Code", IsRequired:=true)>
Public Overridable Property posCode As String
'''<Summary>
'''Current Stock Quantity
'''</Summary>
<ApiMember(Description:="Current Stock Quantity", IsRequired:=true)>
Public Overridable Property currentStockQuantity As Integer
'''<Summary>
'''Shared Stock Location
'''</Summary>
<ApiMember(Description:="Shared Stock Location", IsRequired:=true)>
Public Overridable Property sharedStockLocation As Pos
'''<Summary>
'''Stock Positions
'''</Summary>
<ApiMember(Description:="Stock Positions", IsRequired:=true)>
Public Overridable Property stockPositions As List(Of StockPositionItem)
End Class
Public Partial Class Pos
'''<Summary>
'''Name of the POS
'''</Summary>
<ApiMember(Description:="Name of the POS", IsRequired:=true)>
Public Overridable Property name As String
'''<Summary>
'''POS Code
'''</Summary>
<ApiMember(Description:="POS Code", IsRequired:=true)>
Public Overridable Property posCode As String
'''<Summary>
'''Pos Code To Be Displayed
'''</Summary>
<ApiMember(Description:="Pos Code To Be Displayed", IsRequired:=true)>
Public Overridable Property posCodeToBeDisplayed As String
'''<Summary>
'''Country of the POS
'''</Summary>
<ApiMember(Description:="Country of the POS", IsRequired:=true)>
Public Overridable Property country As String
'''<Summary>
'''City of the POS
'''</Summary>
<ApiMember(Description:="City of the POS", IsRequired:=true)>
Public Overridable Property city As String
'''<Summary>
'''Postal Code
'''</Summary>
<ApiMember(Description:="Postal Code", IsRequired:=true)>
Public Overridable Property postalCode As String
'''<Summary>
'''State
'''</Summary>
<ApiMember(Description:="State", IsRequired:=true)>
Public Overridable Property state As String
'''<Summary>
'''Street
'''</Summary>
<ApiMember(Description:="Street", IsRequired:=true)>
Public Overridable Property street As String
End Class
Public Partial Class StockPositionItem
'''<Summary>
'''Quantity
'''</Summary>
<ApiMember(Description:="Quantity", IsRequired:=true)>
Public Overridable Property quantity As Integer
'''<Summary>
'''Serial Number
'''</Summary>
<ApiMember(Description:="Serial Number")>
Public Overridable Property serialNumber As String
'''<Summary>
'''Stock Date
'''</Summary>
<ApiMember(Description:="Stock Date", IsRequired:=true)>
Public Overridable Property stockDate As String
'''<Summary>
'''Loaded On Date
'''</Summary>
<ApiMember(Description:="Loaded On Date", IsRequired:=true)>
Public Overridable Property loadedOnDate As String
'''<Summary>
'''Type e.g. consignment or standard
'''</Summary>
<ApiMember(Description:="Type e.g. consignment or standard", IsRequired:=true)>
Public Overridable Property type As String
'''<Summary>
'''Is Consignment Sellable
'''</Summary>
<ApiMember(Description:="Is Consignment Sellable ", IsRequired:=true)>
Public Overridable Property isConsignmentSellable As Boolean
'''<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.")>
Public Overridable Property unitNetAmount As UnitNetAmount
'''<Summary>
'''Retail Sales Price
'''</Summary>
<ApiMember(Description:="Retail Sales Price")>
Public Overridable Property retailSalesPrice As UnitNetAmount
End Class
Public Partial Class UnitNetAmount
'''<Summary>
'''Currency Iso Code
'''</Summary>
<ApiMember(Description:="Currency Iso Code", IsRequired:=true)>
Public Overridable Property currencyIsoCode As String
'''<Summary>
'''Value
'''</Summary>
<ApiMember(Description:="Value", IsRequired:=true)>
Public Overridable Property value As Nullable(Of Decimal)
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetStockDetailResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Stock.ServiceModel">
<articleCode>String</articleCode>
<brand>String</brand>
<currentStockQuantity>0</currentStockQuantity>
<posCode>String</posCode>
<sharedStockLocation>
<city>String</city>
<country>String</country>
<name>String</name>
<posCode>String</posCode>
<posCodeToBeDisplayed>String</posCodeToBeDisplayed>
<postalCode>String</postalCode>
<state>String</state>
<street>String</street>
</sharedStockLocation>
<stockPositions>
<StockPositionItem>
<isConsignmentSellable>false</isConsignmentSellable>
<loadedOnDate>String</loadedOnDate>
<quantity>0</quantity>
<retailSalesPrice>
<currencyIsoCode>String</currencyIsoCode>
<value>0</value>
</retailSalesPrice>
<serialNumber>String</serialNumber>
<stockDate>String</stockDate>
<type>String</type>
<unitNetAmount>
<currencyIsoCode>String</currencyIsoCode>
<value>0</value>
</unitNetAmount>
</StockPositionItem>
</stockPositions>
</GetStockDetailResponse>