Home Phlebotomy
Order a test and book a phlebotomist to visit the patient at home and take the blood sample, in a single request.
home_phlebotomy object to POST /api/order/ and the visit is booked with our phlebotomy provider, who then contacts the patient. Orders without it work exactly as before.
1 Find the at-home shipping method
List the shipping methods for the product and pick the one with type: "at_home_phlebotomist". Its id is the order's shipping_id. If it is not in the list, the product cannot be taken at home.
/api/product/{id}/shipping
Example response (truncated)
{
"items": [
{
"id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"type": "at_home_phlebotomist",
"name": "At Home Phlebotomy",
"description": "A phlebotomist visits you at home",
"price": {
"amount_minor": 8000,
"currency": "GBP",
"formatted_value": "80.00"
}
},
...
]
}
2 List the free visit slots
Fetch the free slots for the postcode the phlebotomist will visit. Show display_value to the patient and keep the id of the slot they choose.
/api/phlebotomy/?postal_code={postcode}
Example request
curl -X GET "https://api.londonmedicallaboratory.com/api/phlebotomy/?postal_code=SW8%204TJ" \
-H "Authorization: Bearer YOUR_API_TOKEN"
Example response
{
"nr_of_results": 2,
"current_page": 1,
"nr_of_pages": 1,
"results_per_page": 100,
"next_page": null,
"items": [
{
"id": "2b1d6f0e-6c4a-4a8e-9f3e-1d2c3b4a5e6f",
"starts_at": "2026-11-10T08:00:00+00:00",
"ends_at": "2026-11-10T10:00:00+00:00",
"display_value": "Tuesday 10 November, 08:00 - 10:00"
},
...
]
}
3 Create the order with the visit
Create the order as usual, using the at-home shipping_id, and add a home_phlebotomy object.
/api/order/
The home_phlebotomy object
| Field | Type | Description |
|---|---|---|
time_id | string | Required. The slot id from step 2. |
patient.first_name | string | Required. |
patient.last_name | string | Required. |
patient.date_of_birth | string | Required. Format YYYY-MM-DD. |
patient.phone_number | string | Required. UK number (e.g. 07911 123456) or international with a leading +. The phlebotomist uses it to contact the patient. |
patient.email | string | Required. |
patient.gender | string | Optional. male, female, non_binary or prefer_not_to_say (the default). |
patient.address | object | Optional. Where the visit happens, same shape as the order address. If left out, the order address is used. One of the two must have a postal_code, and it should be the postcode you listed slots for. |
A new patient record is created for the person being visited. home_phlebotomy cannot be combined with initial_appointment.
Example request
curl -X POST "https://api.londonmedicallaboratory.com/api/order/" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"shipping_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"address": {
"line1": "2 Pensbury Street",
"city": "London",
"postal_code": "SW8 4TJ",
"country_code": "GB"
},
"customer": {
"email": "john.smith@example.com",
"first_name": "John",
"last_name": "Smith"
},
"items": [
{"product_id": "73d1f6c9-dd60-4f78-bc10-7898d9c66d80", "quantity": 1}
],
"home_phlebotomy": {
"time_id": "2b1d6f0e-6c4a-4a8e-9f3e-1d2c3b4a5e6f",
"patient": {
"first_name": "John",
"last_name": "Smith",
"date_of_birth": "1980-05-17",
"phone_number": "07911 123456",
"email": "john.smith@example.com",
"gender": "male"
}
}
}'
The response is the usual order response, with the order id and its test registrations.
Errors
If anything is wrong, the API responds with 422 and {"error": "..."}, and nothing is booked. Common cases:
| Message | What to do |
|---|---|
home_phlebotomy.patient.<field> is required. | Send the missing patient field. |
home_phlebotomy.patient.phone_number is not a valid phone number. | Check the number. Non-UK numbers need a leading + and country code. |
'home_phlebotomy' requires an at-home phlebotomist 'shipping_id'. | Use the at_home_phlebotomist shipping method from step 1. |
home_phlebotomy needs an address with a postal code ... | Send an order address or patient.address with a postcode. |
home_phlebotomy.time_id '...' is no longer available ... | The slot was taken, or is not offered at that postcode. List slots again (step 2) and retry with a new time_id. |