API Reference

Webhook Subscriptions

Currently Supported Subscriptions

resource_typeeventdescription
Adjustmentadjustment_createdFires when NexHealth detects a new adjustment has been created in the health record system. For adjustments you create via the NexHealth API we will wait to fire this webhook until we successfully read the adjustment back in on our next read cycle (~10 minutes).
Adjustmentadjustment_updatedFires when NexHealth detects a change to an adjustment object in the health record system. For adjustments you update via the NexHealth API we will wait to fire this webhook until we successfully read the change back in on our next read cycle (~10 minutes).
Appointmentappointment_insertionFires upon complete or failed response from an integration when inserting an appointment into an EHR schedule.
Appointmentappointment_createdFires when NexHealth detects a new appointment has been created in the health record system. For appointments you create via the NexHealth API we will wait to fire this webhook until we successfully read the appointment back in on our next read cycle (~10 minutes).
Appointmentappointment_updatedFires when NexHealth detects a change to an appointment object in the health record system. For appointments you update via the NexHealth API we will wait to fire this webhook until we successfully read the change back in on our next read cycle (~10 minutes).
Appointmentappointment_requestedFires when NexHealth detects a new appointment has been requested but not (yet) inserted into the health record system. Most helpful for offices using the NexHealth webapp product without an integrated EHR.
Chargecharge_createdFires when NexHealth detects a new charge has been created in the health record system. For charges you create via the NexHealth API we will wait to fire this webhook until we successfully read the charge back in on our next read cycle (~10 minutes).
Chargecharge_updatedFires when NexHealth detects a change to an charge object in the health record system. For charges you update via the NexHealth API we will wait to fire this webhook until we successfully read the change back in on our next read cycle (~10 minutes).
FormRequestform_request_completedFires when a patient submits a completed form.
Patientpatient_createdFires when NexHealth detects a new patient has been created via API or in the health record system.
Patientpatient_updatedFires when NexHealth detects a change to a patient object.
Paymentpayment_createdFires when NexHealth detects a new payment has been created in the health record system. For payments you create via the NexHealth API we will wait to fire this webhook until we successfully read the payment back in on our next read cycle (~10 minutes).
Paymentpayment_updatedFires when NexHealth detects a change to an payment object in the health record system. For payments you update via the NexHealth API we will wait to fire this webhook until we successfully read the change back in on our next read cycle (~10 minutes).
PaymentTransactionpayment_transaction_insertionFires upon complete or failed response from an integration when inserting a patient payment into an EHR. Please note that creating a payment transaction may result in multiple payment records in the target EHR.
Procedureprocedure_createdFires when NexHealth detects a new procedure has been created in the health record system.
Procedureprocedure_updatedFires when NexHealth detects a change to a procedure object in the health record system (ex: status from scheduled to completed or inactive).
SyncStatussync_status_read_changeFires when an integration's read functionality status changes from red and green (in other words, when reads functionality comes back online).

At this time, the webhook does not fire from green to red. As an alternative, we recommend referring to the “read_status_at” field from the sync status endpoint response in order to determine the last successful read timestamp for the purposes of calculating data freshness. Please note that outside of business hours, the “read_status_at” value may indicate a delta of days especially over weekends and holidays.
SyncStatussync_status_write_changeFires when an integration's write functionality status changes from red and green (in other words, when writes functionality comes back online).

At this time, the webhook does not fire from green to red. As an alternative, we recommend referring to the “write_status_at” field from the sync status endpoint response in order to determine the last successful read timestamp for the purposes of calculating data freshness. Please note that outside of business hours, the “write_status_at” value may indicate a delta of days especially over weekends and holidays.

You can find example payloads for each subscription below.


adjustment_created

Note that adjustments is an array and can contain multiple adjustments.


{
   "institution_id": 1,
   "webhook_subscription_id": 1,
   "delivery_errors": [],
   "resource_type": "Adjustment",
   "event_name": "adjustment_created",
   "event_time": "2022-03-30T09:50:20.174Z",
   "data": {
      "adjustment": {
        // See Adjustment response obect for field definitions
        // https://docs.nexhealth.com/v20240412/reference/getadjustmentsid
      }
   }
}

adjustment_updated

The previous_attributes field identifies the update that was made.


