For the complete documentation index, see llms.txt. This page is also available as Markdown.

Products

List all product types

get

Returns all available diagnostic test categories (e.g., Blood Tests, DNA Tests)

Authorizations
AuthorizationstringRequired

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.

Responses
200

Successfully retrieved product types

application/json
descriptionstringOptional
idinteger · int64Optional
namestringOptional
get/api/v1/products
GET /api/v1/products HTTP/1.1
Host: vantage.tryterra.co
Authorization: Basic username:password
Accept: */*
[
  {
    "description": "text",
    "id": 1,
    "name": "text"
  }
]

Set catalog selection

put

Curate which products your own catalog reads return. Full-set write: listed products become enabled, every other product disabled. With no selection saved, everything is enabled; products added to the global catalog after your last save default to enabled until you save again. Disabled products are excluded from catalog reads and cannot be ordered (403).

Authorizations
AuthorizationstringRequired

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.

Body
product_idsstring[]Required

Products to enable; everything else is disabled.

Example: 999888777
Responses
200

Selection saved

application/json
enabled_countintegerRequiredExample: 12
put/api/v1/products/selection
PUT /api/v1/products/selection HTTP/1.1
Host: vantage.tryterra.co
Authorization: Basic username:password
Content-Type: application/json
Accept: */*
Content-Length: 29

{
  "product_ids": [
    "999888777"
  ]
}
{
  "enabled_count": 12
}

Get products by type ID

get

Returns all products within a specific product type category

Authorizations
AuthorizationstringRequired

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.

Path parameters
idinteger · min: 1Required

Product Type ID

Query parameters
show_allbooleanOptional

Return the full catalog with per-product enabled flags (curation view).

Default: false
Responses
200

Successfully retrieved products. An existing product type with no available products returns an empty array.

application/json
enabledbooleanOptional

Present only on ?show_all=true — the caller's per-product curation flag.

availabilityinteger · enumOptionalPossible values:
base_price_centsinteger · int32Optional
currencyinteger · enumOptionalPossible values:
descriptionstringOptional
idinteger · int64Optional
namestringOptional
product_type_idinteger · int64Optional
get/api/v1/products/{id}
GET /api/v1/products/{id} HTTP/1.1
Host: vantage.tryterra.co
Authorization: Basic username:password
Accept: */*
[
  {
    "enabled": true,
    "availability": 0,
    "base_price_cents": 1,
    "currency": 0,
    "description": "text",
    "id": 1,
    "images": [
      {
        "alt_text": "text",
        "display_order": 1,
        "height": 1,
        "id": 1,
        "product_id": 1,
        "url": "text",
        "variant_id": 1,
        "width": 1
      }
    ],
    "model_descriptive_attrs": {
      "ANY_ADDITIONAL_PROPERTY": "text"
    },
    "name": "text",
    "product_type_id": 1,
    "variants": [
      {
        "available_collection_types": [
          "text"
        ],
        "supported_ship_to_countries": [
          "GB"
        ],
        "currency": 1,
        "descriptive_attrs_override": {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        },
        "id": 1,
        "images": [
          {
            "alt_text": "text",
            "display_order": 1,
            "height": 1,
            "id": 1,
            "product_id": 1,
            "url": "text",
            "variant_id": 1,
            "width": 1
          }
        ],
        "price_cents": 1,
        "product_id": 1,
        "product_type_id": 1,
        "variant_availability": 1,
        "variant_defining_attrs": {
          "ANY_ADDITIONAL_PROPERTY": "anything"
        },
        "variant_name": "text"
      }
    ]
  }
]

Get product variants by product ID

get

Returns all available variants/options for a specific diagnostic test product (e.g., different panel sizes, customizations)

Authorizations
AuthorizationstringRequired

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.

Path parameters
idinteger · min: 1Required

Product ID

Query parameters
show_allbooleanOptional

Include variants of catalog-disabled products (curation view). Disabled products remain non-orderable regardless.

Default: false
Responses
200

Successfully retrieved variants

application/json
available_collection_typesstring[]Optional
supported_ship_to_countriesstring[]Optional

ISO-3166 alpha-2 codes this test can be ordered in (AT_HOME shipping destination; for GO_TO_LAB, the requested lab country). Gate your address form on it - orders outside these countries are rejected with an unsupported_ship_to_country field error.

Example: ["GB"]
currencyinteger · int32Optional
idinteger · int64Optional
price_centsinteger · int32Optional
product_idinteger · int64Optional
product_type_idinteger · int64Optional
variant_availabilityinteger · int32Optional
variant_namestringOptional
get/api/v1/products/{id}/variants
GET /api/v1/products/{id}/variants HTTP/1.1
Host: vantage.tryterra.co
Authorization: Basic username:password
Accept: */*
[
  {
    "available_collection_types": [
      "text"
    ],
    "supported_ship_to_countries": [
      "GB"
    ],
    "currency": 1,
    "descriptive_attrs_override": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "id": 1,
    "images": [
      {
        "alt_text": "text",
        "display_order": 1,
        "height": 1,
        "id": 1,
        "product_id": 1,
        "url": "text",
        "variant_id": 1,
        "width": 1
      }
    ],
    "price_cents": 1,
    "product_id": 1,
    "product_type_id": 1,
    "variant_availability": 1,
    "variant_defining_attrs": {
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "variant_name": "text"
  }
]

Last updated

Was this helpful?