These docs are for v1.0.0. Click to read the latest docs for v2.0.0.

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",
    "tracking_id": "D36E0002",
    "subject": "Live demo",
    "status": "Scheduled",
    "creation_time": "2018-03-22T09:48:48Z",
    "starting_time": "2018-03-22T04:30:00Z",
    "owner": "Andrea Hartie",
    "package_id": null,
    "duration_minutes": 60,
    "virtual_or_physical_location": "123 Office Street",
    "customer_time_zone_description": "(GMT-5) United States; Eastern time",
    "cancel_reschedule_link": "https://go.oncehub.com/dana?Params=IPLa6BkbZ-QjWTEeZH3cb7afCgcinMNuLvaH-7mTZO4",
    "canceled_booking_tracking_id": null,
    "cancel_reschedule_reason": null,
    "name_of_user_who_canceled_rescheduled": null,
    "name_of_customer_who_canceled_rescheduled": null,
    "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": {
      "public_name": "Andrea Hartie",
      "internal_label": "AndreaHartie",
      "link": "https://go.oncehub.com/andreahartie",
      "category": "Financial planning firm",
      "time_zone_description": "(GMT-5) United States; Eastern time"
    },
    "master_page": {
      "name": "Star Software LLC",
      "label": "dana",
      "link": "https://go.oncehub.com/dana"
    },
    "event_type": {
      "name": "Live demo",
      "description":
        "Schedule a live demo with us for an in-depth look at our enterprise solutions.",
      "category": "Sales"
    },
      "external_calendar": {
      "type": "Google",
      "name": "[email protected]",
      "id": "[email protected]",
      "event_id": "8kvu74dda8kcv0gmmlm3folrhc"
    }
  }
}