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": "Budget management",
    "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": "1600 Pennsylvania Avenue",
    "customer_time_zone_description": "(GMT-5) United States; Eastern time",
    "cancel_reschedule_link": "https://go.oncehub.com/financefirm?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": "so.carrie.customer@gmail.com",
      "phone": "",
      "mobile_phone": "1-2025550195",
      "note": "I want to discuss how to save more money each month.",
      "company": null,
      "guests": [""],
      "custom_fields": [
        { "name": "Profession", "value": "Executive assistant" },
        { "name": "Earned income", "value": "35,000 USD" },
        { "name": "Passive income", "value": "None" }
      ]
    },
    "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": "Financial Services Inc.",
      "label": "financefirm",
      "link": "https://go.oncehub.com/financefirm"
    },
    "event_type": {
      "name": "Budget management",
      "description":
        "We analyze your current income, expenses and debt. From this we work with you to create a sound financial plan that will allow you to enjoy life and meet your financial obligations simultaneously.",
      "category": "Budgeting & Saving"
    },
      "external_calendar": {
      "type": "Google",
      "name": "andrea.hartie@example.com",
      "id": "andrea.hartie@example.com",
      "event_id": "8kvu74dda8kcv0gmmlm3folrhc",
    },
  }
}

Webhook data payload


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.