| GET | /stock/{brand}/lookup | Get Serial Number and Article lookup from the database |
|---|
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 GetStockLookup
'''<Summary>
'''Brand
'''</Summary>
<ApiMember(Description:="Brand", IsRequired:=true)>
Public Overridable Property brand As String
'''<Summary>
'''Article Code
'''</Summary>
<ApiMember(Description:="Article Code", IsRequired:=true)>
Public Overridable Property articleCode As String
'''<Summary>
'''Serial Number
'''</Summary>
<ApiMember(Description:="Serial Number", IsRequired:=true)>
Public Overridable Property serialNumber As String
End Class
Public Partial Class GetStockLookupResponse
'''<Summary>
'''Exists in Stock?
'''</Summary>
<ApiMember(Description:="Exists in Stock?", IsRequired:=true)>
Public Overridable Property existsInStock As Boolean
'''<Summary>
'''Stock Locations / POSes
'''</Summary>
<ApiMember(Description:="Stock Locations / POSes", IsRequired:=true)>
Public Overridable Property stockLocation As Pos
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
End Namespace
End Namespace
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}/lookup HTTP/1.1
Host: dev-api-booster.richemont.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
existsInStock: False,
stockLocation:
{
name: String,
posCode: String,
posCodeToBeDisplayed: String,
country: String,
city: String,
postalCode: String,
state: String,
street: String
}
}