Event schemas

This page describes the JSON schemas for webhook events that are available relating to orders, phlebotomy and tests.

Orders

{
  "eventType": "ORDER.CREATED",
  "version": "1",
  "email": "[email protected]",
  "orderNumber": "XXXX",
  "productCode": "XXXX",
  "shippingAddress": "1st line of address with city, country and post/zip code. maybe state as well"
}
{
  "eventType": "ORDER.DISPATCHED",
  "version": "1",
  "email": "[email protected]",
  "orderNumber": "XXXX",
  "productCode": "XXXX",
  "dispatchedAt": "2022-03-07T16:13:42.345Z",
  "trackingUrl": "https://example.com?trackingId=<unique parcel reference>",
  "kits": [{
      "kitId": "KKKK0000"
   }]
}
{
  "eventType": "ORDER.OUT_FOR_DELIVERY",
  "version": "1",
  "email": "[email protected]",
  "orderNumber": "XXXX",
  "productCode": "XXXX",
  "dispatchedAt": "2022-03-07T16:13:42.345Z",
  "trackingUrl": "https://example.com?trackingId=<unique parcel reference>"
}
{
  "eventType": "ORDER.RECEIVED",
  "version": "1",
  "email": "[email protected]",
  "orderNumber": "XXXX",
  "productCode": "XXXX",
  "dispatchedAt": "2022-03-07T16:13:42.345Z",
  "trackingUrl": "https://example.com?trackingId=<unique parcel reference>"
}

Phlebotomy

Please note the NURSE_ASSIGNED event is only applicable to MOBILE phlebotomy.

{
  "eventType": "PHLEBOTOMY.NURSE_ASSIGNED",
  "version": "1",
  "orderNumber": "XXXX",
  "productCode": "XXXX",
  "kitId": "KKKK0000",
  "partnerUserId": "XXXX",
  "type": "MOBILE"
}
{
  "eventType": "PHLEBOTOMY.APPOINTMENT_SCHEDULED",
  "version": "1",
  "orderNumber": "XXXX",
  "productCode": "XXXX",
  "kitId": "KKKK0000",
  "partnerUserId" : "XXXX",
  "type": "MOBILE/IN-CLINIC",
  "clinicName": "My Phlebotomy Clinic", // For in-clinic only
  "clinicAddress": "8 Lombard Road, London", // For in-clinic only
  "clinicPostcode": "SW19 3TZ", // For in-clinic only
  "scheduledDate": "2022-03-07T16:13:42.345Z"
}
{
  "eventType": "PHLEBOTOMY.APPOINTMENT_RESCHEDULED",
  "version": "1",
  "orderNumber": "XXXX",
  "productCode": "XXXX",
  "kitId": "KKKK0000",
  "partnerUserId" : "XXXX",
  "type": "MOBILE/IN-CLINIC",
  "clinicName": "My Phlebotomy Clinic", // For in-clinic only
  "clinicAddress": "8 Lombard Road, London", // For in-clinic only
  "clinicPostcode": "SW19 3TZ", // For in-clinic only
  "scheduledDate": "2022-03-07T16:13:42.345Z"
}
{
  "eventType": "PHLEBOTOMY.APPOINTMENT_CANCELLED",
  "kitId": "FRXXX",
  "orderNumber": "XXXX",
  "partnerUserId" : "XXXX",
  "productCode": "XXXX",
  "type": "MOBILE/IN-CLINIC",
  "version": "1"
}

Tests

{
  "eventType": "TEST.REGISTERED",
  "version": "1",
  "orderNumber": "XXXX",
  "productCode": "XXXX",
  "kitId": "KKKK0000",
  "partnerUserId": "620ce889de8cf1cbe9c370e11",
  "email": "[email protected]",
  "firstName": "John",
  "testTitle": "Example test"
}
{
  "eventType": "TEST.LAB_ACCESSIONED",
  "version": "1",
  "orderNumber": "XXXX",
  "productCode": "XXXX",
  "kitId": "KKKK0000",
  "partnerUserId": "620ce889de8cf1cbe9c370e11",
  "testId": "620ce889de8cf1cbe9c370e11"
}
{
  "eventType": "TEST.PROCESSED",
  "version": "1",
  "orderNumber": "XXXX",
  "productCode": "XXXX",
  "kitId": "KKKK0000",
  "partnerUserId": "620ce889de8cf1cbe9c370e11",
  "testId": "620ce889de8cf1cbe9c370e11"
}
{
  "eventType": "TEST.CLINICAL_COMMENTARY_UPLOADED",
  "version": "1",
  "orderNumber": "XXXX",
  "productCode": "XXXX",
  "kitId": "KKKK0000",
  "partnerUserId" : "XXXX",
  "testId": "620ce889de8cf1cbe9c370e11"
}