Booster.Microservices

<back to all web services

SitesRequest

Requires Authentication
The following routes are available for this service:
GET/warranty/v1/sites
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


TResponse = TypeVar('TResponse')


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseRequest(Generic[TResponse], IRequest):
    sid: Optional[str] = None
    app: Optional[str] = None
    _os: Optional[str] = None
    _app_version: Optional[str] = None
    _search_method: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseResponse(IRespose):
    _xmlns: Optional[str] = None
    _type: Optional[str] = None
    _source: Optional[str] = None
    _tstamp: Optional[str] = None
    _user: Optional[str] = None
    _env: Optional[str] = None
    _uri: Optional[str] = None
    _query: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Address:
    line1: Optional[str] = None
    city: Optional[str] = None
    zip_code: Optional[str] = None
    country_code: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Brand:
    brand: Optional[str] = None
    last_stock_taking_date: Optional[str] = None
    is_automatic_invoice_number_enabled: int = 0
    sale_rep_required: bool = False
    crm_sale_rep_required: bool = False
    show_promoter_type: bool = False
    stock_owner: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class User(ILookupString):
    object: Optional[str] = None
    id: Optional[str] = None
    brand: Optional[str] = None
    display_name: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Site(ILookupInt):
    object: Optional[str] = None
    id: int = 0
    name: Optional[str] = None
    address: Optional[Address] = None
    brands: Optional[List[Brand]] = None
    users: Optional[List[User]] = None
    is_nfc_active: int = 0
    is_i_os_emb_reader_enable: int = 0
    crm_privacy_policy_mandatory: bool = False
    crm_allow_store_data_abroad_visible: bool = False
    display_first_last_name_not_latin: bool = False
    language_transliteration: Optional[str] = None
    crm_privacy_policy_time_vallee_mandatory: bool = False
    crm_allow_store_data_abroad_time_vallee_visible: bool = False
    allow_to_create_end_customer_outside_china: bool = False
    is_time_vallee: bool = False
    do_not_display_p_o_s_data_in_disclaimers: bool = False
    crm_first_name_mandatory: bool = False
    manage_own_stock: bool = False
    crm_city_mandatory: bool = False


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SitesResponse(BaseResponse):
    sites: Optional[List[Site]] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SitesRequest(BaseRequest[SitesResponse]):
    pass

Python SitesRequest 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/v1/sites HTTP/1.1 
Host: qp-microservices-booster.richemont.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SitesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Pos">
  <_env xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_env>
  <_query xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_query>
  <_source xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_source>
  <_tstamp xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_tstamp>
  <_type xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_type>
  <_uri xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_uri>
  <_user xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_user>
  <_xmlns xmlns="http://schemas.datacontract.org/2004/07/Booster.Microservices.ServiceModel.Common">String</_xmlns>
  <sites>
    <Site>
      <address>
        <city>String</city>
        <countryCode>String</countryCode>
        <line1>String</line1>
        <zipCode>String</zipCode>
      </address>
      <allowToCreateEndCustomerOutsideChina>false</allowToCreateEndCustomerOutsideChina>
      <brands>
        <Brand>
          <brand>String</brand>
          <crmSaleRepRequired>false</crmSaleRepRequired>
          <isAutomaticInvoiceNumberEnabled>0</isAutomaticInvoiceNumberEnabled>
          <lastStockTakingDate>String</lastStockTakingDate>
          <saleRepRequired>false</saleRepRequired>
          <showPromoterType>false</showPromoterType>
          <stockOwner>0</stockOwner>
        </Brand>
      </brands>
      <crmAllowStoreDataAbroadTimeValleeVisible>false</crmAllowStoreDataAbroadTimeValleeVisible>
      <crmAllowStoreDataAbroadVisible>false</crmAllowStoreDataAbroadVisible>
      <crmCityMandatory>false</crmCityMandatory>
      <crmFirstNameMandatory>false</crmFirstNameMandatory>
      <crmPrivacyPolicyMandatory>false</crmPrivacyPolicyMandatory>
      <crmPrivacyPolicyTimeValleeMandatory>false</crmPrivacyPolicyTimeValleeMandatory>
      <displayFirstLastNameNotLatin>false</displayFirstLastNameNotLatin>
      <doNotDisplayPOSDataInDisclaimers>false</doNotDisplayPOSDataInDisclaimers>
      <id>0</id>
      <isIOsEmbReaderEnable>0</isIOsEmbReaderEnable>
      <isNfcActive>0</isNfcActive>
      <isTimeVallee>false</isTimeVallee>
      <languageTransliteration>String</languageTransliteration>
      <manageOwnStock>false</manageOwnStock>
      <name>String</name>
      <object>String</object>
      <users>
        <User>
          <brand>String</brand>
          <displayName>String</displayName>
          <id>String</id>
          <object>String</object>
        </User>
      </users>
    </Site>
  </sites>
</SitesResponse>