Webhooks
Webhooks allow you to be notified on your server when certain events happen, rather than having to poll our API all the time. For more info on webhooks in general see working with webhooks
Subscribe to Webhooks and HTTP request configuration
When subscribing to a webhook, the following can be configured:
- URL: the URL the webhook notification will be sent to
- HTTP HEADERS: Additional custom headers to be sent as part of the HTTP request (this can be used to perform authentication)
Configuring
You can configure webhooks through the partner portal under the developer section.
Retries
Failed notifications are retried up to a maximum of 30
times.
The backoff delay is 5000
milliseconds multiplied by the number of retries.
Objects
Webhooks are available for the following Objects and Events:
Orders
Webhooks fire as a customer order transitions through each order state (dispatched, delivered, etc.)
Event Name | Description | eventType |
---|---|---|
Order created | Order has been created | ORDER.CREATED |
Order dispatched | Order has been dispatched | ORDER.DISPATCHED |
Order out for delivery | Order is out for delivery (Note: this is subject to shipping method) | ORDER.OUT_FOR_DELIVERY |
Order delivered | Order delivered to customer (Note: this is subject to shipping method) | ORDER.RECEIVED |
Order return out for delivery | Order has been returned by customer and is out for delivery to lab (Note: this is subject to shipping method) | ORDER.RETURN_OUT_FOR_DELIVERY |
Order return delivery | Order delivered from customer to lab (Note: this is subject to shipping method) | ORDER.RETURN_RECEIVED |
Phlebotomy
Webhooks fire as a customer phlebotomy order transitions through each state (nurse assigned, appointment scheduled, etc.)
Event Name | Description | eventType |
---|---|---|
Nurse assigned | Nurse has been assigned (Mobile Phlebotomy Only) | PHLEBOTOMY.NURSE_ASSIGNED |
Appointment scheduled | Appointment has been scheduled | PHLEBOTOMY.APPOINTMENT_SCHEDULED |
Appointment rescheduled | Appointment has been rescheduled | PHLEBOTOMY.APPOINTMENT_RESCHEDULED |
Appointment cancelled | Appointment has been cancelled | PHLEBOTOMY.APPOINTMENT_CANCELLED |
Appointment completed | Appointment has been completed | PHLEBOTOMY.APPOINTMENT_COMPLETED |
Tests
Webhooks fire as a customer test transitions through the each testing state (registered, received by the lab, resulted, etc.)
Event Name | Description | eventType |
---|---|---|
Test registered | Test has been registered by patient | TEST.REGISTERED |
Test received at lab | Test has been received by the lab | TEST.LAB_ACCESSIONED |
Test results ready | Lab test results are ready | TEST.PROCESSED |
Test commentary uploaded | A clinical commentary has been uploaded | TEST.CLINICAL_COMMENTARY_UPLOADED |
Full webhook event schemas
View event schemas for the full details of each webhook.
Improving security
Check out Security section for more details on how to keep your implementation secure.
Updated 7 months ago