- API Reference - Requisitions
- Create requisition
API Reference - Requisitions
Create requisition
/api/v2/requisitions/
curl --request POST \
--url https://app.spotdx.com/api/v2/requisitions/ \
--header 'Content-Type: application/json' \
--data '{
"barcode": "string",
"panels": "array",
"account_number": "string",
"lab": "string",
"state_collected": "string",
"patient": {
}
}'
After creating a new requisition, we will immediately respond with an approved or denied status code.
{
"requisition_id": "f0e5a607-5b52-4d7c-a3f2-c40772d41482",
"barcode": "19742938328",
"account_number": "1234567890",
"panels": ["PANEL-123"],
"state_collected": "OH",
"patient": {
"first_name": "Alice",
"last_name": "Smith",
"email": "alice123@gmail.com",
"phone": "1234567890",
"sex": "F",
"date_of_birth": "2023-02-01",
"address": {
"street1": "123 Main St",
"street2": "Apt 1",
"city": "San Francisco",
"state": "CA",
"country": "US",
"zip": "94105"
}
},
"tracking": {
"tracking_number": "9400123456789999876500",
"carrier": "usps"
},
"status": "approved",
"events": [
{
"event": "created",
"date": "2020-01-01T00:00:00Z"
},
{
"event": "approved",
"date": "2020-01-01T00:00:00Z"
}
],
"reports": [],
"metadata": null
}
Body
The two letter code of the state where the sample was collected.
The name of the lab that will process the sample.
The account number submitted to the lab.
The panel codes of the test being performed on the sample. We'll create these with you during onboarding.
The barcode of the sample mailed to the lab. We use this to identify the sample from the lab report.
An optional dictionary of key-value pairs stored with the requisition.
Response
The ID of the requisition.
The full barcode of the sample mailed to the lab. Must be globally unique.
The account number submitted to the lab.
The name of the lab that will process the sample.
The panel codes of the test being performed on the sample. We'll create these with you during onboarding.
The two letter code of the state where the sample was collected.
created
, approved
, denied
, delivered
, received
, extra_quality_checks
, resulted
, rejected
, delivery_exception
An optional dictionary of key-value pairs stored with the requisition.
curl --request POST \
--url https://app.spotdx.com/api/v2/requisitions/ \
--header 'Content-Type: application/json' \
--data '{
"barcode": "string",
"panels": "array",
"account_number": "string",
"lab": "string",
"state_collected": "string",
"patient": {
}
}'
{
"requisition_id": "f0e5a607-5b52-4d7c-a3f2-c40772d41482",
"barcode": "19742938328",
"account_number": "1234567890",
"panels": ["PANEL-123"],
"state_collected": "OH",
"patient": {
"first_name": "Alice",
"last_name": "Smith",
"email": "alice123@gmail.com",
"phone": "1234567890",
"sex": "F",
"date_of_birth": "2023-02-01",
"address": {
"street1": "123 Main St",
"street2": "Apt 1",
"city": "San Francisco",
"state": "CA",
"country": "US",
"zip": "94105"
}
},
"tracking": {
"tracking_number": "9400123456789999876500",
"carrier": "usps"
},
"status": "approved",
"events": [
{
"event": "created",
"date": "2020-01-01T00:00:00Z"
},
{
"event": "approved",
"date": "2020-01-01T00:00:00Z"
}
],
"reports": [],
"metadata": null
}