API Reference - Orders
Create order
POST
/
api
/
v2
/
orders
/
Authorization
Body
curl --request POST \
--url https://app.spotdx.com/api/v2/orders/ \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"kit_types": [
"health_kit_1"
],
"recipient": {
"email": "alice123@gmail.com",
"first_name": "Alice",
"last_name": "Smith",
"phone": "1234567890"
}
}'
{
"order_id": "O1234567",
"status": "pending",
"recipient": {
"first_name": "Alice",
"last_name": "Smith",
"email": "alice123@gmail.com",
"phone": "1234567890",
"address": {
"street1": "123 Main St",
"street2": "Apt 1",
"city": "San Francisco",
"state": "CA",
"country": "US",
"zip": "94105"
}
},
"kit_types": ["health_kit_1"],
"kits": [],
"created": "2023-01-01T04:30:11.222Z",
"updated": "2023-01-01T04:30:11.222Z",
"metadata": {
"some_key": "some_value"
}
}
Authorizations
Authorizationheaderrequired
string
Token-based authentication with required prefix "Token"
Body
kit_typesrequired
string[]
A list of all the kit types to place in the order.
metadata
object | null
An optional dictionary of key-value pairs stored with the order.
recipientrequired
object
Response
201 - application/json
created
string
kit_types
string[]
A list of the kit types that are included in this order.
kits
object[]
metadata
object | null
An optional dictionary of key-value pairs stored with the order.
order_id
string
The unique identifier of the order.
recipient
object
status
enum<string>
Available options:
pending
, in_progress
, completed
, canceled
curl --request POST \
--url https://app.spotdx.com/api/v2/orders/ \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '{
"kit_types": [
"health_kit_1"
],
"recipient": {
"email": "alice123@gmail.com",
"first_name": "Alice",
"last_name": "Smith",
"phone": "1234567890"
}
}'
{
"order_id": "O1234567",
"status": "pending",
"recipient": {
"first_name": "Alice",
"last_name": "Smith",
"email": "alice123@gmail.com",
"phone": "1234567890",
"address": {
"street1": "123 Main St",
"street2": "Apt 1",
"city": "San Francisco",
"state": "CA",
"country": "US",
"zip": "94105"
}
},
"kit_types": ["health_kit_1"],
"kits": [],
"created": "2023-01-01T04:30:11.222Z",
"updated": "2023-01-01T04:30:11.222Z",
"metadata": {
"some_key": "some_value"
}
}