Webhook data payload

Sending the Webhook data payload

Whenever one of the defined booking lifecycle events configured for your Webhook subscription occurs in your OnceHub account, an HTTP POST message is triggered, which pushes the relevant booking data to your specified URL endpoint.

The data is sent as a JSON payload consisting of an outer event object, and an embedded data object that contains the relevant booking data.

Event object

The Webhook payload is sent in standard JSON format and contains an event object with the following information represented by key-value pairs (KVPs):

  • A unique event ID
  • The booking lifecycle event that triggered the payload (e.g. booking.scheduled; booking.canceled; booking.rescheduled; etc.)
  • The time at which the event trigger occurred
  • The API version
  • A nested data object containing the relevant booking information

Data object

The nested data object contains all of the booking information related to the booking lifecycle event that triggered the payload, including the following:

  • A booking object with a tracking ID
  • The booking subject, duration, status, creation time, start time, location, and Customer time zone
  • Information about related cancellations or rescheduled bookings, when relevant
  • Customer data submitted in the Booking form, including name, phone, email, company, time zone, as well as Customer guests, note, and custom fields when relevant
  • Booking page, Master page, and Event type data

Sample Webhook payload

Below is a sample Webhook payload, containing example data from a scheduled booking. Learn more about the data structure of the Webhook payload

{
  "id": "EVNT-KN56U3YL7C",
  "object": "event",
  "creation_time": "2018-03-22T09:49:12Z",
  "type": "booking.scheduled",
  "api_version": "v1",
  "data": {
    "object": "booking",
    "id": "BKNG-J4FR05BKEWEX",
    "tracking_id": "D36E0002",
    "subject": "Live demo",
    "status": "scheduled",
    "creation_time": "2020-03-22T09:48:48Z",
    "starting_time": "2020-03-22T04:30:00Z",
    "customer_timezone": "America/New_York",
    "last_updated_time": "2020-03-22T09:48:48Z",
    "owner": "USR-FSD423423",
    "duration_minutes": 60,
    "virtual_conferencing": {
      "join_url": "https://meet.google.com/izv-daci-fyi"
    },
    "location_description": "123 Office Street",
    "rescheduled_booking_id": "BKNG-J4FR05BKEWEX",
    "cancel_reschedule_url": "https://go.oncehub.com/andreahartie?Params=20F2DAE",
    "cancel_reschedule_information": {
      "reason": "Change in schedule",
      "actioned_by": "user",
      "user_id": "USR-FSD423423"
    },
    "form_submission": {
      "name": "Carrie Customer",
      "email": "[email protected]",
      "phone": "",
      "mobile_phone": "1-2025550195",
      "note": "I want to discuss whether your product can work for our office.",
      "company": null,
      "guests": [""],
      "custom_fields": [
        { "name": "Title", "value": "Executive Assistant" },
        { "name": "Office size", "value": "30-50 people" },
        { "name": "Industry", "value": "Lawnscaping services" }
      ]
    },
    "booking_page": "BP-3F7JAWT4UA",
    "master_page": "MP-73E6RHFU77",
    "event_type": "ET-7I7PKDTFJS",
    "external_calendar": {
      "type": "google",
      "name": "[email protected]",
      "id": "[email protected]",
      "event_id": "8kvu74dda8kcv0gmmlm3folrhc"
    },
    "conversation": "CVR-36E9E6F220"
  }
}