Webhooks

Webhooks allow your application to receive real-time notifications when events occur in Halaxy. Instead of polling the API, Halaxy's webhook can push data to your endpoint during specific events, making integrations faster and more efficient.

How Webhooks Work

When an event occurs:

  1. Halaxy sends a HTTP POST request to the target URL specified.
  2. The request contains a JSON payload with information about the event.
  3. The target endpoint should respond with 200 OK, 201 OK or 202 Accepted to confirm successful communication.

Available Events

ResourceAction
PatientCreate, Update
AppointmentCreate, Update, Delete
InvoiceCreate, Update. Delete

Setting Up a Webhook

In Halaxy, navigate to Settings > Integrations> Webhooks > Create Webhook and configure the following fields:

FieldsDescription
Endpoint URLTarget URL endpoint of your application. Make sure that this can receive POST requests.
EventTrigger of the webhook. This can be creation, update, or deletion of resources in Halaxy's front-end.
Contact EmailContact email address of the webhook creator for troubleshooting reference.
Reason for SubscriptionDescription of the webhook for reference.
Authentication HeaderOptional HTTP header for URL targets that require credentials or tokens.

Webhook Payload Example

Below is a payload example for when a new appointment is created.

{
  "timestamp": "2025-12-03T01:48:04+00:00",
  "type": "history",
  "link": [],
  "entry": [
    {
      "fullUrl": "550e8400-e29b-41d4-a716-446655440000",
      "resource": {
        "subscription": {
          "reference": "https://au-api.halaxy.com/main/Subscription/d3f8a2c4-7b6e-4f9a-9e3d-8c2b1a6f4e91",
          "type": "Subscription"
        },
        "topic": {
          "reference": "https://au-api.halaxy.com/main/SubscriptionTopic/4e29e261-34df-4bc5-8b8f-1d06582dd691",
          "type": "SubscriptionTopic"
        },
        "status": "active",
        "type": "event-notification",
        "eventsSinceSubscriptionStart": "0",
        "notificationEvent": [
          {
            "eventNumber": "1",
            "timestamp": "2025-12-03T01:48:04+00:00",
            "focus": {
              "reference": "https://au-api.halaxy.com/main/Appointment/1234567890",
              "type": "Appointment"
            },
            "id": "7cb5cfeb-18cb-42e6-9f12-0cd80ceda88f"
          }
        ],
        "id": "b193bef5-3986-45eb-8cf9-00068a0a395a",
        "meta": {
          "profile": "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-status"
        },
        "resourceType": "SubscriptionStatus"
      }
    }
  ],
  "contained": [],
  "extension": [],
  "modifierExtension": [],
  "id": "56e55bc4-4a15-44a0-9f63-b4bbb535303c",
  "meta": {
    "profile": "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription-notification",
    "security": [],
    "tag": []
  },
  "resourceType": "Bundle"
}

Key Fields Explained

  • timestamp: When the event occurred.
  • notificationEvent: Array of information regarding the event triggered.
  • focus: The resource affected by the event (in this case, an Appointment).