BusinessApi

<back to all web services

PlaceUpdateRequest

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


Python PlaceUpdateRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /place/update HTTP/1.1 
Host: business-api.brovs.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"placeId":0,"name":"String","phone":"String","email":"String","street":"String","postalCode":"String","region":"String","overview":"String","website":"String","webShop":"String","longitude":0,"latitude":0,"wheelChairAccessible":false,"wifi":false,"outdoorSeating":false,"saveFoodAndMoney":false,"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}}},"parking":["StreetParking"],"paymentOptions":["Visa"]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"placeId":0}