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 METHOD: HTTP GET and HTTP POST are supported
- HTTP HEADERS: Additional custom headers to be sent as part of the HTTP request (this can be used to perform authentication)
- REQUEST BODY: This can be used to rename properties of the JSON schema sent in the HTTP request body
Configuring
Webhooks can only be configured through your account manager currently.
Retries
Failed notifications are retried up to a maximum of 3
times.
The backoff delay is 5000
milliseconds multiplied by the number of retries.
Objects
The objects that cause webhooks to happen are:
Orders
When a customer order moves through the states (dispatched, delivered etc) these fire webhooks.
Event | Object | Description |
---|---|---|
ORDER.CREATED | Order | Order has been created |
ORDER.DISPATCHED | Order | Order has been dispatched |
ORDER.OUT_FOR_DELIVERY | Order | Order is out for delivery (Note: this is subject to shipping method) |
ORDER.RECEIVED | Order | Order has been received by the customer (Note: this is subject to shipping method) |
Tests
When a test moves through the various states this fires webhooks (registered, arrived at lab, resulted etc)
Event | Object | Description |
---|---|---|
TEST.REGISTERED | Test | Test has been registered |
TEST.LAB_ACCESSIONED | Test | Test has been received at the lab (accessioned) |
TEST.PROCESSED | Test | Test results are ready |
TEST.CLINICAL_COMMENTARY_UPLOADED | Test | A clinical commentary has been uploaded |
Full webhook event schemas
View event schemas for the full details of each webhook.
Updated about 2 months ago