Richemont.Booster2.PublicApi

<back to all web services

GetPurchaseItems

Requires Authentication
The following routes are available for this service:
GET/purchaseItem/{brand}Get a list of purchase details
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 Amount:
    # @ApiMember(Description="Value", IsRequired=true)
    value: Decimal = decimal.Decimal(0)
    """
    Value
    """


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


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PurchaseItem:
    # @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="Erp Order Id", IsRequired=true)
    erp_order_id: int = 0
    """
    Erp Order Id
    """


    # @ApiMember(Description="Line number", IsRequired=true)
    line_number: int = 0
    """
    Line number
    """


    # @ApiMember(Description="Order Date", IsRequired=true)
    order_date: Optional[str] = None
    """
    Order Date
    """


    # @ApiMember(Description="Origin Order Id")
    origin_order_id: Optional[int] = None
    """
    Origin Order Id
    """


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


    # @ApiMember(Description="Ordered Quantity", IsRequired=true)
    ordered_quantity: int = 0
    """
    Ordered Quantity
    """


    # @ApiMember(Description="Open Quantity", IsRequired=true)
    open_quantity: int = 0
    """
    Open Quantity
    """


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


    # @ApiMember(Description="Net Amount", IsRequired=true)
    net_amount: Optional[Amount] = None
    """
    Net Amount
    """


    # @ApiMember(Description="Customer Reference", IsRequired=true)
    customer_reference: Optional[str] = None
    """
    Customer Reference
    """


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


    # @ApiMember(Description="Expected Delivery Date", IsRequired=true)
    expected_delivery_date: Optional[str] = None
    """
    Expected Delivery Date
    """


    # @ApiMember(Description="Is Strap Vip Order", IsRequired=true)
    is_strap_vip_order: bool = False
    """
    Is Strap Vip Order
    """


    # @ApiMember(Description="Order Type", IsRequired=true)
    order_type: Optional[str] = None
    """
    Order Type
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetPurchaseItemsResponse:
    # @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 purchase items", IsRequired=true)
    elements: Optional[List[PurchaseItem]] = None
    """
    List of purchase items
    """


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


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


    # @ApiMember(Description="Article Codes")
    article_codes: Optional[List[str]] = None
    """
    Article Codes
    """


    # @ApiMember(Description="ERP Order Codes")
    erp_order_codes: Optional[List[str]] = None
    """
    ERP Order Codes
    """


    # @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
    """

Python GetPurchaseItems DTOs

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

HTTP + OTHER

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

GET /purchaseItem/{brand} HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"totalPages":0,"totalResults":0,"page":0,"items":0}