| GET | /purchase/pos | Get a list of authorized pos that can place orders |
|---|
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 Pos:
# @ApiMember(Description="POS Code", IsRequired=true)
pos_code: Optional[str] = None
"""
POS Code
"""
# @ApiMember(Description="Name of the POS", IsRequired=true)
name: Optional[str] = None
"""
Name of the POS
"""
# @ApiMember(Description="City of the POS", IsRequired=true)
city: Optional[str] = None
"""
City of the POS
"""
# @ApiMember(Description="Address of the POS", IsRequired=true)
address: Optional[str] = None
"""
Address of the POS
"""
# @ApiMember(Description="Country of the POS", IsRequired=true)
country: Optional[str] = None
"""
Country of the POS
"""
# @ApiMember(Description="Brand of the POS", IsRequired=true)
brand: Optional[str] = None
"""
Brand of the POS
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetPurchasablePosResponse:
# @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 Pos", IsRequired=true)
elements: Optional[List[Pos]] = None
"""
List of Pos
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetPurchasablePos(IPagedRequest):
# @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="Sorting expression")
sort_by: Optional[str] = None
"""
Sorting expression
"""
# @ApiMember(Description="Brand Trigram", IsRequired=true)
brand: Optional[str] = None
"""
Brand Trigram
"""
# @ApiMember(Description="Brand Context ID")
booster_context_id: Optional[str] = None
"""
Brand Context ID
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /purchase/pos HTTP/1.1 Host: dev-api-booster.richemont.com Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <GetPurchasablePosResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Richemont.Booster2.PublicApi.Purchase.ServiceModel"> <elements i:nil="true" /> <items>0</items> <page>0</page> <totalPages>0</totalPages> <totalResults>0</totalResults> </GetPurchasablePosResponse>