Orders
Authenticate with your Terra API credentials: username = your Terra
dev-id, password = your Terra API key — the same credentials used for
every other Terra API. The header pair dev-id + x-api-key is also
accepted. Suspended credentials receive 403; accounts without the
Vantage entitlement receive 403 once entitlement enforcement is
enabled.
25order_id from the previous page's next_cursor
333410942627700736Only orders created at/after this RFC3339 timestamp.
true = only delivered/completed orders with at least one item whose results aren't in yet (the overview's "missing results" set).
falseFilter by order status string (e.g. order.processing)
One page of orders
Pass as ?cursor= for the next page; absent on the last page.
333410942627700736Invalid pagination or filter parameters
Missing or invalid credentials
Internal server error
GET /api/v1/orders HTTP/1.1
Host: vantage.tryterra.co
Authorization: Basic username:password
Accept: */*
{
"orders": [
{
"order_id": "333410942627700736",
"client_order_reference_id": "ORDER-2024-001",
"created_at": "2026-01-01T00:00:00.000Z",
"collection_type": "AT_HOME",
"order_status": "order.payment_processing",
"total_cents": 5540,
"currency": 840,
"items": [
{
"order_item_id": "333410942627700737",
"variant_id": "100011",
"product_name": "General Health",
"item_status": 1,
"results_status": "results.awaiting_sample",
"test_taker_id": "333410942627700738"
}
]
}
],
"next_cursor": "333410942627700736"
}Authenticate with your Terra API credentials: username = your Terra
dev-id, password = your Terra API key — the same credentials used for
every other Terra API. The header pair dev-id + x-api-key is also
accepted. Suspended credentials receive 403; accounts without the
Vantage entitlement receive 403 once entitlement enforcement is
enabled.
Optional Stripe-style idempotency key. Replaying the same key with the same request body returns the original order without creating or charging again; the same key with a different body returns 409.
a1b2c3d4-order-2024-001Request body for creating a new diagnostic test order
Your unique order identifier that you generate, used for tracking and reconciliation. Not deduplicated server-side — retrying a create with the same value produces a second order.
ORDER-2024-001Determines the required address field — shipping_address for AT_HOME, requested_lab_address for GO_TO_LAB.
Order created successfully
Response containing the created order details including tracking information
2025-11-20123456789Current fulfilment status in the REST order.* vocabulary. New orders start at order.payment_processing.
order.payment_processing987654321TRK123456789GBBad request - invalid JSON or validation errors
Payment authorization failed. Nothing was created — no supplier order and no charge. Retry after resolving the payment method.
A requested product is not enabled in your catalog
The Idempotency-Key was already used with a different request body, or a request with this key is still in progress.
Internal server error
POST /api/v1/orders HTTP/1.1
Host: vantage.tryterra.co
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 820
{
"client_order_reference_id": "ORDER-2024-001",
"collection_type": "AT_HOME",
"items": [
{
"quantity": 1,
"variant_id": "555666777"
}
],
"recipient": {
"date_of_birth": "1990-05-15",
"email": "[email protected]",
"first_name": "Sarah",
"gender_at_birth": "female",
"id": "123456789",
"last_name": "Johnson",
"phone_number": "+447911123456"
},
"requested_lab_address": {
"address_line_1": "123 Baker Street",
"address_line_2": "Flat 4B",
"administrative_area": "Greater London",
"city": "London",
"country_code": "GB",
"id": 987654321,
"is_validated": true,
"postal_code": "NW1 6XE"
},
"requested_lab": {
"code": "T2O",
"postal_code": "10001-6975"
},
"shipping_address": {
"address_line_1": "123 Baker Street",
"address_line_2": "Flat 4B",
"administrative_area": "Greater London",
"city": "London",
"country_code": "GB",
"id": 987654321,
"is_validated": true,
"postal_code": "NW1 6XE"
}
}{
"confirmed_lab_address": {
"address_line_1": "123 Baker Street",
"address_line_2": "Flat 4B",
"administrative_area": "Greater London",
"city": "London",
"country_code": "GB",
"id": 987654321,
"is_validated": true,
"postal_code": "NW1 6XE"
},
"confirmed_lab": {
"code": "T2O",
"name": "Quest Diagnostics - NYC-26th St",
"address": {
"address_line_1": "123 Baker Street",
"address_line_2": "Flat 4B",
"administrative_area": "Greater London",
"city": "London",
"country_code": "GB",
"id": 987654321,
"is_validated": true,
"postal_code": "NW1 6XE"
},
"phone": "212-555-0100",
"hours": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"latitude": 40.7448,
"longitude": -73.9938,
"scheduling": true
},
"estimated_delivery": "2025-11-20",
"order_id": "123456789",
"order_items": [
{
"currency": 840,
"item_status": 2,
"lab_tracking_number": "LAB987654321",
"order_id": "123456789",
"order_item_id": "987654321",
"price_per_item_cents": 9990,
"product_type_id": "1",
"test_taker_ids": [
"333410942627700738"
],
"supplier_item_id": "BXTWP00362",
"quantity": 1,
"results_status": "results.awaiting_sample",
"variant_id": "555666777"
}
],
"order_status": "order.payment_processing",
"recipient_id": "987654321",
"tracking_number": "TRK123456789GB"
}Authenticate with your Terra API credentials: username = your Terra
dev-id, password = your Terra API key — the same credentials used for
every other Terra API. The header pair dev-id + x-api-key is also
accepted. Suspended credentials receive 403; accounts without the
Vantage entitlement receive 403 once entitlement enforcement is
enabled.
Order ID
Successfully retrieved order
Full order information including items, recipient, address, and financials
terra_client_abc123ORDER-2024-001AT_HOME123456789Current fulfilment status in the REST order.* vocabulary.
order.delivery_fulfilledInvalid order ID format
Unauthorized - invalid credentials
Order not found
Internal server error
GET /api/v1/orders/{orderID} HTTP/1.1
Host: vantage.tryterra.co
Authorization: Basic username:password
Accept: */*
{
"status_history": [
{
"status": "order.processing",
"order_item_id": "333410942627700737",
"changed_at": "2026-01-01T00:00:00.000Z",
"escalation_level": "high",
"acknowledgment_due_by": "2026-01-01T00:00:00.000Z"
}
],
"client_id": "terra_client_abc123",
"client_order_reference_id": "ORDER-2024-001",
"collection_type": "AT_HOME",
"confirmed_lab_address": {
"address_line_1": "123 Baker Street",
"address_line_2": "Flat 4B",
"administrative_area": "Greater London",
"city": "London",
"country_code": "GB",
"id": 987654321,
"is_validated": true,
"postal_code": "NW1 6XE"
},
"items": [
{
"currency": 840,
"item_status": 2,
"lab_tracking_number": "LAB987654321",
"order_id": "123456789",
"order_item_id": "987654321",
"price_per_item_cents": 9990,
"product_type_id": "1",
"test_taker_ids": [
"333410942627700738"
],
"supplier_item_id": "BXTWP00362",
"quantity": 1,
"results_status": "results.awaiting_sample",
"variant_id": "555666777"
}
],
"order_financials": {
"currency": 840,
"discount_cents": 500,
"total_cents": 10400
},
"order_id": "123456789",
"order_status": "order.delivery_fulfilled",
"recipient": {
"date_of_birth": "1990-05-15",
"email": "[email protected]",
"first_name": "Sarah",
"gender_at_birth": "female",
"id": "123456789",
"last_name": "Johnson",
"phone_number": "+447911123456"
},
"requested_lab_address": {
"address_line_1": "123 Baker Street",
"address_line_2": "Flat 4B",
"administrative_area": "Greater London",
"city": "London",
"country_code": "GB",
"id": 987654321,
"is_validated": true,
"postal_code": "NW1 6XE"
},
"confirmed_lab": {
"code": "T2O",
"name": "Quest Diagnostics - NYC-26th St",
"address": {
"address_line_1": "123 Baker Street",
"address_line_2": "Flat 4B",
"administrative_area": "Greater London",
"city": "London",
"country_code": "GB",
"id": 987654321,
"is_validated": true,
"postal_code": "NW1 6XE"
},
"phone": "212-555-0100",
"hours": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"latitude": 40.7448,
"longitude": -73.9938,
"scheduling": true
},
"requested_lab": {
"code": "T2O",
"postal_code": "10001-6975"
},
"shipping_address": {
"address_line_1": "123 Baker Street",
"address_line_2": "Flat 4B",
"administrative_area": "Greater London",
"city": "London",
"country_code": "GB",
"id": 987654321,
"is_validated": true,
"postal_code": "NW1 6XE"
}
}Authenticate with your Terra API credentials: username = your Terra
dev-id, password = your Terra API key — the same credentials used for
every other Terra API. The header pair dev-id + x-api-key is also
accepted. Suspended credentials receive 403; accounts without the
Vantage entitlement receive 403 once entitlement enforcement is
enabled.
333410942627700736Lifecycle event to apply.
Narrow a results event to one order item.
333410942627700737Event applied
333410942627700736delivery_fulfilledInvalid order id, request body, order_item_id, or event
Not available in the production environment
Order (or order item) not found
Event is not a valid transition from the current status
Internal server error
POST /api/v1/orders/{orderID}/simulate HTTP/1.1
Host: vantage.tryterra.co
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 65
{
"event": "payment_complete",
"order_item_id": "333410942627700737"
}{
"order_id": "333410942627700736",
"applied_event": "delivery_fulfilled"
}Last updated
Was this helpful?