POST
/
v3
/
lab_tests
from vital.client import Vital
from vital.environment import VitalEnvironment
from vital.types.lab_test_collection_method import LabTestCollectionMethod
from vital.types.lab_test_sample_type import LabTestSampleType
from vital.types.us_address import UsAddress


client = Vital(
  api_key="YOUR_API_KEY",
  environment=VitalEnvironment.SANDBOX
)

data = client.lab_tests.create(
    provider_ids=["000110"], 
    name="<name>", 
    method=LabTestCollectionMethod.TESTKIT, 
    description="<description>"
)
{
  "lab_test": {
    "name": "Lipids Panel",
    "description": "Cholesterol test",
    "sample_type": "dried blood spot",
    "method": "testkit",
    "price": 10.0,
    "is_active": false,
    "fasting": false,
    "lab": {
      "slug": "USSL",
      "name": "US Specialty Lab",
      "first_line_address": "123 Main St",
      "city": "New York",
      "zipcode": "10001"
    },
    "markers": [
      {
        "name": "Thyroid Stimulating Hormone",
        "slug": "tsh",
        "description": ""
      }
    ]
  }
}
from vital.client import Vital
from vital.environment import VitalEnvironment
from vital.types.lab_test_collection_method import LabTestCollectionMethod
from vital.types.lab_test_sample_type import LabTestSampleType
from vital.types.us_address import UsAddress


client = Vital(
  api_key="YOUR_API_KEY",
  environment=VitalEnvironment.SANDBOX
)

data = client.lab_tests.create(
    provider_ids=["000110"], 
    name="<name>", 
    method=LabTestCollectionMethod.TESTKIT, 
    description="<description>"
)
{
  "lab_test": {
    "name": "Lipids Panel",
    "description": "Cholesterol test",
    "sample_type": "dried blood spot",
    "method": "testkit",
    "price": 10.0,
    "is_active": false,
    "fasting": false,
    "lab": {
      "slug": "USSL",
      "name": "US Specialty Lab",
      "first_line_address": "123 Main St",
      "city": "New York",
      "zipcode": "10001"
    },
    "markers": [
      {
        "name": "Thyroid Stimulating Hormone",
        "slug": "tsh",
        "description": ""
      }
    ]
  }
}

Authorizations

x-vital-api-key
string
header
required

Vital Team API Key

Body

application/json
name
string
required
method
enum<string>
required

The method used to perform a lab test.

Available options:
testkit,
walk_in_test,
at_home_phlebotomy
description
string
required
marker_ids
integer[] | null
provider_ids
string[] | null
fasting
boolean | null
default:
false

Response

200
application/json
Successful Response
id
string
required
slug
string
required
name
string
required
sample_type
enum<string>
required
Available options:
dried_blood_spot,
arm_collector,
serum,
saliva,
urine
method
enum<string>
required
Available options:
testkit,
walk_in_test,
at_home_phlebotomy
price
number
required
is_active
boolean
required

Deprecated. Use status instead.

status
enum<string>
required
Available options:
active,
pending_approval,
inactive
lab
object | null
required
markers
object[] | null
required
fasting
boolean
default:
false

Defines whether a lab test requires fasting.

is_delegated
boolean
default:
false

Denotes whether a lab test requires using non-Vital physician networks. If it does then it's delegated - no otherwise.

auto_generated
boolean
default:
false

Whether the lab test was auto-generated by Vital