{
  "institution_id": 1,
  "webhook_subscription_id": 3,
  "delivery_errors": [],
  "resource_type": "Adjustment",
  "event_name": "adjustment_updated",
  "event_time": "2022-03-31T16:14:19.152Z",
  "data": {
    "adjustment": {
        // See Adjustment response obect for field definitions
        // https://docs.nexhealth.com/v20240412/reference/getadjustmentsid
    },
    "previous_attributes": { "description": null }
  }
}

appointment_insertion

{
   "institution_id": 1,
   "webhook_subscription_id": 1,
   "delivery_errors": [],
   "resource_type": "Appointment",
   "event_name": "appointment_insertion.complete",
   "event_time": "2022-03-30T09:50:20.174Z",
   "data": {
      "appointment": {
        // See Appointment response obect for field definitions
        // https://docs.nexhealth.com/v20240412/reference/getappointmentsid
      }
   }
}

appointment_created

Note that appointments is an array and can contain multiple appointments.

{
   "institution_id": 1,
   "webhook_subscription_id": 2,
   "delivery_errors": [],
   "resource_type": "Appointment",
   "event_name": "appointment_created",
   "event_time": "2022-03-22T15:22:50.873Z",
   "data": {
      "appointments": [
         {
           // See Appointment response obect for field definitions
           // https://docs.nexhealth.com/v20240412/reference/getappointmentsid
         }
      ]
   }
}

appointment_updated

The following fields can trigger appointment_update events:

patient_id
start_time
end_time
cancelled
missed
confirmed
location_id
sooner_if_possible
operatory_id
checked_out
checked_out_at
provider_id
note
appointment_type_id
deleted
descriptors

The previous_attributes field identifies the update that was made.

{
  "institution_id": 1,
  "webhook_subscription_id": 3,
  "delivery_errors": [],
  "resource_type": "Appointment",
  "event_name": "appointment_updated",
  "event_time": "2022-03-31T16:14:19.152Z",
  "data": {
    "appointment": {
      // See Appointment response obect for field definitions
      // https://docs.nexhealth.com/v20240412/reference/getappointmentsid
    },
    "previous_attributes": { "cancelled": false, "cancelled_at": null }
  }
}

appointment_requested

{
  "institution_id": 1,
  "webhook_subscription_id": 4,
  "delivery_errors": [],
  "resource_type": "Appointment",
  "event_name": "appointment_requested",
  "event_time": "2024-03-21T17:52:47.824Z",
  "data": {
    "appointment": {
      // See Appointment response obect for field definitions
      // https://docs.nexhealth.com/v20240412/reference/getappointmentsid
    },
  }
}

charge_created

Note that charges is an array and can contain multiple charges.


{
   "institution_id": 1,
   "webhook_subscription_id": 1,
   "delivery_errors": [],
   "resource_type": "Charge",
   "event_name": "charge_created",
   "event_time": "2022-03-30T09:50:20.174Z",
   "data": {
      "charge": {
        // See Charge response obect for field definitions
        // https://docs.nexhealth.com/v20240412/reference/getchargesid
      }
   }
}

charge_updated

The previous_attributes field identifies the update that was made.


{
  "institution_id": 1,
  "webhook_subscription_id": 3,
  "delivery_errors": [],
  "resource_type": "Charge",
  "event_name": "charge_updated",
  "event_time": "2022-03-31T16:14:19.152Z",
  "data": {
    "charge": {
        // See Charge response obect for field definitions
        // https://docs.nexhealth.com/v20240412/reference/getchargesid
    },
    "previous_attributes": { "description": null }
  }
}

form_request_completed

{
   "institution_id": 1,
   "webhook_subscription_id":5,
   "delivery_errors": [],
   "resource_type": "FormRequest",
   "event_name": "forms_request_completed",
   "event_time": "2023-06-01 17:17:18.619Z",
   "data": {
      "formrequest": {
        // See Form response obect for field definitions
        // https://docs.nexhealth.com/v20240412/reference/getformsid
      }
    }
}

patient_created

{
   "institution_id": 1,
   "webhook_subscription_id":6,
   "delivery_errors": [],
   "resource_type": "Patient",
   "event_name": "patient_created",
   "event_time": "2022-03-30T20:55:65.163Z",
   "data": {
	    "patients": [
        // See Patients response object for field definitions
        // https://docs.nexhealth.com/v20240412/reference/getpatientsid
      ]
    }
}

