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 Foundation
import ServiceStack

public class OpeningHours : Codable
{
    public var weekly:WeeklyOpeningHours

    required public init(){}
}

public class WeeklyOpeningHours : Codable
{
    public var monday:OpeningHour
    public var tuesday:OpeningHour
    public var wednesday:OpeningHour
    public var thursday:OpeningHour
    public var friday:OpeningHour
    public var saturday:OpeningHour
    public var sunday:OpeningHour

    required public init(){}
}

public class OpeningHour : Codable
{
    public var openAtHour:Int
    public var openAtMinute:Int
    public var closeAtHour:Int
    public var closeAtMinute:Int

    required public init(){}
}

public enum Parking : String, Codable
{
    case StreetParking
    case ParkingGarageNearby
}

public enum PaymentOption : String, Codable
{
    case Visa
    case MasterCard
    case AmericanExpress
    case Diners
    case Vipps
}


Swift PlaceUpdateRequest 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.

POST /place/update HTTP/1.1 
Host: business-api.brovs.com 
Accept: text/jsv
Content-Type: text/jsv
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: text/jsv
Content-Length: length

{
	placeId: 0
}