Richemont.Booster2.PublicApi

<back to all web services

CreateBuyIn

Requires Authentication
The following routes are available for this service:
POST/buyinCreate CPO Buy-in
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
Object = TypeVar('Object')


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CreateBuyInResponse:
    buy_in_order_id: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CreateBuyIn:
    # @ApiMember(Description="Brand Trigram, e.g. CAR, IWC")
    brand: Optional[str] = None
    """
    Brand Trigram, e.g. CAR, IWC
    """


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


    # @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="Sales Representative Emails")
    sale_representative_emails: List[str] = field(default_factory=list)
    """
    Sales Representative Emails
    """


    # @ApiMember(Description="Buy-in creation date", IsRequired=true)
    buy_in_date: datetime.datetime = datetime.datetime(1, 1, 1)
    """
    Buy-in creation date
    """

Python CreateBuyIn 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.

POST /buyin HTTP/1.1 
Host: dev-api-booster.richemont.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"brand":"String","posCode":"String","articleCode":"String","serialNumber":"String","saleRepresentativeEmails":["String"],"buyInDate":"\/Date(-62135596800000-0000)\/"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"buyInOrderId":0}