Overview

The OnSched API fires webhooks for several events including:

Each of the above events are described in detail below.

Webhooks

Webhooks support an optional message signature to ensure that the source is OnSched and not an impersonator.

Each webhook notification passes an event trigger which provides information on what triggered the event and how you should process it.

Basic Structure of Webhooks

Signed Signature
An http header X-Message-Signature contains the signature to verify the source is OnSched.
The signature uses the Sha256 signing algorithm to generate a signature based on a hash key that you configure, or using the default hash key which is equivalent to the company external id.

Event Trigger
The event trigger is a string that describes the underlying event that triggered the webhook. Event triggers help tell you how to process the webhook. For example you’ll know if the trigger is for sending an Sms reminder message versus an email reminder message. This is important if you are rolling your own notification. See the section below which describes all of the possible event triggers.

Object Data
Each different type of webhook supplies data for one or more objects that provide relevant context information for the event.

Each object definition is provided in a section below.

Webhook Url’s

You can configure up to four different url’s for processing webhooks:

  1. Booking Webhook Url
  2. Reminder Webhook Url
  3. Customer Webhook Url
  4. Resource Webhook Url

Webhooks url’s are configured using the OnSched Portal under the company settings menu. Note you can use the same url for some, or all of the webhooks provided your logic uses the event trigger information and acts accordingly.

Booking Webhook

One of the following event triggers will be sent with a booking webhook.

• BookingConfirmation
• RescheduleConfirmation
• CancelReservationConfirmation

Reminder Webhook

One of the following event triggers will be sent with a reminder webhook.

• EmailReminder
• SmsReminder

Customer Webhook

One of the following event triggers will be sent with a customer webhook

• NewCustomer
• UpdateCustomer

Resource Webhook

One of the following event triggers will be sent with a resource webhook.

• NewResource
• UpdateResource

Data definitions

Booking Webhook Sample

{

“eventTrigger”: “BookingConfirmation”,

"appointment": {

"object": "appointment",

"id": 298168,

"locationId": "e4d61bd8-cdf3-4fc9-887e-2320dce062e0",

"calendarId": 2,

"serviceId": 5,

"resourceId": 8,

"customerId": 37886,

"rescheduledId": "",

"createDate": "2018-09-27T08:07:43Z",

"startDateTime": "2018-09-27T09:30:00-04:00",

"endDateTime": "2018-09-27T10:00:00-04:00",

"date": "9/27/2018",

"time": 930,

"duration": 30,

"timezone": -240,

"status": "BK",

"confirmationNumber": "Z861892",

"bookedBy": "[email protected]",

"onlineBooking": true,

"confirmed": false,

"email": "[email protected]",

"name": "John Paddon",

"lastname": "Paddon",

"firstname": "John",

"phone": "9053998404",

"phoneType": "",

"phoneExt": "",

"customerMessage": "",

3 "lastModifiedOn": "2018-09-27T08:08:32Z",

"lastModifiedBy": "[email protected]",

"location": "",

"latitude": "",

"longitude": "",

"stripeChargeId": "",

"stripeRefundId": "",

"paymentStatus": 0,

"customFields": {

"field2": {

"name": "TestField2",

"value": ""

},

"field3": {

"name": "Accept Waiver",

"value": ""

},

"field1": {

"name": "Skype Name",

"value": ""

}

}

},

"customer": {

"object": "customer",

"id": 37886,

"locationId": "e4d61bd8-cdf3-4fc9-887e-2320dce062e0",

"email": "[email protected]",

"name": "John Paddon",

"lastname": "Paddon",

"firstname": "John",

"companyName": "Tasman Technolgies",

"gender": "",

"birthdate": "3/17/1991",

4 "lastVisitDate": "9/10/2018",

"groupId": "",

"resourceId": 0,

"createdOn": "3/16/2017 5:53:27 PM",

"createdBy": "[email protected]",

"registeredBy": "[email protected]",

"verifiedBy": "",

"modifiedBy": "[email protected]",

"modifiedOn": "9/9/2018 5:53:25 PM",

"verificationDate": "",

"registrationDate": "9/7/2018",

"emailInfo": true,

"emailPromotion": false,

"disabled": false,

"inviteEmailSent": "",

"welcomeEmailSent": "7/14/2017 8:20:01 AM",

"deletedStatus": false,

"deletedTime": "",

"notificationType": "3",

"subscriptionId": "",

"latitude": "",

"longitude": "",

"stripeCustomerId": "cus_AaNlxYJN0PTnpM",

"contact": {

"phoneType": "M",

"homePhone": "",

"mobilePhone": "9053998404",

"businessPhone": "",

"businessPhoneExt": "",

"skypeUsername": null

},

"address": {

"addressLine1": "",

"addressLine2": "",

5 "city": "Burlington",

"state": "",

"country": "",

"postalCode": "L7L 3Z2"

},

"customFields": {

"field1": {

"name": "admin",

"value": "0"

},

"field2": {

"name": "Test",

"value": "1"

}

}

},

"resource": {

"object": "resource",

"id": 8,

"locationId": "e4d61bd8-cdf3-4fc9-887e-2320dce062e0",

"name": "Eric Clapton",

"email": "[email protected]",

"groupId": 2,

"description": "",

"imageUrl": "https://onschedule.blob.core.windows.net/pics/E4D61BD8-CDF3-4FC9-887E-2320DCE06

2E0/resource/8/eric-clapton.jpg",

"deletedStatus": false,

"deletedTime": null,

"notificationType": 1,

"bookingNotification": 2,

"googleCalendarId": "[email protected]",

"outlookCalendarId": "",

"ignoreBusinessHours": false,

"gender": "",

6 "gourly": 0,

"calendarAvailability": 1,

"sortKey": 0,

"skypeName": "EricTestSkypeName",

"bioLink": "",

"timezoneOffset": -240,

"timezoneId": "Eastern Standard Time",

"effectiveDate": null,

"contact": {

"phoneType": null,

"homePhone": "",

"mobilePhone": "9053998404",

"businessPhone": "",

"businessPhoneExt": "",

"skypeUsername": "EricTestSkypeName"

},

"address": {

"addressLine1": "",

"addressLine2": "",

"city": "",

"state": "ON",

"country": "CA",

"postalCode": ""

}

}

}

