| GET | /stock/{brand} | Get stock |
|---|
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 GetStock
Inherits StockRequest
End Class
Public Partial Class GetStockResponse
Inherits List(Of PosStockItem)
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 PosStockItem
Public Sub New()
stockItems = New List(Of StockItem)
End Sub
'''<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>
'''Shared Stock Location
'''</Summary>
<ApiMember(Description:="Shared Stock Location", IsRequired:=true)>
Public Overridable Property sharedStockLocation As Pos
'''<Summary>
'''Stock Items
'''</Summary>
<ApiMember(Description:="Stock Items")>
Public Overridable Property stockItems As List(Of StockItem)
End Class
Public Partial Class StockItem
Public Sub New()
serialNumbers = New List(Of String)
stockPositions = New List(Of StockPositionItem)
End Sub
'''<Summary>
'''Article Code
'''</Summary>
<ApiMember(Description:="Article Code", IsRequired:=true)>
Public Overridable Property articleCode As String
'''<Summary>
'''Current Stock Quantity
'''</Summary>
<ApiMember(Description:="Current Stock Quantity", IsRequired:=true)>
Public Overridable Property currentStockQuantity As Integer
'''<Summary>
'''Serial Numbers
'''</Summary>
<ApiMember(Description:="Serial Numbers")>
Public Overridable Property serialNumbers As List(Of String)
'''<Summary>
'''Stock Item in Details
'''</Summary>
<ApiMember(Description:="Stock Item in Details", IsRequired:=true)>
Public Overridable Property stockPositions As List(Of StockPositionItem)
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 StockRequest
Public Sub New()
posCodes = New List(Of String)
articleCodes = New List(Of String)
clusterIds = New List(Of String)
End Sub
'''<Summary>
'''Brand
'''</Summary>
<ApiMember(Description:="Brand", IsRequired:=true)>
Public Overridable Property brand As String
'''<Summary>
'''POS Legacy
'''</Summary>
<ApiMember(Description:="POS Legacy")>
Public Overridable Property posCodes As List(Of String)
'''<Summary>
'''Article Codes
'''</Summary>
<ApiMember(Description:="Article Codes")>
Public Overridable Property articleCodes As List(Of String)
'''<Summary>
'''Include Extra Info
'''</Summary>
<ApiMember(Description:="Include Extra Info")>
Public Overridable Property includeExtraInfo As Boolean
'''<Summary>
'''Cluster Id
'''</Summary>
<ApiMember(Description:="Cluster Id")>
Public Overridable Property clusterIds As List(Of String)
'''<Summary>
'''Include Consignment NotAuthorized POS
'''</Summary>
<ApiMember(Description:="Include Consignment NotAuthorized POS")>
Public Overridable Property includeConsignmentNotAuthorizedPOS As Boolean
'''<Summary>
'''Include Retail Sales Price in the Output, by default: false
'''</Summary>
<ApiMember(Description:="Include Retail Sales Price in the Output, by default: false")>
Public Overridable Property includeRSP As Boolean
'''<Summary>
'''In Stock Since date from
'''</Summary>
<ApiMember(Description:="In Stock Since date from ")>
Public Overridable Property dateFrom As Nullable(Of Date)
'''<Summary>
'''In Stock Since date to
'''</Summary>
<ApiMember(Description:="In Stock Since date to")>
Public Overridable Property dateTo As Nullable(Of Date)
'''<Summary>
'''Item type, 'standard' OR 'consigned'. By default, all are coming
'''</Summary>
<ApiMember(Description:="Item type, 'standard' OR 'consigned'. By default, all are coming")>
Public Overridable Property type As String
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 .other suffix or ?format=other
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: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length []