curl --request GET \
--url https://api.dev.purplelabelmd.com/v1/account/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dev.purplelabelmd.com/v1/account/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dev.purplelabelmd.com/v1/account/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://api.dev.purplelabelmd.com/v1/account/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: Bearer <token>"
],
]);
$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://api.dev.purplelabelmd.com/v1/account/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dev.purplelabelmd.com/v1/account/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.purplelabelmd.com/v1/account/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"brand_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"offering_ref": "<string>",
"order_ref": "<string>",
"state": "created",
"total_minor": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}List your orders across all your brands
Lists your orders across all the brands your API key owns — the queryable backing read that makes your webhook stream reconcilable, so a missed, delayed, or replayed delivery always has an authoritative source to reconcile against. The results are scoped to the brands your key owns; you never supply a caller id, body, or query to widen that scope. Results are returned in a stable total order (updated_at ascending, then order_ref ascending): record the greatest updated_at you have processed, pass it as updated_since to fetch everything that changed after that watermark, and walk the opaque, scope-bound cursor to the end — so a caller who dropped a week of deliveries can reconcile completely from this endpoint alone. An optional brand_id narrows the results to one of your brands; a brand your key does not own is treated as not found (404, never 403, so existence is never revealed). Each row includes only the order reference, brand, offering, status, exact amount in minor units, currency, and timestamps — never patient identity or medical information. It reports your orders; it never moves money.
curl --request GET \
--url https://api.dev.purplelabelmd.com/v1/account/orders \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dev.purplelabelmd.com/v1/account/orders"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dev.purplelabelmd.com/v1/account/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://api.dev.purplelabelmd.com/v1/account/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: Bearer <token>"
],
]);
$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://api.dev.purplelabelmd.com/v1/account/orders"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dev.purplelabelmd.com/v1/account/orders")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.purplelabelmd.com/v1/account/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"brand_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"currency": "<string>",
"offering_ref": "<string>",
"order_ref": "<string>",
"state": "created",
"total_minor": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
],
"next_cursor": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}{
"status": 123,
"title": "<string>",
"type": "<string>",
"detail": "<string>"
}Authorizations
Per-client API key (M2M). Presented as Authorization: Bearer <key>.
Query Parameters
narrow to ONE of the client's own brands (brd_…); omitted ⇒ all the client's brands. A brand the client does not own is a foreign brand → 404 (never 403).
^brd_[A-Za-z0-9][A-Za-z0-9_-]*$filter to one order state
created, payment_authorized, paid, payment_failed, partially_refunded, refunded, disputed, cancelled RECONCILIATION filter (ISO 8601 date-time, inclusive): return only orders whose updated_at ≥ this. Record the greatest updated_at you have processed and re-query with it to catch up on everything that changed after a missed/dropped webhook window.
page size (default 50, max 200)
1 <= x <= 200opaque, scope+filter-bound keyset cursor (api-style-guide §2). Bound to BOTH the tenant scope and the active filters — a cursor from another scope or a changed filter set is rejected (400), never silently re-scoped.
Response
a page of the client's orders (non-PHI projection) + an optional next_cursor
A page of your orders: a list of non-PHI order rows plus an optional next_cursor for keyset pagination. The cursor is opaque and bound to both your scope and the active filters. When next_cursor is absent, you have reached the last page. Walk the cursor to the end, together with updated_since, to reconcile completely.