Reminder Webhook Sample

{

“eventTrigger”: “EmailReminder”,

"appointment": {

"object": "appointment",

"id": 298168,

"locationId": "e4d61bd8-cdf3-4fc9-887e-2320dce062e0",

7 "calendarId": 2,

"serviceId": 5,

"resourceId": 8,

"customerId": 37886,

"rescheduledId": "",

"createDate": "2018-09-27T08:07:43Z",

"startDateTime": "2018-09-27T09:30:00-04:00",

"endDateTime": "2018-09-27T10:00:00-04:00",

"date": "9/27/2018",

"time": 930,

"duration": 30,

"timezone": -240,

"status": "BK",

"confirmationNumber": "Z861892",

"bookedBy": "[email protected]",

"onlineBooking": true,

"confirmed": false,

"email": "[email protected]",

"name": "John Paddon",

"lastname": "Paddon",

"firstname": "John",

"phone": "9053998404",

"phoneType": "",

"phoneExt": "",

"customerMessage": "",

"lastModifiedOn": "2018-09-27T08:08:32Z",

"lastModifiedBy": "[email protected]",

"location": "",

"latitude": "",

"longitude": "",

"stripeChargeId": "",

"stripeRefundId": "",

"saymentStatus": 0,

"customFields": {

8 "field2": {

"name": "TestField2",

"value": ""

},

"field3": {

"name": "Accept Waiver",

"value": ""

},

"field1": {

"name": "Skype Name",

"value": ""

}

}

},

"customer": {

"object": "customer",

"id": 37886,

"locationId": "e4d61bd8-cdf3-4fc9-887e-2320dce062e0",

"email": "[email protected]",

"name": "John Paddon",

"lastname": "Paddon",

"firstname": "John",

"companyName": "Tasman Technolgies",

"gender": "",

"birthdate": "3/17/1991",

"lastVisitDate": "9/10/2018",

"groupId": "",

"resourceId": 0,

"createdOn": "3/16/2017 5:53:27 PM",

"createdBy": "[email protected]",

"registeredBy": "[email protected]",

"verifiedBy": "",

"modifiedBy": "[email protected]",

"modifiedOn": "9/9/2018 5:53:25 PM",

9 "verificationDate": "",

"registrationDate": "9/7/2018",

"emailInfo": true,

"emailPromotion": false,

"disabled": false,

"inviteEmailSent": "",

"welcomeEmailSent": "7/14/2017 8:20:01 AM",

"deletedStatus": false,

"deletedTime": "",

"notificationType": "3",

"subscriptionId": "",

"latitude": "",

"longitude": "",

"stripeCustomerId": "cus_AaNlxYJN0PTnpM",

"contact": {

"phoneType": "M",

"homePhone": "",

"mobilePhone": "9053998404",

"businessPhone": "",

"businessPhoneExt": "",

"skypeUsername": null

},

"address": {

"addressLine1": "",

"addressLine2": "",

"city": "Burlington",

"state": "",

"country": "",

"postalCode": "L7L 3Z2"

},

"customFields": {

"field1": {

"name": "admin",

"value": "0"

10 },

"field2": {

"name": "Test",

"value": "1"

}

}

},

"resource": {

"object": "resource",

"Id": 8,

"locationId": "e4d61bd8-cdf3-4fc9-887e-2320dce062e0",

"name": "Eric Clapton",

"email": "[email protected]",

"groupId": 2,

"description": "",

"imageUrl": "https://onschedule.blob.core.windows.net/pics/E4D61BD8-CDF3-4FC9-887E-2320DCE06

2E0/resource/8/eric-clapton.jpg",

"deletedStatus": false,

"deletedTime": null,

"notificationType": 1,

"bookingNotification": 2,

"googleCalendarId": "[email protected]",

"outlookCalendarId": "",

"ignoreBusinessHours": false,

"gender": "",

"hourly": 0,

"calendarAvailability": 1,

"sortKey": 0,

"skypeName": "EricTestSkypeName",

"bioLink": "",

"timezoneOffset": -240,

"timezoneId": "Eastern Standard Time",

"effectiveDate": null,

"contact": {

11 "phoneType": null,

"homePhone": "",

"mobilePhone": "9053998404",

"businessPhone": "",

"businessPhoneExt": "",

"skypeUsername": "EricTestSkypeName"

},

"address": {

"addressLine1": "",

"addressLine2": "",

"city": "",

"state": "ON",

"country": "CA",

"postalCode": ""

}

}

}

