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

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

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.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)

order.created

Order

Order has been created

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 has results

test.validation_success

Test

Test validation success

test.validation_fail

Test

Test validation fail

Webhook Notification Object

A notification object contains the following fields:

Attribute

Type

Description

eventType

string

Configurable name of event

version

string

Version of event

Example notification object

{
  "eventType": "ORDER.CREATED",
  "version": "v1",
  "userId" : "a86dr8yl",
  "productCode": "AS92731331"
}