BusinessApi

<back to all web services

GetPlaceBootstrapRequest

Business
Requires Authentication
Required role:Business
The following routes are available for this service:
GET/place/getbootstrap

library BusinessApi;
import 'package:servicestack/servicestack.dart';

class OpeningHour implements IConvertible
{
    int? openAtHour;
    int? openAtMinute;
    int? closeAtHour;
    int? closeAtMinute;

    OpeningHour({this.openAtHour,this.openAtMinute,this.closeAtHour,this.closeAtMinute});
    OpeningHour.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        openAtHour = json['openAtHour'];
        openAtMinute = json['openAtMinute'];
        closeAtHour = json['closeAtHour'];
        closeAtMinute = json['closeAtMinute'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'openAtHour': openAtHour,
        'openAtMinute': openAtMinute,
        'closeAtHour': closeAtHour,
        'closeAtMinute': closeAtMinute
    };

    getTypeName() => "OpeningHour";
    TypeContext? context = _ctx;
}

class WeeklyOpeningHours implements IConvertible
{
    OpeningHour? monday;
    OpeningHour? tuesday;
    OpeningHour? wednesday;
    OpeningHour? thursday;
    OpeningHour? friday;
    OpeningHour? saturday;
    OpeningHour? sunday;

    WeeklyOpeningHours({this.monday,this.tuesday,this.wednesday,this.thursday,this.friday,this.saturday,this.sunday});
    WeeklyOpeningHours.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        monday = JsonConverters.fromJson(json['monday'],'OpeningHour',context!);
        tuesday = JsonConverters.fromJson(json['tuesday'],'OpeningHour',context!);
        wednesday = JsonConverters.fromJson(json['wednesday'],'OpeningHour',context!);
        thursday = JsonConverters.fromJson(json['thursday'],'OpeningHour',context!);
        friday = JsonConverters.fromJson(json['friday'],'OpeningHour',context!);
        saturday = JsonConverters.fromJson(json['saturday'],'OpeningHour',context!);
        sunday = JsonConverters.fromJson(json['sunday'],'OpeningHour',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'monday': JsonConverters.toJson(monday,'OpeningHour',context!),
        'tuesday': JsonConverters.toJson(tuesday,'OpeningHour',context!),
        'wednesday': JsonConverters.toJson(wednesday,'OpeningHour',context!),
        'thursday': JsonConverters.toJson(thursday,'OpeningHour',context!),
        'friday': JsonConverters.toJson(friday,'OpeningHour',context!),
        'saturday': JsonConverters.toJson(saturday,'OpeningHour',context!),
        'sunday': JsonConverters.toJson(sunday,'OpeningHour',context!)
    };

    getTypeName() => "WeeklyOpeningHours";
    TypeContext? context = _ctx;
}

class OpeningHours implements IConvertible
{
    WeeklyOpeningHours? weekly;

    OpeningHours({this.weekly});
    OpeningHours.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        weekly = JsonConverters.fromJson(json['weekly'],'WeeklyOpeningHours',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'weekly': JsonConverters.toJson(weekly,'WeeklyOpeningHours',context!)
    };

    getTypeName() => "OpeningHours";
    TypeContext? context = _ctx;
}

enum FeatureType
{
    BarSpeciality,
    BarType,
    Cuisine,
    SaveFoodAndMoney,
    MealType,
    Menu,
    OutdoorSeating,
    Parking,
    PaymentOptions,
    PriceMainDish,
    SubCategories,
    SubCategoriesAndBrands,
    EatingSuitabilities,
    TakeAway,
    WearPriceProfile,
    WheelChairAccessible,
    Wifi,
    WebShop,
    Filtering,
}

class BarSpecialityDto implements IConvertible
{
    int? id;
    String? slug;
    String? title;

    BarSpecialityDto({this.id,this.slug,this.title});
    BarSpecialityDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        slug = json['slug'];
        title = json['title'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'slug': slug,
        'title': title
    };

    getTypeName() => "BarSpecialityDto";
    TypeContext? context = _ctx;
}

class BarTypeDto implements IConvertible
{
    int? id;
    String? slug;
    String? title;

    BarTypeDto({this.id,this.slug,this.title});
    BarTypeDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        slug = json['slug'];
        title = json['title'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'slug': slug,
        'title': title
    };

    getTypeName() => "BarTypeDto";
    TypeContext? context = _ctx;
}

class CuisineDto implements IConvertible
{
    int? id;
    String? label;
    String? slug;

    CuisineDto({this.id,this.label,this.slug});
    CuisineDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        label = json['label'];
        slug = json['slug'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'label': label,
        'slug': slug
    };

    getTypeName() => "CuisineDto";
    TypeContext? context = _ctx;
}

enum Parking
{
    StreetParking,
    ParkingGarageNearby,
}

enum PaymentOption
{
    Visa,
    MasterCard,
    AmericanExpress,
    Diners,
    Vipps,
}

class EatingSuitability implements IAudit, IConvertible
{
    int? id;
    String? label;
    String? slug;
    int? position;
    DateTime? createdAt;
    DateTime? updatedAt;

    EatingSuitability({this.id,this.label,this.slug,this.position,this.createdAt,this.updatedAt});
    EatingSuitability.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        id = json['id'];
        label = json['label'];
        slug = json['slug'];
        position = json['position'];
        createdAt = JsonConverters.fromJson(json['createdAt'],'DateTime',context!);
        updatedAt = JsonConverters.fromJson(json['updatedAt'],'DateTime',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'id': id,
        'label': label,
        'slug': slug,
        'position': position,
        'createdAt': JsonConverters.toJson(createdAt,'DateTime',context!),
        'updatedAt': JsonConverters.toJson(updatedAt,'DateTime',context!)
    };