Resource Webhook Sample

{

“eventTrigger”: “UpdateResource”,

"resource": {

"object": "resource",

"id": 8,

"locationId": "e4d61bd8-cdf3-4fc9-887e-2320dce062e0",

"name": "Eric Clapton",

"email": "[email protected]",

"groupId": 2,

"description": "",

"imageUrl": "https://onschedule.blob.core.windows.net/pics/E4D61BD8-CDF3-4FC9-887E-2320DCE06

2E0/resource/8/eric-clapton.jpg",

12 "deletedStatus": false,

"deletedTime": null,

"notificationType": 1,

"bookingNotification": 2,

"googleCalendarId": "[email protected]",

"outlookCalendarId": "",

"ignoreBusinessHours": false,

"gender": "",

"hourly": 0,

"calendarAvailability": 1,

"sortKey": 0,

"skypeName": "EricTestSkypeName",

"bioLink": "",

"timezoneOffset": -240,

"timezoneId": "Eastern Standard Time",

"effectiveDate": null,

"contact": {

"phoneType": null,

"homePhone": "",

"mobilePhone": "9053998404",

"businessPhone": "",

"businessPhoneExt": "",

"skypeUsername": "EricTestSkypeName"

},

"address": {

"addressLine1": "",

"addressLine2": "",

"city": "",

"state": "ON",

"country": "CA",

"postalCode": ""

}

}

}

Customer Webhook Sample

{

“eventTrigger”: “UpdateCustomer”,

"customer": {

"object": "customer",

"iId": 37886,

"locationId": "e4d61bd8-cdf3-4fc9-887e-2320dce062e0",

"email": "[email protected]",

"name": "John Paddon",

"lastname": "Paddon",

"firstname": "John",

"companyName": "Tasman Technolgies",

"gender": "",

"birthdate": "3/17/1991",

"lastVisitDate": "9/10/2018",

"groupId": "",

"resourceId": 0,

"createdOn": "3/16/2017 5:53:27 PM",

"createdBy": "[email protected]",

"registeredBy": "[email protected]",

"verifiedBy": "",

"modifiedBy": "[email protected]",

"modifiedOn": "9/9/2018 5:53:25 PM",

"verificationDate": "",

"registrationDate": "9/7/2018",

"emailInfo": true,

"emailPromotion": false,

"disabled": false,

"inviteEmailSent": "",

"welcomeEmailSent": "7/14/2017 8:20:01 AM",

"deletedStatus": false,

14 "deletedTime": "",

"notificationType": "3",

"subscriptionId": "",

"latitude": "",

"longitude": "",

"stripeCustomerId": "cus_AaNlxYJN0PTnpM",

"contact": {

"phoneType": "M",

"homePhone": "",

"mobilePhone": "9053998404",

"businessPhone": "",

"businessPhoneExt": "",

"skypeUsername": null

},

"address": {

"addressLine1": "",

"addressLine2": "",

"city": "Burlington",

"state": "",

"country": "",

"postalCode": "L7L 3Z2"

},

"customFields": {

"field1": {

"name": "admin",

"value": "0"

},

"field2": {

"name": "Test",

"value": "1"

}

}

},

Zapier.com

Connect with a wide variety of different applications by creating a free account at zapier.com and creating a zap that is triggered with a zapier webhook. Once created, select the trigger Catch Hook and a url will be generated by zapier which can be copied and pasted into any of the 3 webhook fields in the OnSched Dashboard.


What’s Next
Did this page help you?