BusinessApi

<back to all web services

GetPlaceRequest

Business
Requires Authentication
Required role:Business
The following routes are available for this service:
GET/place/get
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 BusinessApi


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OpeningHour:
    open_at_hour: int = 0
    open_at_minute: int = 0
    close_at_hour: int = 0
    close_at_minute: int = 0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class WeeklyOpeningHours:
    monday: Optional[OpeningHour] = None
    tuesday: Optional[OpeningHour] = None
    wednesday: Optional[OpeningHour] = None
    thursday: Optional[OpeningHour] = None
    friday: Optional[OpeningHour] = None
    saturday: Optional[OpeningHour] = None
    sunday: Optional[OpeningHour] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class OpeningHours:
    weekly: Optional[WeeklyOpeningHours] = 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'


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


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


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


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'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class EatingSuitability(IAudit):
    id: int = 0
    label: Optional[str] = None
    slug: Optional[str] = None
    position: int = 0
    created_at: datetime.datetime = datetime.datetime(1, 1, 1)
    updated_at: datetime.datetime = datetime.datetime(1, 1, 1)


class PlaceType(str, Enum):
    MALL = 'Mall'
    REGULAR = 'Regular'


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PlaceContact:
    phone: Optional[str] = None
    email: Optional[str] = None
    website: Optional[str] = None
    web_shop: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PlaceAddress:
    street: Optional[str] = None
    postal_code: Optional[str] = None
    region: Optional[str] = None
    country_code: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TimeZoneDto:
    base_utc_offset: datetime.timedelta = datetime.timedelta()
    daylight_name: Optional[str] = None
    display_name: Optional[str] = None
    id: Optional[str] = None
    standard_name: Optional[str] = None
    supports_daylight_saving_time: bool = False


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


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


