from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.lab_tests.get_order("<order_id>")
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.labTests.getOrder({ orderId: "<order_id>" });
import com.junction.api.Junction;
import com.junction.api.core.Environment;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.labTests().getOrder("<order_id>");
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.GetOrder(context.TODO(), &junction.GetOrderLabTestsRequest{
OrderId: "<order_id>",
})
if err != nil {
return err
}
fmt.Printf("Received data %s\n", response)
{
"id": "0ee312e2-6773-4a21-a6e1-506882cd98ed",
"team_id": "cbb64555-af07-46c1-be09-ef89308e9b60",
"user_id": "94e2d9f2-d600-4a23-9f08-536df378e2c7",
"patient_details": {
"dob": "2020-01-01",
"gender": "male"
},
"priority": false,
"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"
},
"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"
}
],
"origin": "initial",
"order_transaction": {
"id": "6424dd45-ee1a-49c6-ad0c-5769b8e03fc1",
"status": "active",
"orders": [
{
"id": "0ee312e2-6773-4a21-a6e1-506882cd98ed",
"created_at": "2020-01-01T00:00:00Z",
"updated_at": "2020-01-01T00:00:00Z",
"low_level_status": "transit_customer",
"low_level_status_created_at": "2022-01-03T00:00:00Z",
"origin": "initial"
}
]
}
}
Get order
Retrieve order via the Junction API. Requires authentication with your team API key.
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.lab_tests.get_order("<order_id>")
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.labTests.getOrder({ orderId: "<order_id>" });
import com.junction.api.Junction;
import com.junction.api.core.Environment;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.labTests().getOrder("<order_id>");
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.GetOrder(context.TODO(), &junction.GetOrderLabTestsRequest{
OrderId: "<order_id>",
})
if err != nil {
return err
}
fmt.Printf("Received data %s\n", response)
{
"id": "0ee312e2-6773-4a21-a6e1-506882cd98ed",
"team_id": "cbb64555-af07-46c1-be09-ef89308e9b60",
"user_id": "94e2d9f2-d600-4a23-9f08-536df378e2c7",
"patient_details": {
"dob": "2020-01-01",
"gender": "male"
},
"priority": false,
"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"
},
"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"
}
],
"origin": "initial",
"order_transaction": {
"id": "6424dd45-ee1a-49c6-ad0c-5769b8e03fc1",
"status": "active",
"orders": [
{
"id": "0ee312e2-6773-4a21-a6e1-506882cd98ed",
"created_at": "2020-01-01T00:00:00Z",
"updated_at": "2020-01-01T00:00:00Z",
"low_level_status": "transit_customer",
"low_level_status_created_at": "2022-01-03T00:00:00Z",
"origin": "initial"
}
]
}
}
from junction import Junction
from junction.environment import JunctionEnvironment
client = Junction(
api_key="YOUR_API_KEY",
environment=JunctionEnvironment.SANDBOX,
)
data = client.lab_tests.get_order("<order_id>")
import { JunctionClient, JunctionEnvironment } from "@junction-api/sdk";
const client = new JunctionClient({
apiKey: "YOUR_API_KEY",
environment: JunctionEnvironment.Sandbox,
});
const data = await client.labTests.getOrder({ orderId: "<order_id>" });
import com.junction.api.Junction;
import com.junction.api.core.Environment;
Junction client = Junction.builder()
.apiKey("YOUR_API_KEY")
.environment(Environment.SANDBOX)
.build();
var data = client.labTests().getOrder("<order_id>");
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.GetOrder(context.TODO(), &junction.GetOrderLabTestsRequest{
OrderId: "<order_id>",
})
if err != nil {
return err
}
fmt.Printf("Received data %s\n", response)
{
"id": "0ee312e2-6773-4a21-a6e1-506882cd98ed",
"team_id": "cbb64555-af07-46c1-be09-ef89308e9b60",
"user_id": "94e2d9f2-d600-4a23-9f08-536df378e2c7",
"patient_details": {
"dob": "2020-01-01",
"gender": "male"
},
"priority": false,
"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"
},
"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"
}
],
"origin": "initial",
"order_transaction": {
"id": "6424dd45-ee1a-49c6-ad0c-5769b8e03fc1",
"status": "active",
"orders": [
{
"id": "0ee312e2-6773-4a21-a6e1-506882cd98ed",
"created_at": "2020-01-01T00:00:00Z",
"updated_at": "2020-01-01T00:00:00Z",
"low_level_status": "transit_customer",
"low_level_status_created_at": "2022-01-03T00:00:00Z",
"origin": "initial"
}
]
}
}
Authorizations
Vital Team API Key
Path Parameters
Your Order ID.
Response
Successful Response
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.
The Vital Order ID
Your team id.
Patient Details
Show child attributes
Show child attributes
Patient Address
Show child attributes
Show child attributes
The Vital Test associated with the order
Show child attributes
Show child attributes
{ "lab_test": { "description": "Cholesterol test", "fasting": false, "has_collection_instructions": false, "is_delegated": false, "lab": { "city": "New York", "first_line_address": "123 Main St", "name": "US Specialty Lab", "slug": "USSL", "zipcode": "10001" }, "markers": [ { "description": "Hemoglobin A1c is a form of hemoglobin that is measured identify your average blood sugar levels over the past 3 months.", "id": 1, "lab_id": 1, "name": "Hemoglobin A1c", "price": "10.00", "provider_id": "1234", "slug": "hemoglobin-a1c", "type": "biomarker", "unit": "%" } ], "method": "testkit", "name": "Lipids Panel", "price": 10, "sample_type": "dried blood spot", "status": "active" } }
- ClientFacingWalkInOrderDetails
- ClientFacingTestKitOrderDetails
- ClientFacingAtHomePhlebotomyOrderDetails
- ClientFacingOnSiteCollectionOrderDetails
Show child attributes
Show child attributes
Sample ID
Notes associated with the order
When your order was created
When your order was last updated.
Show child attributes
Show child attributes
The latest event in the order's lifecycle.
Show child attributes
Show child attributes
Vital ID of the health insurance.
DEPRECATED. Requistion form url.
Shipping Details. For unregistered testkit orders.
Show child attributes
Show child attributes
Defines whether the order has an Advanced Beneficiary Notice (ABN) form or not.
The top-level status of the latest event for this order. This field is deprecated. Please use last_event instead. ℹ️ This enum is non-exhaustive.
received, collecting_sample, sample_with_lab, completed, cancelled, failed Show child attributes
Show child attributes
Defines whether order is priority or not. For some labs, this refers to a STAT order.
Schedule an Order to be processed in a future date.
ℹ️ This enum is non-exhaustive.
client_bill, commercial_insurance, patient_bill_passthrough, patient_bill Interpretation of the order result. Can be one of (normal, abnormal, critical). ℹ️ This enum is non-exhaustive.
normal, abnormal, critical, unknown Defines whether the order result has missing biomarkers.
The common-case date by which the order result is expected to be available.
The latest date by which the order result is expected to be available.
ℹ️ This enum is non-exhaustive.
initial, redraw, recreation Order transaction info.
Show child attributes
Show child attributes
Was this page helpful?