curl --request POST \
--url https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept \
--header 'Content-Type: application/json' \
--header 'x-vital-api-key: <api-key>' \
--data '
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>"
}
'import requests
url = "https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept"
payload = {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>"
}
headers = {
"x-vital-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-vital-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
order_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
note: '<string>'
})
};
fetch('https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'order_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-vital-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept"
payload := strings.NewReader("{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-vital-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept")
.header("x-vital-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-vital-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"activate_by": "2020-01-01",
"created_at": "2020-01-01T00:00:00Z",
"details": {
"data": {
"created_at": "2020-01-01T00:00:00Z",
"id": "a655f0e4-6405-4a1d-80b7-66f06c2108a7",
"shipment": {
"created_at": "2020-01-01T00:00:00.000Z",
"id": "d55210cc-3d9f-4115-8262-5013f700c7be",
"inbound_courier": "usps",
"inbound_tracking_number": "<inbound_tracking_number>",
"inbound_tracking_url": "<inbound_tracking_url>",
"notes": "<notes>",
"outbound_courier": "usps",
"outbound_tracking_number": "<outbound_tracking_number>",
"outbound_tracking_url": "<outbound_tracking_url>",
"updated_at": "2020-01-01T00:00:00.000Z"
},
"updated_at": "2020-01-01T00:00:00Z"
},
"type": "testkit"
},
"events": [
{
"created_at": "2022-01-01T00:00:00Z",
"id": 1,
"status": "received.testkit.ordered"
},
{
"created_at": "2022-01-02T00:00:00Z",
"id": 2,
"status": "received.testkit.requisition_created"
},
{
"created_at": "2022-01-03T00:00:00Z",
"id": 3,
"status": "collecting_sample.testkit.transit_customer"
}
],
"has_abn": false,
"health_insurace_id": "6c9fe7e6-2ca8-42d8-b805-0048a7166ce4",
"id": "de455962-d3a4-4136-a772-5521a08add2a",
"lab_test": {
"description": "Cholesterol test",
"method": "testkit",
"name": "Lipids Panel"
},
"last_event": {
"created_at": "2022-01-03T00:00:00Z",
"id": 3,
"status": "collecting_sample.testkit.transit_customer"
},
"notes": "This is a note",
"order_transaction": {
"id": "a655f0e4-6405-4a1d-80b7-66f06c2108a7",
"orders": [
{
"created_at": "2020-01-01T00:00:00Z",
"id": "d55210cc-3d9f-4115-8262-5013f700c7be",
"low_level_status": "transit_customer",
"low_level_status_created_at": "2020-01-05T00:00:00Z",
"origin": "initial",
"updated_at": "2020-01-05T00:00:00Z"
},
{
"created_at": "2020-01-05T01:00:00Z",
"id": "e66321dd-4e0g-5226-9373-6124g811d8cf",
"low_level_status": "requisition_created",
"low_level_status_created_at": "2020-01-05T01:00:00Z",
"origin": "redraw",
"updated_at": "2020-01-05T01:00:00Z"
}
],
"status": "active"
},
"origin": "initial",
"patient_address": {
"city": "San Francisco",
"country": "United States",
"first_line": "123 Main St.",
"phone_number": "+11234567890",
"receiver_name": "John Doe",
"second_line": "Apt. 208",
"state": "CA",
"zip": "91189"
},
"patient_details": {
"dob": "2020-01-01",
"gender": "male"
},
"requisition_form_url": "https://www.example.com",
"sample_id": "123456789",
"status": "collecting_sample",
"team_id": "9061f12d-108a-446c-94cd-95474957845e",
"updated_at": "2020-01-01T00:00:00Z",
"user_id": "bbc71946-2c5c-422f-8924-04840280dcef"
}{
"detail": "<unknown>"
}Accept Unmatched Result
Accept a match for an unmatched lab result via the Junction API. Requires authentication with your team API key.
curl --request POST \
--url https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept \
--header 'Content-Type: application/json' \
--header 'x-vital-api-key: <api-key>' \
--data '
{
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>"
}
'import requests
url = "https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept"
payload = {
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"order_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"note": "<string>"
}
headers = {
"x-vital-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-vital-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
order_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
note: '<string>'
})
};
fetch('https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'order_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-vital-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept"
payload := strings.NewReader("{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-vital-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept")
.header("x-vital-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.us.junction.com/v3/unmatched_result/{raw_result_id}/accept")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-vital-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"order_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"activate_by": "2020-01-01",
"created_at": "2020-01-01T00:00:00Z",
"details": {
"data": {
"created_at": "2020-01-01T00:00:00Z",
"id": "a655f0e4-6405-4a1d-80b7-66f06c2108a7",
"shipment": {
"created_at": "2020-01-01T00:00:00.000Z",
"id": "d55210cc-3d9f-4115-8262-5013f700c7be",
"inbound_courier": "usps",
"inbound_tracking_number": "<inbound_tracking_number>",
"inbound_tracking_url": "<inbound_tracking_url>",
"notes": "<notes>",
"outbound_courier": "usps",
"outbound_tracking_number": "<outbound_tracking_number>",
"outbound_tracking_url": "<outbound_tracking_url>",
"updated_at": "2020-01-01T00:00:00.000Z"
},
"updated_at": "2020-01-01T00:00:00Z"
},
"type": "testkit"
},
"events": [
{
"created_at": "2022-01-01T00:00:00Z",
"id": 1,
"status": "received.testkit.ordered"
},
{
"created_at": "2022-01-02T00:00:00Z",
"id": 2,
"status": "received.testkit.requisition_created"
},
{
"created_at": "2022-01-03T00:00:00Z",
"id": 3,
"status": "collecting_sample.testkit.transit_customer"
}
],
"has_abn": false,
"health_insurace_id": "6c9fe7e6-2ca8-42d8-b805-0048a7166ce4",
"id": "de455962-d3a4-4136-a772-5521a08add2a",
"lab_test": {
"description": "Cholesterol test",
"method": "testkit",
"name": "Lipids Panel"
},
"last_event": {
"created_at": "2022-01-03T00:00:00Z",
"id": 3,
"status": "collecting_sample.testkit.transit_customer"
},
"notes": "This is a note",
"order_transaction": {
"id": "a655f0e4-6405-4a1d-80b7-66f06c2108a7",
"orders": [
{
"created_at": "2020-01-01T00:00:00Z",
"id": "d55210cc-3d9f-4115-8262-5013f700c7be",
"low_level_status": "transit_customer",
"low_level_status_created_at": "2020-01-05T00:00:00Z",
"origin": "initial",
"updated_at": "2020-01-05T00:00:00Z"
},
{
"created_at": "2020-01-05T01:00:00Z",
"id": "e66321dd-4e0g-5226-9373-6124g811d8cf",
"low_level_status": "requisition_created",
"low_level_status_created_at": "2020-01-05T01:00:00Z",
"origin": "redraw",
"updated_at": "2020-01-05T01:00:00Z"
}
],
"status": "active"
},
"origin": "initial",
"patient_address": {
"city": "San Francisco",
"country": "United States",
"first_line": "123 Main St.",
"phone_number": "+11234567890",
"receiver_name": "John Doe",
"second_line": "Apt. 208",
"state": "CA",
"zip": "91189"
},
"patient_details": {
"dob": "2020-01-01",
"gender": "male"
},
"requisition_form_url": "https://www.example.com",
"sample_id": "123456789",
"status": "collecting_sample",
"team_id": "9061f12d-108a-446c-94cd-95474957845e",
"updated_at": "2020-01-01T00:00:00Z",
"user_id": "bbc71946-2c5c-422f-8924-04840280dcef"
}{
"detail": "<unknown>"
}Authorizations
Vital Team API Key
Path Parameters
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?