Python GetPlaceRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /place/get HTTP/1.1 
Host: business-api.brovs.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	place: 
	{
		id: 0,
		name: String,
		longitude: 0,
		latitude: 0,
		claimed: False,
		organizationNumber: String,
		countryCode: String,
		overview: String,
		openingHours: 
		{
			weekly: 
			{
				monday: 
				{
					openAtHour: 0,
					openAtMinute: 0,
					closeAtHour: 0,
					closeAtMinute: 0
				},
				tuesday: 
				{
					openAtHour: 0,
					openAtMinute: 0,
					closeAtHour: 0,
					closeAtMinute: 0
				},
				wednesday: 
				{
					openAtHour: 0,
					openAtMinute: 0,
					closeAtHour: 0,
					closeAtMinute: 0
				},
				thursday: 
				{
					openAtHour: 0,
					openAtMinute: 0,
					closeAtHour: 0,
					closeAtMinute: 0
				},
				friday: 
				{
					openAtHour: 0,
					openAtMinute: 0,
					closeAtHour: 0,
					closeAtMinute: 0
				},
				saturday: 
				{
					openAtHour: 0,
					openAtMinute: 0,
					closeAtHour: 0,
					closeAtMinute: 0
				},
				sunday: 
				{
					openAtHour: 0,
					openAtMinute: 0,
					closeAtHour: 0,
					closeAtMinute: 0
				}
			}
		},
		featureData: 
		[
			{
				slug: BarSpeciality,
				label: String
			}
		],
		categories: 
		[
			{
				id: 0,
				slug: String,
				absoluteSlug: String,
				name: String,
				children: 
				[
					{
						id: 0,
						slug: String,
						absoluteSlug: String,
						name: String,
						children: 
						[
							{
								id: 0,
								slug: String,
								absoluteSlug: String,
								name: String,
								featureTypes: 
								[
									{
										slug: BarSpeciality,
										label: String
									}
								]
							}
						],
						featureTypes: 
						[
							{
								slug: BarSpeciality,
								label: String
							}
						]
					}
				],
				featureTypes: 
				[
					{
						slug: BarSpeciality,
						label: String
					}
				]
			}
		],
		rootCategory: 
		{
			id: 0,
			slug: String,
			absoluteSlug: String,
			name: String,
			parentId: 0
		},
		menus: 
		[
			{
				id: 0,
				name: String,
				url: String,
				position: 0
			}
		],
		barSpecialities: 
		[
			{
				id: 0,
				slug: String,
				title: String
			}
		],
		barTypes: 
		[
			{
				id: 0,
				slug: String,
				title: String
			}
		],
		brands: 
		[
			{
				id: 0,
				brand: 
				{
					id: 0,
					definedByRootCategoryId: 0,
					name: String
				},
				category: 
				{
					id: 0,
					slug: String,
					absoluteSlug: String,
					name: String,
					parentId: 0
				},
				placeCustomBrand: 
				{
					id: 0,
					definedByPlaceId: 0,
					name: String
				}
			}
		],
		cuisines: 
		[
			{
				id: 0,
				label: String,
				slug: String
			}
		],
		mealTypes: 
		[
			{
				id: 0,
				label: String,
				slug: String,
				position: 0
			}
		],
		parking: 
		[
			{
				label: String,
				slug: StreetParking
			}
		],
		paymentOptions: 
		[
			{
				label: String,
				slug: Visa
			}
		],
		eatingSuitabilities: 
		[
			{
				label: String,
				slug: 
				{
					id: 0,
					label: String,
					slug: String,
					position: 0,
					createdAt: 0001-01-01T00:00:00.0000000+00:00,
					updatedAt: 0001-01-01T00:00:00.0000000+00:00
				}
			}
		],
		takeAways: 
		[
			{
				id: 0,
				label: String,
				slug: String,
				position: 0
			}
		],
		wearPriceProfiles: 
		[
			{
				id: 0,
				label: String,
				slug: String
			}
		],
		wheelChairAccessible: False,
		wifi: False,
		outdoorSeating: False,
		saveFoodAndMoney: False,
		logoUrl: String,
		customImageUrl: String,
		categoryImageUrl: String,
		placeType: Mall,
		places: 
		[
			{
				id: 0,
				name: String,
				businessId: 0,
				longitude: 0,
				latitude: 0,
				claimed: False,
				organizationNumber: String,
				countryCode: String,
				overview: String,
				openingHours: 
				{
					weekly: 
					{
						monday: 
						{
							openAtHour: 0,
							openAtMinute: 0,
							closeAtHour: 0,
							closeAtMinute: 0
						},
						tuesday: 
						{
							openAtHour: 0,
							openAtMinute: 0,
							closeAtHour: 0,
							closeAtMinute: 0
						},
						wednesday: 
						{
							openAtHour: 0,
							openAtMinute: 0,
							closeAtHour: 0,
							closeAtMinute: 0
						},
						thursday: 
						{
							openAtHour: 0,
							openAtMinute: 0,
							closeAtHour: 0,
							closeAtMinute: 0
						},
						friday: 
						{
							openAtHour: 0,
							openAtMinute: 0,
							closeAtHour: 0,
							closeAtMinute: 0
						},
						saturday: 
						{
							openAtHour: 0,
							openAtMinute: 0,
							closeAtHour: 0,
							closeAtMinute: 0
						},
						sunday: 
						{
							openAtHour: 0,
							openAtMinute: 0,
							closeAtHour: 0,
							closeAtMinute: 0
						}
					}
				},
				placeType: Mall,
				contact: 
				{
					phone: String,
					email: String,
					website: String,
					webShop: String
				},
				address: 
				{
					street: String,
					postalCode: String,
					region: String,
					countryCode: String
				},
				wheelChairAccessible: False,
				wifi: False,
				outdoorSeating: False,
				saveFoodAndMoney: False,
				timeZoneDto: 
				{
					baseUtcOffset: PT0S,
					daylightName: String,
					displayName: String,
					id: String,
					standardName: String,
					supportsDaylightSavingTime: False
				},
				priceMainDish: 
				{
					title: String,
					slug: Value
				},
				otherServices: 
				[
					{
						id: 0,
						serviceName: String,
						floor: String
					}
				],
				floor: String
			}
		],
		otherServices: 
		[
			{
				id: 0,
				serviceName: String,
				floor: String
			}
		],
		mall: 
		{
			id: 0,
			name: String,
			businessId: 0,
			longitude: 0,
			latitude: 0,
			claimed: False,
			organizationNumber: String,
			countryCode: String,
			overview: String,
			openingHours: 
			{
				weekly: 
				{
					monday: 
					{
						openAtHour: 0,
						openAtMinute: 0,
						closeAtHour: 0,
						closeAtMinute: 0
					},
					tuesday: 
					{
						openAtHour: 0,
						openAtMinute: 0,
						closeAtHour: 0,
						closeAtMinute: 0
					},
					wednesday: 
					{
						openAtHour: 0,
						openAtMinute: 0,
						closeAtHour: 0,
						closeAtMinute: 0
					},
					thursday: 
					{
						openAtHour: 0,
						openAtMinute: 0,
						closeAtHour: 0,
						closeAtMinute: 0
					},
					friday: 
					{
						openAtHour: 0,
						openAtMinute: 0,
						closeAtHour: 0,
						closeAtMinute: 0
					},
					saturday: 
					{
						openAtHour: 0,
						openAtMinute: 0,
						closeAtHour: 0,
						closeAtMinute: 0
					},
					sunday: 
					{
						openAtHour: 0,
						openAtMinute: 0,
						closeAtHour: 0,
						closeAtMinute: 0
					}
				}
			},
			placeType: Mall,
			contact: 
			{
				phone: String,
				email: String,
				website: String,
				webShop: String
			},
			address: 
			{
				street: String,
				postalCode: String,
				region: String,
				countryCode: String
			},
			wheelChairAccessible: False,
			wifi: False,
			outdoorSeating: False,
			saveFoodAndMoney: False,
			timeZoneDto: 
			{
				baseUtcOffset: PT0S,
				daylightName: String,
				displayName: String,
				id: String,
				standardName: String,
				supportsDaylightSavingTime: False
			},
			priceMainDish: 
			{
				title: String,
				slug: Value
			},
			otherServices: 
			[
				{
					id: 0,
					serviceName: String,
					floor: String
				}
			],
			floor: String
		},
		floor: String,
		timeZoneDto: 
		{
			baseUtcOffset: PT0S,
			daylightName: String,
			displayName: String,
			id: String,
			standardName: String,
			supportsDaylightSavingTime: False
		},
		businessId: 0,
		contact: 
		{
			phone: String,
			email: String,
			website: String,
			webShop: String
		},
		address: 
		{
			street: String,
			postalCode: String,
			region: String,
			countryCode: String
		},
		priceMainDish: 
		{
			title: String,
			slug: Value
		}
	}
}