Richemont.Booster2.PublicApi

<back to all web services

GetStockPaginated

Requires Authentication
The following routes are available for this service:
GET/stock/{brand}/{posCode}Get Paginated Stock
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 RetailSalesPrice:
    # @ApiMember(Description="Currency Iso Code", IsRequired=true)
    currency_iso_code: Optional[str] = None
    """
    Currency Iso Code
    """


    # @ApiMember(Description="Value", IsRequired=true)
    value: Optional[Decimal] = None
    """
    Value
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PaginatedStockElement:
    # @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="Article Code", IsRequired=true)
    article_code: Optional[str] = None
    """
    Article Code
    """


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


    # @ApiMember(Description="Current Stock Quantity", IsRequired=true)
    quantity: int = 0
    """
    Current Stock Quantity
    """


    # @ApiMember(Description="Type e.g. consignment or standard", IsRequired=true)
    type: Optional[str] = None
    """
    Type e.g. consignment or standard
    """


    # @ApiMember(Description="Is Consignment Sellable ", IsRequired=true)
    is_consignment_sellable: bool = False
    """
    Is Consignment Sellable 
    """


    # @ApiMember(Description="Retail Sales Price", IsRequired=true)
    retail_sales_price: Optional[RetailSalesPrice] = None
    """
    Retail Sales Price
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetStockPaginatedResponse:
    # @ApiMember(Description="Total Pages", IsRequired=true)
    total_pages: int = 0
    """
    Total Pages
    """


    # @ApiMember(Description="Total Results", IsRequired=true)
    total_results: int = 0
    """
    Total Results
    """


    # @ApiMember(Description="Index of the result set returned", IsRequired=true)
    page: int = 0
    """
    Index of the result set returned
    """


    # @ApiMember(Description="Size of the result set returned", IsRequired=true)
    items: int = 0
    """
    Size of the result set returned
    """


    # @ApiMember(Description="List of movements", IsRequired=true)
    elements: Optional[List[PaginatedStockElement]] = None
    """
    List of movements
    """


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


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


    # @ApiMember(Description="Search Key (Article or SerialNumber)")
    search_key: Optional[str] = None
    """
    Search Key (Article or SerialNumber)
    """


    # @ApiMember(Description="Index of the result set returned")
    page: int = 0
    """
    Index of the result set returned
    """


    # @ApiMember(Description="Size of the result set returned")
    items: int = 0
    """
    Size of the result set returned
    """


    # @ApiMember(Description="Omit precise record count - save on performance")
    no_count: bool = False
    """
    Omit precise record count - save on performance
    """


    # @ApiMember(Description="Sorting expression")
    sort_by: Optional[str] = None
    """
    Sorting expression
    """


    # @ApiMember(Description="Parameter - Include Chain POSes Stock ")
    include_chain_poses_stock: bool = False
    """
    Parameter - Include Chain POSes Stock 
    """


    # @ApiMember(Description="Include Retail Sales Price in the Output, by default: false")
    include_r_s_p: bool = False
    """
    Include Retail Sales Price in the Output, by default: false
    """

Python GetStockPaginated DTOs

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

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /stock/{brand}/{posCode} HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetStockPaginatedResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Stock.ServiceModel">
  <elements i:nil="true" />
  <items>0</items>
  <page>0</page>
  <totalPages>0</totalPages>
  <totalResults>0</totalResults>
</GetStockPaginatedResponse>