Currently supported subscriptions
resource_type | event | description |
---|---|---|
Appointment | appointment_insertion | Fires upon acomplete or failed response when inserting an appointment into the health record system. |
Appointment | appointment_created | Fires when NexHealth detects a new appointment in the health record system. |
Appointment | appointment_updated | Fires when NexHealth detects a change to an appointment object in the health record system. |
Appointment | appointment_requested | Fires when NexHealth detects a new appointment has been requested but not (yet) inserted into the health record system. This is only for offices using the NexHealth webapp without an integrated health record system. |
FormRequest | form_request_completed | Fires when a patient submits a completed form. |
FormResponse | form_response_insertion | Fires upon acomplete or failed response when inserting a form into the health record system. |
Patient | patient_created | Fires when NexHealth detects a new patient has been created in the health record system. |
Patient | patient_updated | Fires when NexHealth detects a change to a patient object. |
Procedure | procedure_created | Fires when NexHealth detects a new procedure has been created in the health record system. |
Procedure | procedure_updated | Fires when NexHealth detects a change to a procedure object in the health record system (ex: status from scheduled to completed or inactive). |
SyncStatus | sync_status_read_change | Fires when an integration's read functionality status changes from red to green (in other words, when reads functionality comes back online).Currently, the webhook does not trigger from green to red . Instead, we recommend using the read_status_at field from the sync status endpoint response to determine the last successful read timestamp. Keep in mind that outside business hours—especially on weekends and holidays—the read_status_at value may show a delay of several hours or days. |
SyncStatus | sync_status_write_change | Fires when an integration's write status changes from red to green (in other words, when writes functionality comes back online).Currently, the webhook does not trigger from green to red . Instead, we recommend using the write_status_at field from the sync status endpoint response to determine the last successful write timestamp. Keep in mind that outside business hours—especially on weekends and holidays—the write_status_at value may show a delay of several hours or days. |
You can find example payloads for each subscription below.
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/reference/appointments-1#appointments-response-object
}
}
}
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/reference/appointments-1#appointments-response-object
}
]
}
}
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/reference/appointments-1#appointments-response-object
},
"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/reference/appointments-1#appointments-response-object
},
}
}
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": {
"id": "XXgvYjHm06j85TAI1i15fU9i3vmKtFyH",
"location_id": 1000,
"appointment_id": 123456
}
}
}
form_response_insertion
{
"institution_id": 1,
"webhook_subscription_id": 1,
"delivery_errors": [],
"resource_type": "FormResponse",
"event_name": "form_response_insertion.complete",
"event_time": "2024-05-10T18:02:51.362Z",
"data": {
"formresponse": {
// See Patient Documents response obect for field definitions
// https://docs.nexhealth.com/reference/patient-documents#patient-documents-response
}
}
}
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/reference/patients-1#patients-response
]
}
}
patient_updated
The following fields can trigger appointment_update events:
email
first_name
middle_name
last_name
bio
inactive
guarantor_id
address
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/reference/patients-1#patients-response
},
"previous_attributes": {
"inactive": true
}
}
}
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/reference/procedures#procedures-response
]
}
}
}
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/reference/procedures#procedures-response
},
"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/reference/sync-status#sync-status-response
}
}
}
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
}