A Resource refers to a person, place, or object that is bookable. This can vary from employees, sales representatives or staff, to items/locations such as tanning beds or rooms. All locations will require at least one resource in order for the availability endpoint to respond with available times.

Create a Resource

Resources can be created within the Setup API, Name is the only required parameter for creating a resource. The optional parameters are described in the topics below.

curl -X POST 
  'https://sandbox-api.onsched.com/setup/v1/resources'
  --header 'Content-Type: application/json-patch+json' 
  --header 'Accept: application/json' 
  --header 'Authorization: Bearer {AUTH_TOKEN}' 
  -d '{
    "name":"Marty McFly",
  }
POST /setup/v1/resources 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: 102
Cookie: ARRAffinity={RANDOM_STRING}
Connection: keep-alive
cache-control: no-cache

{
    "name":"Marty McFly",
}
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox-api.onsched.com/setup/v1/resources',
  headers: 
   { 'cache-control': 'no-cache',
     Connection: 'keep-alive',
     Cookie: 'ARRAffinity={RANDOM_STRING}}',
     'Content-Length': '102',
     'Accept-Encoding': 'gzip, deflate',
     Host: 'sandbox-api.onsched.com',
     'Cache-Control': 'no-cache',
     Accept: '*/*',
     Authorization: 'Bearer {AUTH_TOKEN}',
     'Content-Type': 'application/json' },
  body: 
   { 
      "name":"Marty McFly",
   },
  json: true };

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/resources",
  "method": "POST",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "*/*",
    "Cache-Control": "no-cache",
    "Host": "sandbox-api.onsched.com",
    "Accept-Encoding": "gzip, deflate",
    "Content-Length": "102",
    "Cookie": "ARRAffinity={RANDOM_STRING}",
    "Connection": "keep-alive",
    "cache-control": "no-cache"
  },
  "processData": false,
  "data": "{\n\t\"name\" : \"Marty McFly\"\n}"
}

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

Resource Time Zone

Attached to each Resource is their time zone, should it vary from that of the Business Location. When a Resource is selected in the online booking flow their available times for each day are converted to the Customers time zone for ease of booking. The resulting appointment is displayed in the Resource's time zone within the OnSched Portal. The online customer booking the appointment see's the availability in their time zone and the resource (person being booked) see's it in their time zone.

The timezoneId can be set when creating a new resource, or updated by making a PUT call using the id of the resource you wish to update.

curl -X PUT 
  'https://sandbox-api.onsched.com/setup/v1/resources/{RESOURCE_ID}'
  --header 'Content-Type: application/json-patch+json' 
  --header 'Accept: application/json' 
  --header 'Authorization: Bearer {AUTH_TOKEN}' 
  -d '{"timezoneId": "AMERICA/NEW_YORK"}'

#Update resource time zone: Eastern Standard Time (US & Canada)
PUT /setup/v1/resources 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: 102
Cookie: ARRAffinity={RANDOM_STRING}
Connection: keep-alive
cache-control: no-cache

{"timezoneId": "AMERICA/NEW_YORK"}
var request = require("request");

var options = { method: 'PUT',
  url: 'https://sandbox-api.onsched.com/setup/v1/resources',
  headers: 
   { 'cache-control': 'no-cache',
     Connection: 'keep-alive',
     Cookie: 'ARRAffinity={RANDOM_STRING}}',
     'Content-Length': '102',
     'Accept-Encoding': 'gzip, deflate',
     Host: 'sandbox-api.onsched.com',
     'Cache-Control': 'no-cache',
     Accept: '*/*',
     Authorization: 'Bearer {AUTH_TOKEN}',
     'Content-Type': 'application/json' },
  body: 
   {
     "timezoneId": "AMERICA/NEW_YORK"
   },
  json: true };

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/resources",
  "method": "PUT",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "*/*",
    "Cache-Control": "no-cache",
    "Host": "sandbox-api.onsched.com",
    "Accept-Encoding": "gzip, deflate",
    "Content-Length": "102",
    "Cookie": "ARRAffinity={RANDOM_STRING}",
    "Connection": "keep-alive",
    "cache-control": "no-cache"
  },
  "processData": false,
  "data": {
     "timezoneId": "AMERICA/NEW_YORK"
   }
}

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

Meeting Room Links

OnSched allows you to add a unique meeting room link at both the Resource or the Business Level which is displayed on the confirmation page and in the meeting invite. This unique link gives your customers all of the information they need to attend the appointment.

📘

Have a dynamic meeting room link?

No problem, webhooks can be used at the business level to create a meeting using any of the conferencing applications on Zapier.com (Zoom, GoToMeeting, etc.). For more information regarding the configuration of webhooks please see Webhooks.

Resource Groups

Resource Groups provide a way to categorize your resources into groups in order for them to be managed easier within the OnSched Portal. Unlike Service Groups, Resources Groups are not shown in the booking flow, they are designed solely for internal use.

Optional Parameters

Contact Fields allow you to add contact information (i.e. Address, Skype, Bio Link, etc.) to the Resource. These fields can then be added to your online booking flow in order to tell the customer more about who they are booking with.

Resource Image allows you to upload an image or a photo of yourself to personalize the Resource selection page

Resource Timezones enter a unique timezone attached to each Resoruce in the case that it differs from the Business Location

Linked Services are the services for which a Resource may be booked. You can link specific services within the OnSched Portal which will restrict that resource from being booked for specific services.

Calendar Syncing allows each Resource to connect to their own Google or Outlook Calendar. OnSched uses a 2-way synchronization process which allows you to send booked appointments, and also read any events

RecurringAvailability boolean field that allows you to choose between recurring availability or allocations. True meaning it will use the regular weekly availability, and False meaning it will use the specified allocations . In OnSched Portal this is the equivalent of selecting either Weekly Hours or Allocations


What’s Next