Webhooks to communicate with other applications

The actions described in this lesson require a Manager permission on your clinic.
Nerd alert: This guide will include some technical jargon:

A webhook is one of the ways two applications can communicate with each other. If you use another application that can listen to webhooks, you can configure your Embodia account to send a webhook with the relevant information when a certain event happens on Embodia. For example, if you use Zapier, you can use the Webhooks by Zapier Integrations to pair your Embodia account with the multitude of applications that connect to Zapier.

If you would like to learn more about what webhooks are, Zapier has a great article that explains webhooks in further details.

To get started, click on the Settings tab in the top nav bar, and then on Webhooks under the Stats, reports & exports section.

On the webhooks page, you will see all the events that can trigger a webhook on Embodia. At this time, we support sending a webhook when:

If you would like to receive webhooks for other events, please reach out to us at support@embodiaapp.com.

To configure your webhook parameters, click on Configure. In the pop-up form:



Sending a webhook when a consult is scheduled, updated, or cancelled

Depending on your configuration, Embodia will send a webhook for the following events:

The JSON data sent in the request will be an array with one or more of the following JSON objects:

{
  event: String - ("participant.added", "consult.updated", or "participant.removed"),
  consult: {
    id: Integer - unique ID of the consult on Embodia,
    start_time: Time - the start time of the consult,
    end_time: Time - the end time of the consult,
    duration: Number - the consult duration in minutes,
    cancelled: Boolean - indicates if the consult has been cancelled,
  },
  service: {
    id: Integer - unique ID of the service on Embodia,
    name: String - the name of the service,
  },
  practitioner: {
    id: Integer - unique ID of the practitioner account on Embodia,
    name: String - the name of the practitioner,
    email: String - the email of the practitioner,
  },
  participant: {
    id: Integer - unique ID of the patient account on Embodia,
    name: String - the name of the patient,
    email: String | Null - the email of the patient if it has been provided,
  },
}

Please note that the "practitioner" and "participant" information will only be included in the JSON data if the configuration of the webhook was set to include the practitioner and patient information, respectively.


Sending a webhook when an invoice/package is created, updated, or deleted

Depending on your configuration, Embodia will send a webhook for the following events:

The JSON data sent in the request will be the following JSON objects:

{
  event: String - ("invoice.created", "invoice.updated", or "invoice.deleted"),
  invoice: {
    type: String - ("patient_invoice", "clinic_package", "clinic_package_membership", or "clinic_package_gift_certificate"),
    status: String - ("draft", "partially_paid", "paid_in_full", "paid", "over_paid", "no_payment_needed", "partially_refunded", or "refunded"),
    invoice_number: String - unique invoice number of the invoice/clinic package on Embodia,
    invoice_date: Date - the invoice date,
    currency: String - a 3 digit representation of the currency (such as "cad", "usd", "eur"),
    subtotal: Number - The subtotal of the invoice,
    taxes: Number - The taxes of the invoice,
    total: Number - The total of the invoice,
    unpaid_subtotal_balance: Number - The unpaid balance of the invoice of the invoice (only applicable for type "patient_invoice"),
    line_items: (Array) [
      {
        id: Integer - unique ID of the line item,
        description: String - the description of the line item,
        unit_price: Number - the unit price of the line item,
        units: Integer - the number of units of the line item,
        subtotal: Number - the subtotal of the line item,
        taxes: Number - the taxes of the line item,
        total: Number - the total of the line item,
      },
    ],
    payments: (Array) [
      {
        id: Integer - unique ID of the payment,
        payment_method: String - the payment method used for the payment,
        subtotal: Number - the subtotal of the payment,
        taxes: Number - the taxes of the payment,
        total: Number - the total of the payment,
        status: String - ("draft", "paid", "partially_refunded", or "refunded"),
        from_package: Boolean - indicating if the payment was made from a clinic package,
      },
    ],
  },
  practitioner: {
    id: Integer - unique ID of the practitioner account on Embodia,
    name: String - the name of the practitioner,
    email: String - the email of the practitioner,
  },
  client: {
    id: Integer - unique ID of the patient account on Embodia,
    name: String - the name of the patient,
    email: String | Null - the email of the patient if it has been provided,
  },
}

Please note that the "practitioner" and "client" information will only be included in the JSON data if the configuration of the webhook was set to include the practitioner and patient information, respectively.


Sending a webhook when a patient creates an account from your patient portal

Embodia will send a webhook when a patient creates an account from your patient portal. The JSON data sent in the request will be the following JSON objects:

{
  event: String - ("patient_account.created"),
  client: {
    id: Integer - unique ID of the patient account on Embodia,
    name: String - the name of the patient,
    email: String | Null - the email of the patient if it has been provided,
  },
}


Sending a webhook when a patient completes a booking request

Embodia will send a webhook when a patient completes a booking request. The JSON data sent in the request will be the following JSON objects:

{
  event: String - ("booking_request.completed"),
  request_id: String - unique identifier for the booking request,
  client: {
    first_name: String - the first name of the patient,
    last_name: String - the last name of the patient,
    email: String - the email of the patient,
    mobile_number: String (Optional) - the mobile number of the patient - if provided,
    properties: Array of patient properties if provided - more info below,
  },
  notes: String - the notes that the patient entered,
}

If you've configured your booking request to ask for additional information from the patient by using patient properties, the patient responses will be returned in the "properties" array. Each element of the array has the following structure:

{
  id: Integer - the unique ID of the patient property,
  name: String - the name of the patient property,
  value: String - the response that the patient provided,
}


Sending a webhook when a patient joins a course or a webinar

Depending on your configuration, Embodia will send a webhook for the following events:

The JSON data sent in the request will be the following JSON objects:

{
  event: String - ("course.checkout_process_started", "course_participant.added", "webinar.checkout_process_started", or "webinar_participant.added"),
  resource: {
    type: String - ("course", or "webinar"),
    name: String - the name of the course/webinar,
    id: Integer - unique ID of the course/webinar,
  },
  additional_data: {}
  payment (only for "course_participant.added" and  "webinar_participant.added"): {
    subtotal: Number - the subtotal of the payment,
    taxes: Number - the taxes of the payment,
    total: Number - the total of the payment,
  },
  client: {
    id: Integer - unique ID of the patient account on Embodia,
    name: String - the name of the patient,
    email: String | Null - the email of the patient if it has been provided,
  },
}

Please note that the "client" information will only be included in the JSON data if the configuration of the webhook was set to include the patient information.


Sending a webhook when a patient starts or cancels a membership

Depending on your configuration, Embodia will send a webhook for the following events:

The JSON data sent in the request will be the following JSON objects:

{
  event: String - ("membership.started", or "membership.cancelled"),
  membership: {
    type: String - ("clinic_package_membership", or "academy_membership"),
    id: Integer - unique ID of the membership of Embodia,
    name: String - name of the package/academy membership option,
    membership_id: Integer - unique ID of the package/academy membership option,
    recurrence_interval: String - ("day", "week", "month", "year"),
  },
  client: {
    id: Integer - unique ID of the patient account on Embodia,
    name: String - the name of the patient,
    email: String | Null - the email of the patient if it has been provided,
  },
}

Please note that the "client" information will only be included in the JSON data if the configuration of the webhook was set to include the patient information.