patient_updated

The following fields can trigger appointment_update events:

email
first_name
middle_name
last_name
bio
inactive
guarantor_id

The previous_attributes field identifies the update that was made.

{
   "institution_id": 1,
   "webhook_subscription_id": 7,
   "delivery_errors": [],
   "resource_type": "Patient",
   "event_name": "patient_updated",
   "event_time": "2022-10-20T05:19:37.312Z",
   "data": {
      "patient": {
         // See Patients response object for field definitions
         // https://docs.nexhealth.com/v20240412/reference/getpatientsid
       },
       "previous_attributes": {
         "inactive": true
       }   
    }
}

payment_created

Note that payments is an array and can contain multiple payments.


{
   "institution_id": 1,
   "webhook_subscription_id": 1,
   "delivery_errors": [],
   "resource_type": "Payment",
   "event_name": "payment_created",
   "event_time": "2022-03-30T09:50:20.174Z",
   "data": {
      "payment": {
        // See Payment response object for field definitions
        // https://docs.nexhealth.com/v20240412/reference/getpaymentsid
      }
   }
}

payment_updated

The previous_attributes field identifies the update that was made.


{
  "institution_id": 1,
  "webhook_subscription_id": 3,
  "delivery_errors": [],
  "resource_type": "Payment",
  "event_name": "payment_updated",
  "event_time": "2022-03-31T16:14:19.152Z",
  "data": {
    "payment": {
        // See Payment response obect for field definitions
        // https://docs.nexhealth.com/v20240412/reference/getpaymentsid
    },
    "previous_attributes": { "description": null }
  }
}

payment_transaction_insertion

Please note that a single create payment_transactions call, may create several payments in the target EHR. In order to associate the payment_transaction action with the resulting payment(s), please refer to the transaction id.

{
   "institution_id": 1,
   "webhook_subscription_id": 1,
   "delivery_errors": [],
   "resource_type": "PaymentTransaction",
   "event_name": "payment_transaction_insertion.complete",
   "event_time": "2024-08-20T09:43:36.275Z",
   "data": {
        "payments": [
          {
          // See Payment response obect for field definitions
          // https://docs.nexhealth.com/v20240412/reference/getpaymentsid
  			  }
         ]
   }
}

procedure_created

{
   "institution_id": 1,
   "webhook_subscription_id": 9,
   "delivery_errors": [],
   "resource_type": "Procedure",
   "event_name": "procedure_created",
   "event_time": "2022-10-20T05:19:37.312Z",
   "data": {
      "procedures": [
        {
         // See Procedures response object for field definitions
         // https://docs.nexhealth.com/v20240412/reference/getprocedures
        }
       ]
    }
}

procedure_updated

The previous_attributes field identifies the update that was made.

{
   "institution_id": 1,
   "webhook_subscription_id": 10,
   "delivery_errors": [],
   "resource_type": "Procedure",
   "event_name": "procedure_updated",
   "event_time": "2022-10-22T05:19:37.312Z",
   "data": {
      "procedure": {
         // See Procedures response object for field definitions
         // https://docs.nexhealth.com/v20240412/reference/getprocedures
       },
      "previous_attributes": { "status": "scheduled" }
    }
}

sync_status_read_change and sync_status_write_change

{
   "institution_id": 1,
   "webhook_subscription_id": 11,
   "delivery_errors": [],
   "resource_type": "SyncStatus",
   "event_name": "sync_status_read_change.green",
   "event_time": "2022-03-22T15:06:39.001Z",
   "data": {
      "syncstatus": {
        // See Sync Status response object for field definitions
        // https://docs.nexhealth.com/v20240412/reference/getsyncstatus
      }
   }
}

Example Response

{
  "code": false,
  "description": [
    [
      "Description"
    ]
  ],
  "error": [
    [
      "Error"
    ]
  ],
  "data": [
    {
      "id": 1,
      "webhook_endpoint_id": 1,
      "institution_id": 1,
      "resource_type": "Appointment",
      "event": "appointment_insertion",
      "active": true,
      "created_at": "2020-06-05T20:16:57.007Z",
      "updated_at": "2020-06-05T20:16:57.007Z"
    }
  ],
  "count": 2
}