Test Collection Methods
AT_HOME vs GO_TO_LAB orders: which address fields each requires, how lab routing works, and how to find nearby lab draw sites.
Last updated
Was this helpful?
Was this helpful?
{
"detail": "This test isn't available in the provided country. Supported country codes: GB.",
"status": 400,
"invalid_fields": [
{
"field": "shipping_address.country_code",
"message": "must be one of: GB",
"tag": "unsupported_ship_to_country",
"value": "US"
}
],
"supported_ship_to_countries": ["GB"]
}{
"client_order_reference_id": "TEST-ORDER-001",
"collection_type": "AT_HOME",
"recipient": {
"first_name": "John",
"last_name": "Tan",
"email": "[email protected]",
"phone_number": "+447436503302",
"date_of_birth": "1995-10-10",
"gender_at_birth": "male"
},
"shipping_address": {
"address_line_1": "123 High Street",
"city": "London",
"administrative_area": "England",
"country_code": "GB",
"postal_code": "SW1A 1AA"
},
"items": [
{
"variant_id": "100011",
"quantity": 1
}
]
}{
"order_id": "256488482397134848",
"recipient_id": "256488482397134849",
"order_items": [
{
"order_id": "256488482397134848",
"order_item_id": "256488482397134851",
"variant_id": "100011",
"product_type_id": "1",
"price_per_item_cents": 3999,
"quantity": 1,
"currency": 826,
"results_status": "results.awaiting_sample"
}
],
"order_status": "order.payment_processing"
}{
"client_order_reference_id": "TEST-ORDER-002",
"collection_type": "GO_TO_LAB",
"recipient": {
"first_name": "Jane",
"last_name": "Doe",
"email": "[email protected]",
"phone_number": "+12125550100",
"date_of_birth": "1990-05-15",
"gender_at_birth": "female"
},
"requested_lab_address": {
"address_line_1": "350 5th Avenue",
"city": "New York",
"administrative_area": "NY",
"country_code": "US",
"postal_code": "10118"
},
"items": [
{
"variant_id": "100011",
"quantity": 1
}
]
}{
"order_id": "256488482397134852",
"recipient_id": "256488482397134853",
"order_items": [
{
"order_id": "256488482397134852",
"order_item_id": "256488482397134855",
"variant_id": "100011",
"product_type_id": "1",
"price_per_item_cents": 3999,
"quantity": 1,
"currency": 840,
"results_status": "results.awaiting_sample"
}
],
"order_status": "order.payment_processing"
}curl 'https://vantage-sandbox.tryterra.co/api/v1/labs?zip_code=10001' \
-u 'YOUR_DEV_ID:YOUR_API_KEY'{
"labs": [
{
"code": "PSC12345",
"name": "Quest Diagnostics - Midtown",
"address": {
"address_line_1": "245 W 35th St",
"city": "New York",
"administrative_area": "NY",
"country_code": "US",
"postal_code": "10001"
},
"phone": "+1-212-555-0100",
"hours": { "monday": "08:00-17:00" },
"latitude": 40.7549,
"longitude": -73.984,
"scheduling": true,
"distance": 0.4
}
]
}{
"collection_type": "GO_TO_LAB",
"requested_lab_address": { "...": "the user's search area" },
"requested_lab": { "code": "PSC12345", "postal_code": "10001-6975" }
}