Business Level

Aggregators typically create Business level locations for each client who wishes to offer their services to the end booker. Business level locations can also be used to segregate each physical location or geographical area. Each company can have an unlimited number of Business level locations.

Company

Business Level Data

Once you have data in each location (e.g. booked appointments, saved customers, added resources), this data can be filtered by date, status, and other filters. Results from searches at the Business level will return only the data that pertains to that specific location. For information about returning data for all locations combined please see Company level data.

📘

One Business Location

In the case where this is one Business Location there will still be both a Company and Business Location present. Settings can be made at either the Company or the Business level.

Separating Business Locations

In the case where you have a Company with multiple business locations but you want users to only access one location at a time, you can easily give customers access to that single location. It is as simple as using the correct URL in your booking flow. By using the URL that points directly to the specified business location the customer will not have access to the location selection page in the booking flow.

👍

Use Case: Multi-Location Bookings

In the case of multiple Business Locations, should you need to add the booking flow for each Location on separate websites, an iFrame can be placed on each site that leads directly to that Business Location's booking flow. By using the direct URL to the applicable location the customer will only see the Business that they have selected, meanwhile, all of the data is collected within the same Company Profile.

Business Level Users

Users added at the Business level will only have access to the locations that they have been added to. For example, if you have a location for each one of your clients, and wish for them only have access to their own location, they will be added at the Business level.

Add a Business level location

Adding a new business level location can be done from the Setup API. When adding a new location the following parameters are required. To see additional parameters that you can add to the body of the request please see POST /locations in the Reference API section.

curl -X POST \
  https://sandbox-api.onsched.com/setup/v1/locations \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Authorization: Bearer {AUTH_TOKEN}' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Length: 365' \
  -H 'Content-Type: application/json' \
  -H 'Cookie: {RANDOM_STRING}' \
  -H 'Host: sandbox-api.onsched.com' \
  -H 'cache-control: no-cache' \
  -d '{
	"name" : "Docs Lab",
	"adminEmail" : "[email protected]",
	"adminName" : "Doc Brown",
	"timezoneName" : "America/New_York",
	"phone" : "8888888888",
	"website" : "onsched.com",
	"email" : "[email protected]",
	"address" : {
		"addressLine1" : "2220 Lake Shore Blvd W",
		"city" : "Toronto",
		"postalCode" : "M6S5B5",
		"state" : "ON",
		"country" : "CA",
	}
}'
POST /setup/v1/locations HTTP/1.1
Host: sandbox-api.onsched.com
Content-Type: application/json
Authorization: Bearer {AUTH_TOKEN}
Accept: */*
Cache-Control: no-cache
Host: sandbox-api.onsched.com
Accept-Encoding: gzip, deflate
Content-Length: 365
Cookie: {RANDOM_STRING} 
Connection: keep-alive
cache-control: no-cache

{
	"name" : "Docs Lab",
	"adminEmail" : "[email protected]",
	"adminName" : "Doc Brown",
	"timezoneName" : "America/New_York",
	"phone" : "8888888888",
	"website" : "onsched.com",
	"email" : "[email protected]",
	"address" : {
		"addressLine1" : "2220 Lake Shore Blvd W",
		"city" : "Toronto",
		"postalCode" : "M6S5B5",
		"state" : "ON",
		"country" : "CA",
	}
}
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox-api.onsched.com/setup/v1/locations',
  headers: 
   { cache-control: 'no-cache',
     Connection: 'keep-alive',
     Cookie: '{RANDOM_STRING}',
     Content-Length: '365',
     Accept-Encoding: 'gzip, deflate',
     Host: 'sandbox-api.onsched.com',
     Cache-Control: 'no-cache',
     Accept: '*/*',
     User-Agent: 'PostmanRuntime/7.17.1',
     Authorization: 'Bearer {AUTH_TOKEN}',
     'Content-Type': 'application/json' },
  body: '{\n\t"name" : "New",\n\t"adminEmail" : "[email protected]",\n\t"adminName" : "OnSched User",\n\t"timezoneName" : "America/New_York",\n\t"phone" : "8888888888",\n\t"website" : "onsched.com",\n\t"email" : "[email protected]",\n\t"address" : {\n\t\t"addressLine1" : "2220 Lake Shore Blvd W",\n\t\t"city" : "Toronto",\n\t\t"postalCode" : "M6S5B5",\n\t\t"state" : "ON",\n\t\t"country" : "CA",\n\t}\n}' };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
var settings = {
  "async": true,
  "crossDomain": true,
  "url": "https://sandbox-api.onsched.com/setup/v1/locations",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "Authorization": "Bearer {AUTH_TOKEN}",
    "Accept": "*/*",
    "Cache-Control": "no-cache",
    "Host": "sandbox-api.onsched.com",
    "Accept-Encoding": "gzip, deflate",
    "Content-Length": "365",
    "Cookie": "{RANDOM_STRING}",
    "Connection": "keep-alive",
    "cache-control": "no-cache"
  },
  "data": "{\n\t\"name\" : \"New\",\n\t\"adminEmail\" : \"[email protected]\",\n\t\"adminName\" : \"OnSched User\",\n\t\"timezoneName\" : \"America/New_York\",\n\t\"phone\" : \"8888888888\",\n\t\"website\" : \"onsched.com\",\n\t\"email\" : \"[email protected]\",\n\t\"address\" : {\n\t\t\"addressLine1\" : \"2220 Lake Shore Blvd W\",\n\t\t\"city\" : \"Toronto\",\n\t\t\"postalCode\" : \"M6S5B5\",\n\t\t\"state\" : \"ON\",\n\t\t\"country\" : \"CA\",\n\t}\n}"
}

$.ajax(settings).done(function (response) {
  console.log(response);
});

What’s Next