Ordering your first test
Place your first sandbox order in a few minutes: browse the catalog, order a test kit, and watch the fulfilment webhooks arrive.
Prerequisites: Vantage sandbox credentials and a configured webhook endpoint (Account setup and authentication). All examples below run against the sandbox.
Key terminology (full detail in Core concepts), with a consumer-electronics analogy:
Product type: the broadest category of offering (e.g. iPhone, MacBook, iPad)Product: individual products within each type (e.g. iPhone 17 Pro, iPhone 16 Pro Max)Product variant: the specific configuration an end user receives (e.g. iPhone 17 White 256GB) - this is what you order
1. Explore product types
curl 'https://vantage-sandbox.tryterra.co/api/v1/products' \
-u 'YOUR_DEV_ID:YOUR_API_KEY'import requests
url = "https://vantage-sandbox.tryterra.co/api/v1/products"
response = requests.get(url, auth=("YOUR_DEV_ID", "YOUR_API_KEY"))
print(response.text)package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://vantage-sandbox.tryterra.co/api/v1/products"
req, _ := http.NewRequest("GET", url, nil)
req.SetBasicAuth("YOUR_DEV_ID", "YOUR_API_KEY")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}[
{
"id": 1,
"name": "Blood Test",
"description": "Diagnostic blood panels and biomarker tests"
}
]2. Explore products within a product type
Suppose we want a blood test. 1 is the product type ID from the response above:
3. Explore product variants
Now let's choose the exact blood test to order. 10002 is the product ID from the response above:
Check available_collection_types before offering a collection method to a user - not every variant supports both.
4. Order a test kit
Let's order one "Inflammation" kit (variant_id 100041) as an AT_HOME order:
An order needs: your own
client_order_reference_id, acollection_type, the recipient, an address, and the items (variant_id+quantity).AT_HOMEorders take ashipping_address;GO_TO_LABorders take arequested_lab_addressinstead - see Test Collection Methods.Prices are integer cents;
currencyis ISO 4217 numeric (840= USD).
IDs in order responses and webhooks (order_id, order_item_id, recipient_id, test_taker_id) are JSON strings - store them as strings. See Core concepts.
Ordering a variant that does not exist returns a 404 problem-detail response; ordering a product you have disabled in your catalog returns 403. See Errors.
5. Watch the fulfilment webhooks arrive
As the order progresses, order.status_changed webhooks land on your configured endpoint (in sandbox too). For example, once delivery details are available:
Verify the signature on every webhook you receive - see Webhooks.
6. Next: get results
In production you would now wait for the physical kit to reach your user. In sandbox, continue to Working with Sandbox to simulate the rest of the journey - kit activation, lab processing, and results - and to fetch and acknowledge the result.
Last updated
Was this helpful?