BackofficeApi

<back to all web services

PlaceAddRequest

Backoffice
Requires Authentication
Required role:Backoffice
The following routes are available for this service:
POST/place/add
namespace BackofficeApi

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type PlaceAddress() = 
        member val Street:String = null with get,set
        member val PostalCode:String = null with get,set
        member val Region:String = null with get,set
        member val CountryCode:String = null with get,set

    type PlaceState =
        | Draft = 0
        | Active = 1
        | Paused = 2
        | Archived = 3

    [<AllowNullLiteral>]
    type TimeZoneDto() = 
        member val BaseUtcOffset:TimeSpan = new TimeSpan() with get,set
        member val DaylightName:String = null with get,set
        member val DisplayName:String = null with get,set
        member val Id:String = null with get,set
        member val StandardName:String = null with get,set
        member val SupportsDaylightSavingTime:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type PlaceContact() = 
        member val Phone:String = null with get,set
        member val Email:String = null with get,set
        member val Website:String = null with get,set
        member val WebShop:String = null with get,set

    type BusinessRole =
        | Owner = 0
        | Manager = 1
        | Sales = 2
        | Marketing = 3
        | Other = 4

F# PlaceAddRequest DTOs

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

HTTP + OTHER

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/jsonl
Content-Type: text/jsonl
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/jsonl
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"}]}}