| GET | /purchase/catalog | Get a list of purchasable articles for the given Pos and Brand |
|---|
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 Article:
# @ApiMember(Description="Reference ID / Code of the Article", IsRequired=true)
article_code: Optional[str] = None
"""
Reference ID / Code of the Article
"""
# @ApiMember(Description="Price of the article", IsRequired=true)
price: Decimal = decimal.Decimal(0)
"""
Price of the article
"""
# @ApiMember(Description="Currency of the price of the article", IsRequired=true)
currency: Optional[str] = None
"""
Currency of the price of the article
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetCatalogResponse:
articles: Optional[List[Article]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetCatalog:
# @ApiMember(Description="POS Legacy", IsRequired=true)
pos_code: Optional[str] = None
"""
POS Legacy
"""
# @ApiMember(Description="Brand Trigram of the POS", IsRequired=true)
brand: Optional[str] = None
"""
Brand Trigram of the POS
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /purchase/catalog HTTP/1.1 Host: dev-api-booster.richemont.com Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
}