- Home
- Wearables
- Lab Testing
- API Reference
- Event Catalog
- Changelog
Users
Introspection
Orders
At-home Phlebotomy
Tests
Results
Health Insurance
Sleep
Meal
Workouts
Profile
Activity
Body
Vitals
Body
Activity
Wellness
Nutrition
Core
Lab Testing
Summary Data
Timeseries Data
Create Order
POST create new order
API key based authentication
Schema for the create Order endpoint.
Schedule an Order to be processed in a future date.
Textual description of what are the physician assessments and testing plans.
An image of the back of the patient insurance card.
Diagnosis codes for insurance billing.
An image of the front of the patient insurance card.
Insurance unique number assigned to a patient, usually present on the insurance card.
An image of the patient signature for health insurance billing.
Unique identifier representing a specific Health Insurance.
Responsible details when the value of responsible_relationship is not 'Self'.
Relationship between the patient and the insurance contractor. Values can be (Self, Spouse, Other Relationship).
Textual description of what are the patient symptoms and attempted treatments.
An enumeration.
An image of the physician signature for health insurance billing
Defines whether order is priority or not. For some labs, this refers to a STAT order.
from vital.client import Vital
from vital.environment import VitalEnvironment
from vital.types.gender import Gender
from vital.types.patient_address_compatible import PatientAddressCompatible
from vital.types.patient_details import PatientDetails
from datetime import datetime
client = Vital(
api_key="YOUR_API_KEY",
environment=VitalEnvironment.SANDBOX
)
data = client.lab_tests.create_order(
user_id="63661a2b-2bb3-4125-bb1a-b590f64f057f",
lab_test_id="5b41f610-ebc5-4803-8f0c-a61c3bdc7faf",
patient_details=PatientDetails(
first_name="John",
last_name="Doe",
dob=datetime.fromisoformat("2020-01-01"),
gender=Gender.MALE,
phone_number="+1123456789",
email="email@email.com"
),
patient_address=PatientAddressCompatible(
receiver_name="john Doe",
first_line="123 Main St.",
second_line="Apt. 208",
city="San Francisco",
state="CA",
zip="91189",
country="US",
phone_number="+1123456789"
),
)
{
"order": {
"id": "ea7eae96-2c25-404f-b043-bfc08584610d",
"team_id": "c26a9cc7-cdff-4f23-a5f6-74d40088c16a",
"user_id": "63661a2b-2bb3-4125-bb1a-b590f64f057f",
"patient_details": {
"dob": "2020-01-01",
"gender": "male"
},
"patient_address": {
"receiver_name": "John Doe",
"first_line": "123 Main St.",
"second_line": "Apt. 208",
"city": "San Francisco",
"state": "CA",
"zip": "91189",
"country": "United States",
"phone_number": "+1123456789"
},
"priority": false,
"health_insurance_id": "33ec11aa-d8bf-4f46-950d-c9171be3c22f",
"details": {
"type": "testkit",
"data": {
"id": "a655f0e4-6405-4a1d-80b7-66f06c2108a7",
"shipment": {
"id": "d55210cc-3d9f-4115-8262-5013f700c7be",
"outbound_tracking_number": "<outbound_tracking_number>",
"outbound_tracking_url": "<outbound_tracking_url>",
"inbound_tracking_number": "<inbound_tracking_number>",
"inbound_tracking_url": "<inbound_tracking_url>",
"outbound_courier": "usps",
"inbound_courier": "usps",
"notes": "<notes>",
"created_at": "2020-01-01T00:00:00.000Z",
"updated_at": "2020-01-01T00:00:00.000Z"
},
"created_at": "2020-01-01T00:00:00Z",
"updated_at": "2020-01-01T00:00:00Z"
}
},
"lab_test": {
"name": "Lipids Panel",
"description": "Cholesterol test",
"method": "testkit"
},
"sample_id": "123456789",
"notes": "This is a note",
"created_at": "2020-01-01T00:00:00Z",
"updated_at": "2020-01-01T00:00:00Z",
"status": "collecting_sample",
"events": [
{
"id": 1,
"created_at": "2022-01-01T00:00:00Z",
"status": "received.testkit.ordered"
},
{
"id": 2,
"created_at": "2022-01-02T00:00:00Z",
"status": "received.testkit.requisition_created"
},
{
"id": 3,
"created_at": "2022-01-03T00:00:00Z",
"status": "collecting_sample.testkit.transit_customer"
}
]
},
"status": "string",
"message": "string"
}
Authorizations
API key based authentication
Body
Schedule an Order to be processed in a future date.
An enumeration.
terms-of-use
, telehealth-informed-consent
, mobile-terms-and-conditions
, notice-of-privacy-practices
, privacy-policy
, hipaa-authorization
Textual description of what are the physician assessments and testing plans.
An image of the back of the patient insurance card.
Option 1
Option 2
image/jpeg
Diagnosis codes for insurance billing.
An image of the front of the patient insurance card.
Option 1
Option 2
image/jpeg
Insurance unique number assigned to a patient, usually present on the insurance card.
An image of the patient signature for health insurance billing.
Option 1
Option 2
image/jpeg
Unique identifier representing a specific Health Insurance.
Responsible details when the value of responsible_relationship is not 'Self'.
Relationship between the patient and the insurance contractor. Values can be (Self, Spouse, Other Relationship).
Self
, Spouse
, Other Relationship
Textual description of what are the patient symptoms and attempted treatments.
An enumeration.
female
, male
, other
, unknown
An image of the physician signature for health insurance billing
Option 1
Option 2
image/jpeg
Defines whether order is priority or not. For some labs, this refers to a STAT order.
Response
Schedule an Order to be processed in a future date.
When your order was created
Option 1
Option 2
Option 3
Schema for a walk-in test order in the client facing API.
To be used as part of a ClientFacingOrder.
The Vital walk-in test Order ID
walk_in_test
An enumeration.
received.walk_in_test.ordered
, received.walk_in_test.requisition_created
, completed.walk_in_test.completed
, sample_with_lab.walk_in_test.partial_results
, failed.walk_in_test.sample_error
, cancelled.walk_in_test.cancelled
, received.at_home_phlebotomy.ordered
, received.at_home_phlebotomy.requisition_created
, collecting_sample.at_home_phlebotomy.appointment_pending
, collecting_sample.at_home_phlebotomy.appointment_scheduled
, collecting_sample.at_home_phlebotomy.draw_completed
, collecting_sample.at_home_phlebotomy.appointment_cancelled
, completed.at_home_phlebotomy.completed
, sample_with_lab.at_home_phlebotomy.partial_results
, cancelled.at_home_phlebotomy.cancelled
, failed.at_home_phlebotomy.sample_error
, received.testkit.ordered
, received.testkit.awaiting_registration
, received.testkit.requisition_created
, received.testkit.registered
, collecting_sample.testkit.transit_customer
, collecting_sample.testkit.out_for_delivery
, collecting_sample.testkit.with_customer
, collecting_sample.testkit.transit_lab
, sample_with_lab.testkit.delivered_to_lab
, completed.testkit.completed
, failed.testkit.failure_to_deliver_to_customer
, failed.testkit.failure_to_deliver_to_lab
, failed.testkit.sample_error
, failed.testkit.lost
, cancelled.testkit.cancelled
, cancelled.testkit.do_not_process
Vital ID of the health insurance.
The Vital Order ID
The Vital Test associated with the order
Defines whether a lab test requires fasting.
Deprecated. Use status instead.
Denotes whether a lab test requires using non-Vital physician networks. If it does then it's delegated - no otherwise.
testkit
, walk_in_test
, at_home_phlebotomy
dried_blood_spot
, serum
, saliva
, urine
An enumeration.
biomarker
, panel
The method used to perform a lab test.
testkit
, walk_in_test
, at_home_phlebotomy
The type of sample used to perform a lab test.
dried_blood_spot
, serum
, saliva
, urine
An enumeration.
active
, pending_approval
, inactive
Notes associated with the order
Patient Address
Patient Details
Defines whether order is priority or not. For some labs, this refers to a STAT order.
DEPRECATED. Requistion form url.
Sample ID
Shipping Details. For unregistered testkit orders.
An enumeration.
received
, collecting_sample
, sample_with_lab
, completed
, cancelled
, failed
Your team id.
When your order was last updated.
User id returned by vital create user request. This id should be stored in your database against the user and used for all interactions with the vital api.
from vital.client import Vital
from vital.environment import VitalEnvironment
from vital.types.gender import Gender
from vital.types.patient_address_compatible import PatientAddressCompatible
from vital.types.patient_details import PatientDetails
from datetime import datetime
client = Vital(
api_key="YOUR_API_KEY",
environment=VitalEnvironment.SANDBOX
)
data = client.lab_tests.create_order(
user_id="63661a2b-2bb3-4125-bb1a-b590f64f057f",
lab_test_id="5b41f610-ebc5-4803-8f0c-a61c3bdc7faf",
patient_details=PatientDetails(
first_name="John",
last_name="Doe",
dob=datetime.fromisoformat("2020-01-01"),
gender=Gender.MALE,
phone_number="+1123456789",
email="email@email.com"
),
patient_address=PatientAddressCompatible(
receiver_name="john Doe",
first_line="123 Main St.",
second_line="Apt. 208",
city="San Francisco",
state="CA",
zip="91189",
country="US",
phone_number="+1123456789"
),
)
{
"order": {
"id": "ea7eae96-2c25-404f-b043-bfc08584610d",
"team_id": "c26a9cc7-cdff-4f23-a5f6-74d40088c16a",
"user_id": "63661a2b-2bb3-4125-bb1a-b590f64f057f",
"patient_details": {
"dob": "2020-01-01",
"gender": "male"
},
"patient_address": {
"receiver_name": "John Doe",
"first_line": "123 Main St.",
"second_line": "Apt. 208",
"city": "San Francisco",
"state": "CA",
"zip": "91189",
"country": "United States",
"phone_number": "+1123456789"
},
"priority": false,
"health_insurance_id": "33ec11aa-d8bf-4f46-950d-c9171be3c22f",
"details": {
"type": "testkit",
"data": {
"id": "a655f0e4-6405-4a1d-80b7-66f06c2108a7",
"shipment": {
"id": "d55210cc-3d9f-4115-8262-5013f700c7be",
"outbound_tracking_number": "<outbound_tracking_number>",
"outbound_tracking_url": "<outbound_tracking_url>",
"inbound_tracking_number": "<inbound_tracking_number>",
"inbound_tracking_url": "<inbound_tracking_url>",
"outbound_courier": "usps",
"inbound_courier": "usps",
"notes": "<notes>",
"created_at": "2020-01-01T00:00:00.000Z",
"updated_at": "2020-01-01T00:00:00.000Z"
},
"created_at": "2020-01-01T00:00:00Z",
"updated_at": "2020-01-01T00:00:00Z"
}
},
"lab_test": {
"name": "Lipids Panel",
"description": "Cholesterol test",
"method": "testkit"
},
"sample_id": "123456789",
"notes": "This is a note",
"created_at": "2020-01-01T00:00:00Z",
"updated_at": "2020-01-01T00:00:00Z",
"status": "collecting_sample",
"events": [
{
"id": 1,
"created_at": "2022-01-01T00:00:00Z",
"status": "received.testkit.ordered"
},
{
"id": 2,
"created_at": "2022-01-02T00:00:00Z",
"status": "received.testkit.requisition_created"
},
{
"id": 3,
"created_at": "2022-01-03T00:00:00Z",
"status": "collecting_sample.testkit.transit_customer"
}
]
},
"status": "string",
"message": "string"
}