| GET | /stock/{brand}/lookup | Get Serial Number and Article lookup from the database |
|---|
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 GetStockLookupResponse() =
///<summary>
///Exists in Stock?
///</summary>
[<ApiMember(Description="Exists in Stock?", IsRequired=true)>]
member val existsInStock:Boolean = new Boolean() with get,set
///<summary>
///Stock Locations / POSes
///</summary>
[<ApiMember(Description="Stock Locations / POSes", IsRequired=true)>]
member val stockLocation:Pos = null with get,set
[<AllowNullLiteral>]
type GetStockLookup() =
///<summary>
///Brand
///</summary>
[<ApiMember(Description="Brand", IsRequired=true)>]
member val brand:String = null with get,set
///<summary>
///Article Code
///</summary>
[<ApiMember(Description="Article Code", IsRequired=true)>]
member val articleCode:String = null with get,set
///<summary>
///Serial Number
///</summary>
[<ApiMember(Description="Serial Number", IsRequired=true)>]
member val serialNumber: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}/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
}
}