Lab Testing - Tests
Create a Test
POST
/v3/lab_tests
x-vital-api-key*
from vital import Client
client = Client(api_key, "sandbox")
data = client.LabTests.create_test(
name="Lipids Panel",
description="Cholesterol test",
lab_id=5,
method="testkit",
sample_type="dried_blood_spot",
markers=[160]
)
{
"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": ""
}
]
}
}
Body
application/json
descriptionrequired
string
fasting
Default: falseboolean
lab_idrequired
integer
marker_idsrequired
integer[]
methodrequired
enum<string>
The method used to perform a lab test.
Available options:
testkit
, walk_in_test
, at_home_phlebotomy
namerequired
string
sample_typerequired
enum<string>
The type of sample used to perform a lab test.
Available options:
dried_blood_spot
, serum
, saliva
, urine
Response
200 - application/json
fasting
Default: falseboolean
Defines whether a lab test requires fasting. Only available for Labcorp.
idrequired
string
is_activerequired
boolean
is_delegated
Default: falseboolean
Denotes whether a lab test requires using non-Vital physician networks. If it does then it's delegated - no otherwise.
lab
object
markers
object[]
methodrequired
enum<string>
The method used to perform a lab test.
Available options:
testkit
, walk_in_test
, at_home_phlebotomy
namerequired
string
pricerequired
number
sample_typerequired
enum<string>
The type of sample used to perform a lab test.
Available options:
dried_blood_spot
, serum
, saliva
, urine
slugrequired
string
from vital import Client
client = Client(api_key, "sandbox")
data = client.LabTests.create_test(
name="Lipids Panel",
description="Cholesterol test",
lab_id=5,
method="testkit",
sample_type="dried_blood_spot",
markers=[160]
)
{
"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": ""
}
]
}
}