curl --request GET \
--url https://app.spotdx.com/api/v2/orders/ \
--header 'Authorization: <api-key>'import requests
url = "https://app.spotdx.com/api/v2/orders/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.spotdx.com/api/v2/orders/', 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://app.spotdx.com/api/v2/orders/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://app.spotdx.com/api/v2/orders/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.spotdx.com/api/v2/orders/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.spotdx.com/api/v2/orders/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"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"
}
},
"created": "2023-01-01T04:30:11.222Z",
"updated": "2023-01-01T04:30:11.222Z"
}
]
List orders
Get a list of your orders sorted by recently updated. Providing any query params will further filter the results to only those that match the query params.
curl --request GET \
--url https://app.spotdx.com/api/v2/orders/ \
--header 'Authorization: <api-key>'import requests
url = "https://app.spotdx.com/api/v2/orders/"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.spotdx.com/api/v2/orders/', 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://app.spotdx.com/api/v2/orders/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <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"
"net/http"
"io"
)
func main() {
url := "https://app.spotdx.com/api/v2/orders/"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.spotdx.com/api/v2/orders/")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.spotdx.com/api/v2/orders/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"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"
}
},
"created": "2023-01-01T04:30:11.222Z",
"updated": "2023-01-01T04:30:11.222Z"
}
]
[
{
"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"
}
},
"created": "2023-01-01T04:30:11.222Z",
"updated": "2023-01-01T04:30:11.222Z"
}
]
Authorizations
Token-based authentication with required prefix "Token"
Query Parameters
Only retrieve orders associated with this email address.
Only retrieve orders associated with this first name.
Only retrieve orders associated with this last name.
Only retrieve orders associated with this phone number.
Only retrieve orders that have this status.
canceled, completed, in_progress, pending Only retrieve orders created on or before this date. Format: YYYY-MM-DD
Only retrieve orders created on or after this date. Format: YYYY-MM-DD
Only retrieve orders updated on or before this date. Format: YYYY-MM-DD
Only retrieve orders updated on or after this date. Format: YYYY-MM-DD
Number of results to return. Must be in range 1-100. Default is 10.
1 <= x <= 100The initial index from which to return the results.
x >= 0Response
The order's unique ID.
"O1234567"
pending, in_progress, completed, canceled Show child attributes
Show child attributes
The date and time the order was created.
"2023-01-01T04:30:11.222Z"
The date and time the order was last updated.
"2023-01-01T04:30:11.222Z"