Webhook Subscriptions

Create webhook subscription (beta)

🚧 Beta

Send Nex-Api-Version: v3.1.0 to use this endpoint. It is still changing, and access is limited to approved partner institutions. Contact NexHealth before you build on it.

Changed from v3.0.0: Adds request field version; changes request fields event, resource_type; adds response 422; adds response field data.version.

This endpoint creates a webhook subscription on the given webhook endpoint; the optional version param pins the subscription to a specific API version for payload delivery, defaulting to v3.1.0 when omitted, and returns 422 if the version is unknown or does not support the subscribed event.

post/webhook_endpoints/{id}/webhook_subscriptions

Request

  • Base URL
    https://nexhealth.info
  • URL
    https://nexhealth.info/webhook_endpoints/{id}/webhook_subscriptions
  • Auth
    API key in header Authorization

Path parameters

idinteger required

Webhook Endpoint ID

Query parameters

subdomainstring required

Used to scope the request to the specified institution. For the following resources we don't require a subdomain: LocationDataReadiness, Onboarding

Headers

Nex-Api-Versionstring required

The NexHealth API version

Request body

resource_type'Adjustment' | 'AdjustmentType' | 'Appointment' | 'Charge' | 'Claim' | 'Document' | 'FeeSchedule' | 'FormResponse' | 'FormSchema' | 'Insurance' | 'LocationDataReadiness' | 'MedicalHistory' | 'Message' | 'Onboarding' | 'Patient' | 'PatientInsuranceCoverage' | 'Payment' | 'PaymentType' | 'Procedure' | 'ProcedureCode' | 'Provider' | 'SyncStatus' | 'TreatmentPlan' | 'WorkingHour' required

The resource to subscribe to

event'adjustment_created' | 'adjustment_updated' | 'adjustment_deleted' | 'adjustment_insertion' | 'adjustment_type_created' | 'adjustment_type_updated' | 'appointment_insertion' | 'appointment_created' | 'appointment_updated' | 'appointment_requested' | 'charge_created' | 'charge_updated' | 'charge_deleted' | 'claim_created' | 'claim_updated' | 'claim_deleted' | 'document_insertion' | 'fee_schedule_created' | 'fee_schedule_updated' | 'form_response_insertion' | 'form_schema_created' | 'form_schema_deleted' | 'insurance_plan_insertion' | 'insurance_coverage_insertion' | 'insurance_coverage_deleted' | 'location_data_ready' | 'medical_history_item_created' | 'medical_history_item_updated' | 'medical_history_patient_items_updated' | 'message_created' | 'message_updated' | 'onboarding_created' | 'onboarding_updated' | 'onboarding_availability_ready' | 'patient_created' | 'patient_updated' | 'patient_insertion' | 'patient_update' | 'patient_insurance_created' | 'patient_insurance_updated' | 'payment_created' | 'payment_updated' | 'payment_deleted' | 'payment_insertion' | 'payment_type_created' | 'payment_type_updated' | 'procedure_created' | 'procedure_updated' | 'procedure_code_created' | 'procedure_code_updated' | 'procedure_code_deleted' | 'provider_created' | 'provider_updated' | 'sync_status_read_change' | 'sync_status_write_change' | 'treatment_plan_created' | 'treatment_plan_updated' | 'treatment_plan_deleted' | 'working_hour_created' | 'working_hour_updated' required

A valid event type to listen to for the defined resource

activeboolean
versionstring

API version to pin this subscription to. Defaults to the version this request is made against (v3.1.0) when omitted. Webhook payloads delivered to this subscription use that version's entity contract. v3.0.0 and v20240412 are two names for the same version — either value is accepted, and the subscription is recorded under the canonical name v20240412. Returns 422 for unknown versions and for versions that do not offer the subscribed event.

Example request

{
  "resource_type": "Appointment",
  "event": "appointment_insertion",
  "active": true,
  "version": "v3.1.0"
}

Response

Successful

codeboolean

Indicates the success or failure of the request

descriptionstring

Additional context on the request to help with debugging.

errorstring[]

Any errors that occur during the execution of the request.

countinteger

Number of total objects, in case of collection.

Example response

{
  "description": "Description",
  "error": [
    "Error message"
  ],
  "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",
    "version": "v3.1.0"
  },
  "count": 2
}

Changes

No recorded changes to this operation across all 1 revision of this API.