from junction import Junction, LabTestCollectionMethod
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.lab_tests.create(
name="<name>",
method=LabTestCollectionMethod.TESTKIT,
description="<description>",
provider_ids=["000110"],
)
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.labTests.create({
name: "<name>",
method: "testkit",
description: "<description>",
providerIds: ["000110"],
});
import com.junction.api.Junction;
import com.junction.api.core.Environment;
import com.junction.api.resources.labtests.requests.CreateLabTestRequest;
import com.junction.api.types.LabTestCollectionMethod;
import java.util.List;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.labTests().create(
CreateLabTestRequest.builder()
.name("<name>")
.method(LabTestCollectionMethod.TESTKIT)
.description("<description>")
.providerIds(List.of("000110"))
.build()
);
import (
"context"
junction "github.com/junction-api/junction-go"
"github.com/junction-api/junction-go/client"
"github.com/junction-api/junction-go/option"
)
c := client.NewClient(
option.WithApiKey("YOUR_API_KEY"),
option.WithBaseURL(junction.Environments.Sandbox),
)
response, err := c.LabTests.Create(context.TODO(), &junction.CreateLabTestRequest{
Name: "<name>",
Method: junction.LabTestCollectionMethodTestkit,
Description: "<description>",
ProviderIds: []string{"000110"},
})
if err != nil {
return err
}
fmt.Printf("Received data %s\n", response)
{
"id": "2e82a1d4-e2e6-421c-9c54-2210d667ce48",
"slug": "a94e3005-labcorp-panel",
"name": "Labcorp panel",
"sample_type": "serum",
"method": "at_home_phlebotomy",
"price": 0.0,
"is_active": true,
"status": "active",
"fasting": false,
"lab": {
"id": 27,
"slug": "labcorp",
"name": "Labcorp",
"first_line_address": "labcorp address",
"city": "Lincolnshire",
"zipcode": "60069",
"collection_methods": ["at_home_phlebotomy", "walk_in_test"],
"sample_types": ["serum", "saliva", "urine"]
},
"markers": [
{
"id": 195,
"name": "Abnormal Bleeding Profile",
"slug": "abnormal-bleeding-profile",
"description": "Abnormal Bleeding Profile",
"lab_id": 27,
"provider_id": "116004",
"type": "biomarker",
"unit": null,
"price": "N/A",
"aoe": null,
"a_la_carte_enabled": true
}
],
"is_delegated": false,
"auto_generated": false
}
Create a Test
Create or submit lab tests via the Junction API. Requires authentication with your team API key.
from junction import Junction, LabTestCollectionMethod
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.lab_tests.create(
name="<name>",
method=LabTestCollectionMethod.TESTKIT,
description="<description>",
provider_ids=["000110"],
)
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.labTests.create({
name: "<name>",
method: "testkit",
description: "<description>",
providerIds: ["000110"],
});
import com.junction.api.Junction;
import com.junction.api.core.Environment;
import com.junction.api.resources.labtests.requests.CreateLabTestRequest;
import com.junction.api.types.LabTestCollectionMethod;
import java.util.List;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.labTests().create(
CreateLabTestRequest.builder()
.name("<name>")
.method(LabTestCollectionMethod.TESTKIT)
.description("<description>")
.providerIds(List.of("000110"))
.build()
);
import (
"context"
junction "github.com/junction-api/junction-go"
"github.com/junction-api/junction-go/client"
"github.com/junction-api/junction-go/option"
)
c := client.NewClient(
option.WithApiKey("YOUR_API_KEY"),
option.WithBaseURL(junction.Environments.Sandbox),
)
response, err := c.LabTests.Create(context.TODO(), &junction.CreateLabTestRequest{
Name: "<name>",
Method: junction.LabTestCollectionMethodTestkit,
Description: "<description>",
ProviderIds: []string{"000110"},
})
if err != nil {
return err
}
fmt.Printf("Received data %s\n", response)
{
"id": "2e82a1d4-e2e6-421c-9c54-2210d667ce48",
"slug": "a94e3005-labcorp-panel",
"name": "Labcorp panel",
"sample_type": "serum",
"method": "at_home_phlebotomy",
"price": 0.0,
"is_active": true,
"status": "active",
"fasting": false,
"lab": {
"id": 27,
"slug": "labcorp",
"name": "Labcorp",
"first_line_address": "labcorp address",
"city": "Lincolnshire",
"zipcode": "60069",
"collection_methods": ["at_home_phlebotomy", "walk_in_test"],
"sample_types": ["serum", "saliva", "urine"]
},
"markers": [
{
"id": 195,
"name": "Abnormal Bleeding Profile",
"slug": "abnormal-bleeding-profile",
"description": "Abnormal Bleeding Profile",
"lab_id": 27,
"provider_id": "116004",
"type": "biomarker",
"unit": null,
"price": "N/A",
"aoe": null,
"a_la_carte_enabled": true
}
],
"is_delegated": false,
"auto_generated": false
}
from junction import Junction, LabTestCollectionMethod
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.lab_tests.create(
name="<name>",
method=LabTestCollectionMethod.TESTKIT,
description="<description>",
provider_ids=["000110"],
)
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.labTests.create({
name: "<name>",
method: "testkit",
description: "<description>",
providerIds: ["000110"],
});
import com.junction.api.Junction;
import com.junction.api.core.Environment;
import com.junction.api.resources.labtests.requests.CreateLabTestRequest;
import com.junction.api.types.LabTestCollectionMethod;
import java.util.List;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.labTests().create(
CreateLabTestRequest.builder()
.name("<name>")
.method(LabTestCollectionMethod.TESTKIT)
.description("<description>")
.providerIds(List.of("000110"))
.build()
);
import (
"context"
junction "github.com/junction-api/junction-go"
"github.com/junction-api/junction-go/client"
"github.com/junction-api/junction-go/option"
)
c := client.NewClient(
option.WithApiKey("YOUR_API_KEY"),
option.WithBaseURL(junction.Environments.Sandbox),
)
response, err := c.LabTests.Create(context.TODO(), &junction.CreateLabTestRequest{
Name: "<name>",
Method: junction.LabTestCollectionMethodTestkit,
Description: "<description>",
ProviderIds: []string{"000110"},
})
if err != nil {
return err
}
fmt.Printf("Received data %s\n", response)
{
"id": "2e82a1d4-e2e6-421c-9c54-2210d667ce48",
"slug": "a94e3005-labcorp-panel",
"name": "Labcorp panel",
"sample_type": "serum",
"method": "at_home_phlebotomy",
"price": 0.0,
"is_active": true,
"status": "active",
"fasting": false,
"lab": {
"id": 27,
"slug": "labcorp",
"name": "Labcorp",
"first_line_address": "labcorp address",
"city": "Lincolnshire",
"zipcode": "60069",
"collection_methods": ["at_home_phlebotomy", "walk_in_test"],
"sample_types": ["serum", "saliva", "urine"]
},
"markers": [
{
"id": 195,
"name": "Abnormal Bleeding Profile",
"slug": "abnormal-bleeding-profile",
"description": "Abnormal Bleeding Profile",
"lab_id": 27,
"provider_id": "116004",
"type": "biomarker",
"unit": null,
"price": "N/A",
"aoe": null,
"a_la_carte_enabled": true
}
],
"is_delegated": false,
"auto_generated": false
}
Authorizations
Vital Team API Key
Body
ℹ️ This enum is non-exhaustive.
testkit, walk_in_test, at_home_phlebotomy, on_site_collection ℹ️ This enum is non-exhaustive.
ayumetrix, spiriplex, ussl, quest, sonora_quest, labcorp, bioreference, us_biotek, manual, sanocardio, ihd, nexus, my_uti, crl, mtl Response
Successful Response
ℹ️ This enum is non-exhaustive.
dried_blood_spot, arm_collector, serum, saliva, urine, stool ℹ️ This enum is non-exhaustive.
testkit, walk_in_test, at_home_phlebotomy, on_site_collection Deprecated. Use status instead.
ℹ️ This enum is non-exhaustive.
active, pending_approval, inactive Show child attributes
Show child attributes
{
"city": "San Francisco",
"collection_methods": ["testkit"],
"first_line_address": "123 Main St",
"id": 1,
"name": "LabCorp",
"sample_types": ["saliva"],
"slug": "labcorp",
"zipcode": "91789"
}
Show child attributes
Show child attributes
Defines whether a lab test requires fasting.
Deprecated and always false. Delegation is now at the lab account level. Used to denote whether a lab test requires using non-Vital physician networks.
Whether the lab test was auto-generated by Vital
Whether or not the lab test has collection instructions.
The common turnaround time in days for the lab test. This is the expected time for the lab to process the test and return results.
The worst-case turnaround time in days for the lab test. This is the maximum time the lab may take to process the test and return results.
Was this page helpful?