ConsumerApi

<back to all web services

FindAvailableFilterRequest

Consumer
Requires Authentication
Required role:Consumer
The following routes are available for this service:
GET/find/filtering
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

# module ConsumerApi


class Parking(str, Enum):
    STREET_PARKING = 'StreetParking'
    PARKING_GARAGE_NEARBY = 'ParkingGarageNearby'


class PaymentOption(str, Enum):
    VISA = 'Visa'
    MASTER_CARD = 'MasterCard'
    AMERICAN_EXPRESS = 'AmericanExpress'
    DINERS = 'Diners'
    VIPPS = 'Vipps'


class PriceMainDish(str, Enum):
    VALUE = 'Value'
    MEDIUM = 'Medium'
    HIGH = 'High'
    FINE_DINING = 'FineDining'


class DayOfWeek(str, Enum):
    SUNDAY = 'Sunday'
    MONDAY = 'Monday'
    TUESDAY = 'Tuesday'
    WEDNESDAY = 'Wednesday'
    THURSDAY = 'Thursday'
    FRIDAY = 'Friday'
    SATURDAY = 'Saturday'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OpenAtTimeDto:
    week_day: Optional[DayOfWeek] = None
    hour: int = 0
    minute: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BarTypeEsDto:
    slug: Optional[str] = None
    title: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BarSpecialityEsDto:
    slug: Optional[str] = None
    title: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BrandApiDto:
    name: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class CuisineEsDto:
    label: Optional[str] = None
    slug: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class MealTypeApiDto:
    label: Optional[str] = None
    slug: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EatingSuitabilityApiDto:
    label: Optional[str] = None
    slug: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ParkingApiDto:
    label: Optional[str] = None
    slug: Optional[Parking] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PaymentOptionApiDto:
    label: Optional[str] = None
    slug: Optional[PaymentOption] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PriceMainDishApiDto:
    title: Optional[str] = None
    slug: Optional[PriceMainDish] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TakeAwayApiDto:
    label: Optional[str] = None
    slug: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WearPriceProfileEsDto:
    slug: Optional[str] = None
    label: Optional[str] = None


class FeatureType(str, Enum):
    BAR_SPECIALITY = 'BarSpeciality'
    BAR_TYPE = 'BarType'
    CUISINE = 'Cuisine'
    SAVE_FOOD_AND_MONEY = 'SaveFoodAndMoney'
    MEAL_TYPE = 'MealType'
    MENU = 'Menu'
    OUTDOOR_SEATING = 'OutdoorSeating'
    PARKING = 'Parking'
    PAYMENT_OPTIONS = 'PaymentOptions'
    PRICE_MAIN_DISH = 'PriceMainDish'
    SUB_CATEGORIES = 'SubCategories'
    SUB_CATEGORIES_AND_BRANDS = 'SubCategoriesAndBrands'
    EATING_SUITABILITIES = 'EatingSuitabilities'
    TAKE_AWAY = 'TakeAway'
    WEAR_PRICE_PROFILE = 'WearPriceProfile'
    WHEEL_CHAIR_ACCESSIBLE = 'WheelChairAccessible'
    WIFI = 'Wifi'
    WEB_SHOP = 'WebShop'
    FILTERING = 'Filtering'


Python FindAvailableFilterRequest 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 /find/filtering HTTP/1.1 
Host: unstable-consumer-api.brovs.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<FindAvailableFilterResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/ConsumerApi.Dto">
  <BarSpecialities>
    <BarSpecialityCountDto>
      <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug>
      <Title xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Title>
      <Count>0</Count>
    </BarSpecialityCountDto>
  </BarSpecialities>
  <BarTypes>
    <BarTypeCountDto>
      <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug>
      <Title xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Title>
      <Count>0</Count>
    </BarTypeCountDto>
  </BarTypes>
  <Brands>
    <BrandCountDto>
      <Name xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Name>
      <Count>0</Count>
    </BrandCountDto>
  </Brands>
  <Categories>
    <CategoryFacetTreeDto>
      <AbsoluteSlug>String</AbsoluteSlug>
      <AllImageUrl>String</AllImageUrl>
      <Children>
        <CategoryFacetTreeDto>
          <AbsoluteSlug>String</AbsoluteSlug>
          <AllImageUrl>String</AllImageUrl>
          <Children>
            <CategoryFacetTreeDto>
              <AbsoluteSlug>String</AbsoluteSlug>
              <AllImageUrl>String</AllImageUrl>
              <Children i:nil="true" />
              <Count>0</Count>
              <FeatureTypes xmlns:d8p1="http://schemas.datacontract.org/2004/07/Entities.Database">
                <d8p1:FeatureType>BarSpeciality</d8p1:FeatureType>
              </FeatureTypes>
              <IconImageUrl>String</IconImageUrl>
              <ImageUrl>String</ImageUrl>
              <Name>String</Name>
              <Position>0</Position>
              <Slug>String</Slug>
              <Type>Parent</Type>
            </CategoryFacetTreeDto>
          </Children>
          <Count>0</Count>
          <FeatureTypes xmlns:d6p1="http://schemas.datacontract.org/2004/07/Entities.Database">
            <d6p1:FeatureType>BarSpeciality</d6p1:FeatureType>
          </FeatureTypes>
          <IconImageUrl>String</IconImageUrl>
          <ImageUrl>String</ImageUrl>
          <Name>String</Name>
          <Position>0</Position>
          <Slug>String</Slug>
          <Type>Parent</Type>
        </CategoryFacetTreeDto>
      </Children>
      <Count>0</Count>
      <FeatureTypes xmlns:d4p1="http://schemas.datacontract.org/2004/07/Entities.Database">
        <d4p1:FeatureType>BarSpeciality</d4p1:FeatureType>
      </FeatureTypes>
      <IconImageUrl>String</IconImageUrl>
      <ImageUrl>String</ImageUrl>
      <Name>String</Name>
      <Position>0</Position>
      <Slug>String</Slug>
      <Type>Parent</Type>
    </CategoryFacetTreeDto>
  </Categories>
  <Cuisines>
    <CuisineCountDto>
      <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label>
      <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug>
      <Count>0</Count>
    </CuisineCountDto>
  </Cuisines>
  <EatingSuitabilities>
    <EatingSuitabilityCountDto>
      <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label>
      <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug>
      <Count>0</Count>
    </EatingSuitabilityCountDto>
  </EatingSuitabilities>
  <MealType>
    <MealTypeCountDto>
      <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label>
      <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug>
      <Count>0</Count>
    </MealTypeCountDto>
  </MealType>
  <Parkings>
    <ParkingCountDto>
      <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label>
      <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">StreetParking</Slug>
      <Count>0</Count>
    </ParkingCountDto>
  </Parkings>
  <PaymentOptions>
    <PaymentOptionCountDto>
      <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label>
      <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">Visa</Slug>
      <Count>0</Count>
    </PaymentOptionCountDto>
  </PaymentOptions>
  <PriceMainDishes>
    <PriceMainDishCountDto>
      <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">Value</Slug>
      <Title xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Title>
      <Count>0</Count>
    </PriceMainDishCountDto>
  </PriceMainDishes>
  <TakeAways>
    <TakeAwayCountDto>
      <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label>
      <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug>
      <Count>0</Count>
    </TakeAwayCountDto>
  </TakeAways>
  <WearPriceProfiles>
    <WearPriceProfileCountDto>
      <Label xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Label>
      <Slug xmlns="http://schemas.datacontract.org/2004/07/Api.Dto">String</Slug>
      <Count>0</Count>
    </WearPriceProfileCountDto>
  </WearPriceProfiles>
</FindAvailableFilterResponse>