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 .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"barTypes":[{"count":0,"slug":"String","title":"String"}],"barSpecialities":[{"count":0,"slug":"String","title":"String"}],"brands":[{"count":0,"name":"String"}],"cuisines":[{"count":0,"label":"String","slug":"String"}],"mealType":[{"count":0,"label":"String","slug":"String"}],"eatingSuitabilities":[{"count":0,"label":"String","slug":"String"}],"parkings":[{"count":0,"label":"String","slug":"StreetParking"}],"paymentOptions":[{"count":0,"label":"String","slug":"Visa"}],"priceMainDishes":[{"count":0,"title":"String","slug":"Value"}],"takeAways":[{"count":0,"label":"String","slug":"String"}],"wearPriceProfiles":[{"count":0,"slug":"String","label":"String"}],"categories":[{"name":"String","slug":"String","absoluteSlug":"String","featureTypes":["BarSpeciality"],"type":"Parent","count":0,"imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0,"children":[{"name":"String","slug":"String","absoluteSlug":"String","featureTypes":["BarSpeciality"],"type":"Parent","count":0,"imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0,"children":[{"name":"String","slug":"String","absoluteSlug":"String","featureTypes":["BarSpeciality"],"type":"Parent","count":0,"imageUrl":"String","allImageUrl":"String","iconImageUrl":"String","position":0}]}]}]}