Richemont.Booster2.PublicApi

<back to all web services

GetSaleDetails

Requires Authentication
The following routes are available for this service:
GET/warrantyGet a list of Sale DetailsGet a list of Sale Details based on the search parameters submitted
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 SaleDetail:
    # @ApiMember(Description="Unique Identifier of the Sell-out created in Booster", IsRequired=true)
    sale_id: int = 0
    """
    Unique Identifier of the Sell-out created in Booster
    """


    # @ApiMember(Description="Unique Identifier of the Sell-out created in Booster", IsRequired=true)
    sale_detail_id: int = 0
    """
    Unique Identifier of the Sell-out created in Booster
    """


    # @ApiMember(Description="Booster Customer Id")
    booster_customer_id: Optional[int] = None
    """
    Booster Customer Id
    """


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


    # @ApiMember(Description="Receipt or Invoice Number")
    document_number: Optional[str] = None
    """
    Receipt or Invoice Number
    """


    # @ApiMember(Description="Date of the Sell-out", IsRequired=true)
    document_date: Optional[str] = None
    """
    Date of the Sell-out
    """


    # @ApiMember(Description="Position Number")
    document_line_number: Optional[int] = None
    """
    Position Number
    """


    # @ApiMember(Description="Richemont Reference Code of the item", IsRequired=true)
    article_code: Optional[str] = None
    """
    Richemont Reference Code of the item
    """


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


    # @ApiMember(Description="Use positive for standard Sell-out and negative quantity for return", IsRequired=true)
    quantity: Optional[int] = None
    """
    Use positive for standard Sell-out and negative quantity for return
    """


    # @ApiMember(Description="Retail Price")
    retail_price: Optional[Decimal] = None
    """
    Retail Price
    """


    # @ApiMember(Description="Sold Price")
    unit_price: Optional[Decimal] = None
    """
    Sold Price
    """


    # @ApiMember(Description="Currency of the sold price")
    currency_code: Optional[str] = None
    """
    Currency of the sold price
    """


    # @ApiMember(Description="CCP Status Code")
    ccp_status_code: Optional[str] = None
    """
    CCP Status Code
    """


    # @ApiMember(Description="CCP Status Description")
    ccp_status_description: Optional[str] = None
    """
    CCP Status Description
    """


    # @ApiMember(Description="CCP Retrigger enable")
    retrigger_enabled: bool = False
    """
    CCP Retrigger enable
    """


    # @ApiMember(Description="Warranty Extention Status")
    warranty_extention_status_id: Optional[int] = None
    """
    Warranty Extention Status
    """


    # @ApiMember(Description="Warranty Extention Status")
    warranty_extention_status_description: Optional[str] = None
    """
    Warranty Extention Status
    """


    # @ApiMember(Description="Sale Representative Email")
    sale_representative_emails: Optional[List[str]] = None
    """
    Sale Representative Email
    """


    # @ApiMember(Description="Promoter Type IDs, possible values are: DAI, FIT, GRT")
    promoter_type_id: Optional[str] = None
    """
    Promoter Type IDs, possible values are: DAI, FIT, GRT
    """


    # @ApiMember(Description="Sellout Type, possible values are: 'standard' or 'consigned'", IsRequired=true)
    type: Optional[str] = None
    """
    Sellout Type, possible values are: 'standard' or 'consigned'
    """


    # @ApiMember(Description="Original Sale Detail Id")
    original_sale_detail_id: Optional[int] = None
    """
    Original Sale Detail Id
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetSaleDetailsResponse:
    # @ApiMember(Description="Index of the result set returnedr", IsRequired=true)
    page: int = 0
    """
    Index of the result set returnedr
    """


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


    # @ApiMember(Description="Total amount of pages / result sets", IsRequired=true)
    total_pages: int = 0
    """
    Total amount of pages / result sets
    """


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


    # @ApiMember(Description="List of Sale Details", IsRequired=true)
    elements: Optional[List[SaleDetail]] = None
    """
    List of Sale Details
    """


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ProductCategory:
    # @ApiMember(Description="Brand Category ID")
    brand_category_id: Optional[str] = None
    """
    Brand Category ID
    """


    # @ApiMember(Description="Grand Category ID", IsRequired=true)
    grand_category_id: Optional[str] = None
    """
    Grand Category ID
    """


    # @ApiMember(Description="Master Category ID")
    master_category_id: Optional[str] = None
    """
    Master Category ID
    """


    # @ApiMember(Description="Category ID")
    category_id: Optional[str] = None
    """
    Category ID
    """


    # @ApiMember(Description="Sub Category ID")
    sub_category_id: Optional[str] = None
    """
    Sub Category ID
    """


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


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


    # @ApiMember(Description="Receipt or Invoice Number")
    document_number: Optional[str] = None
    """
    Receipt or Invoice Number
    """


    # @ApiMember(Description="Date of the Sell-out Start ")
    document_date_from: Optional[datetime.datetime] = None
    """
    Date of the Sell-out Start 
    """


    # @ApiMember(Description="Date of the Sell-out End")
    document_date_to: Optional[datetime.datetime] = None
    """
    Date of the Sell-out End
    """


    # @ApiMember(Description="Richemont Reference Code of the item")
    article_code: Optional[str] = None
    """
    Richemont Reference Code of the item
    """


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


    # @ApiMember(Description="Unique Identifier of the Sell-out created in Booster")
    sale_detail_id: Optional[int] = None
    """
    Unique Identifier of the Sell-out created in Booster
    """


    # @ApiMember(Description="Unique Identifier of the Sell-out created in Booster")
    sale_id: Optional[int] = None
    """
    Unique Identifier of the Sell-out created in Booster
    """


    # @ApiMember(Description="Booster Customer Id")
    booster_customer_id: Optional[int] = None
    """
    Booster Customer Id
    """


    # @ApiMember(Description="Possible warranty extention status IDs, 1 (Activated), 2 (Requested), 3 (Refused), 4 (Error), 5 (Action Required), 6 (Pending)")
    warranty_extension_status_ids: Optional[List[int]] = None
    """
    Possible warranty extention status IDs, 1 (Activated), 2 (Requested), 3 (Refused), 4 (Error), 5 (Action Required), 6 (Pending)
    """


    # @ApiMember(Description="Product Categories")
    product_categories: Optional[List[ProductCategory]] = None
    """
    Product Categories
    """


    # @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="Omit precise record count - save on performance")
    no_count: bool = False
    """
    Omit precise record count - save on performance
    """


    # @ApiMember(Description="Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'.")
    sort_by: Optional[str] = None
    """
    Sort Expression, Possible values: 'SaleDetailIdDESC', 'DocumentDate'.
    """

Python GetSaleDetails 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 /warranty HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

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