BackofficeApi

<back to all web services

PlaceAddRequest

Backoffice
Requires Authentication
Required role:Backoffice
The following routes are available for this service:
POST/place/add
"use strict";
export class PlaceAddress {
    /** @param {{street?:string,postalCode?:string,region?:string,countryCode?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {string} */
    street;
    /** @type {string} */
    postalCode;
    /** @type {string} */
    region;
    /** @type {string} */
    countryCode;
}
/** @typedef {'Draft'|'Active'|'Paused'|'Archived'} */
export var PlaceState;
(function (PlaceState) {
    PlaceState["Draft"] = "Draft"
    PlaceState["Active"] = "Active"
    PlaceState["Paused"] = "Paused"
    PlaceState["Archived"] = "Archived"
})(PlaceState || (PlaceState = {}));
export class TimeZoneDto {
    /** @param {{baseUtcOffset?:string,daylightName?:string,displayName?:string,id?:string,standardName?:string,supportsDaylightSavingTime?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    baseUtcOffset;
    /** @type {string} */
    daylightName;
    /** @type {string} */
    displayName;
    /** @type {string} */
    id;
    /** @type {string} */
    standardName;
    /** @type {?boolean} */
    supportsDaylightSavingTime;
}
export class PlaceContact {
    /** @param {{phone?:string,email?:string,website?:string,webShop?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {?string} */
    phone;
    /** @type {?string} */
    email;
    /** @type {?string} */
    website;
    /** @type {?string} */
    webShop;
}
/** @typedef {'Owner'|'Manager'|'Sales'|'Marketing'|'Other'} */
export var BusinessRole;
(function (BusinessRole) {
    BusinessRole["Owner"] = "Owner"
    BusinessRole["Manager"] = "Manager"
    BusinessRole["Sales"] = "Sales"
    BusinessRole["Marketing"] = "Marketing"
    BusinessRole["Other"] = "Other"
})(BusinessRole || (BusinessRole = {}));

JavaScript PlaceAddRequest 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/add HTTP/1.1 
Host: backoffice-api.brovs.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	name: String,
	organizationNumber: String,
	businessId: 0,
	address: 
	{
		street: String,
		postalCode: String,
		region: String,
		countryCode: String
	},
	rootCategoryAbsoluteSlug: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	place: 
	{
		id: 0,
		name: String,
		longitude: 0,
		latitude: 0,
		rootCategory: 
		{
			id: 0,
			name: String,
			slug: String,
			absoluteSlug: String,
			parentId: 0,
			state: String,
			position: 0
		},
		claimed: False,
		organizationNumber: String,
		state: Draft,
		countryCode: String,
		overview: 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
		},
		backofficeGrantedStaffAccess: 
		[
			{
				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
			}
		]
	}
}