Order
An order is created when you want to send a test to a patient. You will mostly use this if selling test kits online
Order model
The Order model contains all the information about the Order.
Properties
- Name
id
- Type
- string
- Description
Unique identifier for the Order.
- Name
test_registrations
- Type
- object
- Description
List of Test Registrations created for the order
- Name
id
- Type
- string
- Description
Unique identifier for the Test Registration.
- Name
trf_code
- Type
- string
- Description
String patient uses to register the Test Registration.
- Name
product
- Type
- object
- Description
List of products relating to this test registration
- Name
id
- Type
- string
- Description
Unique identifier for the Product.
- Name
sku
- Type
- string
- Description
Unique SKU for the Product.
- Name
biomarkers
- Type
- array
- Description
Array of Biomarker IDs tested for each product
Create new Order
This endpoint allows you to create a new test registraion. You will need to have had created a patient previously and have the ID to use
Attributes
- Name
address
- Type
- object
- Required
- REQUIRED
- Description
Address to ship order to
- Name
shipping_id
- Type
- string
- Required
- REQUIRED
- Description
Shipping ID of method to fulfil order, can be postal, appointment or at home phlebotomy
- Name
customer
- Type
- object
- Required
- REQUIRED
- Description
Customer Object
- Name
items
- Type
- object
- Required
- REQUIRED
- Description
List of test kits to order
Returns
Returns the Order object if successful.
Request
curl --location 'https://api.londonmedicallaboratory.com/api/order/' \
--header 'Content-Type: text/plain' \
--header 'Authorization: Bearer {token}' \
--data-raw '{
"address": {
"line1": "1 Test Street",
"line2": "Test",
"line3": "",
"city": "City",
"postal_code": "AB1 2CD",
"country_code": "GB"
},
"shipping_id": "01850546-fd63-410a-a7f4-be34511516a7",
"customer": {
"email": "test@example.com",
"first_name": "Test",
"last_name": "Patient",
"phone_number": "07429123123"
},
"items": [
{
"product_sku": "AL2",
"quantity": 1
}
]
}'
Response
{
"id": "4d5c36b5-d1dc-4226-8914-6278037dd676",
"test_registrations": [
{
"id": "a68157a6-3ceb-4e1c-bff2-c53b08e62741",
"trf_code": "kbaeqgp",
"product": {
"id": "41589838-ee4f-4da0-8423-d7b466f8a6f2",
"sku": "AL2",
"biomarkers": [
"a40cfaee-940a-4bdc-b821-c798e2ca9045"
]
}
}
]
}