Richemont.Booster2.PublicApi

<back to all web services

GetPrice

Requires Authentication
The following routes are available for this service:
GET/price/{brand}Get the list of prices of the requested items
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 DealerCostPrice:
    # @ApiMember(Description="Currency of the Dealer Cost Price", IsRequired=true)
    currency: Optional[str] = None
    """
    Currency of the Dealer Cost Price
    """


    # @ApiMember(Description="Dealer Cost Price of the item", IsRequired=true)
    price: Optional[Decimal] = None
    """
    Dealer Cost Price of the item
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Price:
    # @ApiMember(Description="Reference Code of the item", IsRequired=true)
    article_code: Optional[str] = None
    """
    Reference Code of the item
    """


    # @ApiMember(Description="Currency of the price", IsRequired=true)
    currency: Optional[str] = None
    """
    Currency of the price
    """


    # @ApiMember(Description="Retail price of the item")
    retail_sale_price: Decimal = decimal.Decimal(0)
    """
    Retail price of the item
    """


    # @ApiMember(Description="Code of currency applied", IsRequired=true)
    price_list_code: Optional[str] = None
    """
    Code of currency applied
    """


    # @ApiMember(Description="Dealer Cost Price")
    dealer_cost_price: Optional[DealerCostPrice] = None
    """
    Dealer Cost Price
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetPriceResponse(List[Price]):
    pass


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


    # @ApiMember(Description="Include Dealer Cost Price in the response", IsRequired=true)
    include_dealer_cost_price: bool = False
    """
    Include Dealer Cost Price in the response
    """

Python GetPrice 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 /price/{brand} HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

[]