    getTypeName() => "EatingSuitability";
    TypeContext? context = _ctx;
}

enum PlaceType
{
    Mall,
    Regular,
}

class PlaceContact implements IConvertible
{
    String? phone;
    String? email;
    String? website;
    String? webShop;

    PlaceContact({this.phone,this.email,this.website,this.webShop});
    PlaceContact.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        phone = json['phone'];
        email = json['email'];
        website = json['website'];
        webShop = json['webShop'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'phone': phone,
        'email': email,
        'website': website,
        'webShop': webShop
    };

    getTypeName() => "PlaceContact";
    TypeContext? context = _ctx;
}

class PlaceAddress implements IConvertible
{
    String? street;
    String? postalCode;
    String? region;
    String? countryCode;

    PlaceAddress({this.street,this.postalCode,this.region,this.countryCode});
    PlaceAddress.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        street = json['street'];
        postalCode = json['postalCode'];
        region = json['region'];
        countryCode = json['countryCode'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'street': street,
        'postalCode': postalCode,
        'region': region,
        'countryCode': countryCode
    };

    getTypeName() => "PlaceAddress";
    TypeContext? context = _ctx;
}

class TimeZoneDto implements IConvertible
{
    Duration? baseUtcOffset;
    String? daylightName;
    String? displayName;
    String? id;
    String? standardName;
    bool? supportsDaylightSavingTime;

    TimeZoneDto({this.baseUtcOffset,this.daylightName,this.displayName,this.id,this.standardName,this.supportsDaylightSavingTime});
    TimeZoneDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        baseUtcOffset = JsonConverters.fromJson(json['baseUtcOffset'],'Duration',context!);
        daylightName = json['daylightName'];
        displayName = json['displayName'];
        id = json['id'];
        standardName = json['standardName'];
        supportsDaylightSavingTime = json['supportsDaylightSavingTime'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'baseUtcOffset': JsonConverters.toJson(baseUtcOffset,'Duration',context!),
        'daylightName': daylightName,
        'displayName': displayName,
        'id': id,
        'standardName': standardName,
        'supportsDaylightSavingTime': supportsDaylightSavingTime
    };

    getTypeName() => "TimeZoneDto";
    TypeContext? context = _ctx;
}

enum PriceMainDish
{
    Value,
    Medium,
    High,
    FineDining,
}

class PriceMainDishDto implements IConvertible
{
    String? title;
    PriceMainDish? slug;

    PriceMainDishDto({this.title,this.slug});
    PriceMainDishDto.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        title = json['title'];
        slug = JsonConverters.fromJson(json['slug'],'PriceMainDish',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'title': title,
        'slug': JsonConverters.toJson(slug,'PriceMainDish',context!)
    };

    getTypeName() => "PriceMainDishDto";
    TypeContext? context = _ctx;
}

enum BusinessRole
{
    Owner,
    Manager,
    Sales,
    Marketing,
    Other,
}

TypeContext _ctx = TypeContext(library: 'BusinessApi', types: <String, TypeInfo> {
    'OpeningHour': TypeInfo(TypeOf.Class, create:() => OpeningHour()),
    'WeeklyOpeningHours': TypeInfo(TypeOf.Class, create:() => WeeklyOpeningHours()),
    'OpeningHours': TypeInfo(TypeOf.Class, create:() => OpeningHours()),
    'FeatureType': TypeInfo(TypeOf.Enum, enumValues:FeatureType.values),
    'BarSpecialityDto': TypeInfo(TypeOf.Class, create:() => BarSpecialityDto()),
    'BarTypeDto': TypeInfo(TypeOf.Class, create:() => BarTypeDto()),
    'CuisineDto': TypeInfo(TypeOf.Class, create:() => CuisineDto()),
    'Parking': TypeInfo(TypeOf.Enum, enumValues:Parking.values),
    'PaymentOption': TypeInfo(TypeOf.Enum, enumValues:PaymentOption.values),
    'EatingSuitability': TypeInfo(TypeOf.Class, create:() => EatingSuitability()),
    'PlaceType': TypeInfo(TypeOf.Enum, enumValues:PlaceType.values),
    'PlaceContact': TypeInfo(TypeOf.Class, create:() => PlaceContact()),
    'PlaceAddress': TypeInfo(TypeOf.Class, create:() => PlaceAddress()),
    'TimeZoneDto': TypeInfo(TypeOf.Class, create:() => TimeZoneDto()),
    'PriceMainDish': TypeInfo(TypeOf.Enum, enumValues:PriceMainDish.values),
    'PriceMainDishDto': TypeInfo(TypeOf.Class, create:() => PriceMainDishDto()),
    'BusinessRole': TypeInfo(TypeOf.Enum, enumValues:BusinessRole.values),
});

Dart GetPlaceBootstrapRequest 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 /place/getbootstrap HTTP/1.1 
Host: business-api.brovs.com 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"getPlaceResponse":{"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"}}},"getStaffUserResponse":{"staffDto":{"id":0,"firstName":"String","lastName":"String","email":"String","role":"Owner","placeId":0,"businessId":0,"userId":0,"placeName":"String","businessName":"String","mobileNumber":"String","businessRole":"Owner","lastActiveOn":"0001-01-01T00:00:00.0000000+00:00"}},"getPlaceCountersResponse":{"adMessagesDraftCount":0,"adMessagesUpcomingCount":0,"adMessagesRunningCount":0},"thisIsTheLastOwnerAndDeleteWillUnclaimThePlace":false}