Richemont.Booster2.PublicApi

<back to all web services

GetStockLookup

Requires Authentication
The following routes are available for this service:
GET/stock/{brand}/lookupGet Serial Number and Article lookup from the database
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Pos:
    # @ApiMember(Description="Name of the POS", IsRequired=true)
    name: Optional[str] = None
    """
    Name of the POS
    """


    # @ApiMember(Description="POS Code", IsRequired=true)
    pos_code: Optional[str] = None
    """
    POS Code
    """


    # @ApiMember(Description="Pos Code To Be Displayed", IsRequired=true)
    pos_code_to_be_displayed: Optional[str] = None
    """
    Pos Code To Be Displayed
    """


    # @ApiMember(Description="Country of the POS", IsRequired=true)
    country: Optional[str] = None
    """
    Country of the POS
    """


    # @ApiMember(Description="City of the POS", IsRequired=true)
    city: Optional[str] = None
    """
    City of the POS
    """


    # @ApiMember(Description="Postal Code", IsRequired=true)
    postal_code: Optional[str] = None
    """
    Postal Code
    """


    # @ApiMember(Description="State", IsRequired=true)
    state: Optional[str] = None
    """
    State
    """


    # @ApiMember(Description="Street", IsRequired=true)
    street: Optional[str] = None
    """
    Street
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetStockLookupResponse:
    # @ApiMember(Description="Exists in Stock?", IsRequired=true)
    exists_in_stock: bool = False
    """
    Exists in Stock?
    """


    # @ApiMember(Description="Stock Locations / POSes", IsRequired=true)
    stock_location: Optional[Pos] = None
    """
    Stock Locations / POSes
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetStockLookup:
    # @ApiMember(Description="Brand", IsRequired=true)
    brand: Optional[str] = None
    """
    Brand
    """


    # @ApiMember(Description="Article Code", IsRequired=true)
    article_code: Optional[str] = None
    """
    Article Code
    """


    # @ApiMember(Description="Serial Number", IsRequired=true)
    serial_number: Optional[str] = None
    """
    Serial Number
    """

Python GetStockLookup DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"existsInStock":false,"stockLocation":{"name":"String","posCode":"String","posCodeToBeDisplayed":"String","country":"String","city":"String","postalCode":"String","state":"String","street":"String"}}