Company Level
Upon registration a Company is created with a single Location. This first Location is known as the Company level Location (a.k.a. Primary Location). Any Users/Team Members or Services created at this Location will be accessible from all other Locations.
All secondary Locations are known as Business Level Locations, Services created at these Locations are only bookable at that Location. Every profile is made up of one Company, one Primary Location and as many Business Level Locations as are required.
Company Settings
Using your Company profile settings you can set limits and online booking preferences, these settings will be the default settings for all other Locations when first created.
Override Company Settings
Company settings can be overridden at the Business Level should you allow these options. This allows you to set Company-wide default settings, such as a default Services, that will apply to all Locations which do not need to customize a Service.
Company Level Data
Once you have data in one or all of your locations (e.g. booked appointments, saved customers, added resources), this data can be filtered by date, status, and other filters.
curl -X GET \
'https://sandbox-api.onsched.com/consumer/v1/appointments?
startDate=2019-08-01&
endDate=2019-09-01&
status=BK&
resourceId=33' \
-H 'Accept: */*' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Authorization: Bearer {AUTH_TOKEN}
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Cookie: {RANDOM_STRING}' \
-H 'Host: sandbox-api.onsched.com' \
-H 'cache-control: no-cache'
GET /consumer/v1/appointments?startDate=2019-08-01& endDate=2019-09-01& status=BK& resourceId=33 HTTP/1.1
Host: sandbox-api.onsched.com
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer {AUTH_TOKEN}
Accept: */*
Cache-Control: no-cache
Host: sandbox-api.onsched.com
Accept-Encoding: gzip, deflate
Cookie: {RANDOM_STRING}
Connection: keep-alive
cache-control: no-cache
var request = require("request");
var options = { method: 'GET',
url: 'https://sandbox-api.onsched.com/consumer/v1/appointments',
qs:
{ startDate: '2019-08-01', // search from 2019-08-01
endDate: '2019-09-01', // to 2019-09-01
status: 'BK', // search Booked appointments only
resourceId: '33' }, // search appointments booked with resource 33
headers:
{ cache-control: 'no-cache',
Connection: 'keep-alive',
Cookie: '{RANDOM_STRING}',
Accept-Encoding: 'gzip, deflate',
Host: 'sandbox-api.onsched.com',
Cache-Control: 'no-cache',
Accept: '*/*',
Authorization: 'Bearer {AUTH_TOKEN}',
Content-Type: 'application/x-www-form-urlencoded' } };
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/consumer/v1/appointments?startDate=2019-08-01&endDate=2019-09-01&status=BK&resourceId=33",
"method": "GET",
"headers": {
"Content-Type": "application/x-www-form-urlencoded",
"Authorization": "Bearer {AUTH_TOKEN}",
"Accept": "*/*",
"Cache-Control": "no-cache",
"Host": "sandbox-api.onsched.com",
"Accept-Encoding": "gzip, deflate",
"Cookie": "{RANDOM_STRING}",
"Connection": "keep-alive",
"cache-control": "no-cache"
}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
Results from searches at the Company level will return data that pertains to all Business level locations within your Company. For information about returning data for a single Business level location, please see Business level data.
Updated almost 4 years ago