SmartBoard Quickstart
This guide shows the current v3 API flow for SmartBoard integrations.
Base URL:
https://api.diamondtracker.org
Authenticate
Generate an API key from DiamondTracker and send it on every API request with the x-api-key header. For key creation, expiration, and revocation details, see the API Introduction.
curl "https://api.diamondtracker.org/v3/users" \
-H "x-api-key: YOUR_API_KEY"
import requests
response = requests.get(
"https://api.diamondtracker.org/v3/users",
headers={"x-api-key": "YOUR_API_KEY"},
timeout=30,
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.diamondtracker.org/v3/users", {
headers: { "x-api-key": "YOUR_API_KEY" },
});
if (!response.ok) {
throw new Error(`API request failed: ${response.status}`);
}
console.log(await response.json());
Note
Keep API keys private. Do not expose them in browser code, public repositories, mobile applications, or customer-visible logs.
RFID Scan Workflow
A SmartBoard scan through the API is asynchronous:
- Request a scan with
POST /v3/devices/action/{serialNumber}. - Read the resulting scan from
GET /v3/history/rfid-trackingby filtering on the returnedhistoryIdasfilters[parent_id]. - Use
tagsPresentas the full set of tags currently detected on the device.
Note
API clients should prefer GET /v3/history/rfid-tracking filtered by filters[parent_id] because it returns the normalized RFID history entry. The frontend may also poll GET /v3/devices/action/{historyId} for the materialized result of a requested action.
1. Request a Scan
Call POST /v3/devices/action/{serialNumber} with the device serial number and the Scan action.
curl -X POST "https://api.diamondtracker.org/v3/devices/action/SBRv3-0110" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"Scan"}'
import requests
response = requests.post(
"https://api.diamondtracker.org/v3/devices/action/SBRv3-0110",
headers={
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
json={"action": "Scan"},
timeout=30,
)
response.raise_for_status()
action = response.json()
print(action["historyId"])
const response = await fetch(
"https://api.diamondtracker.org/v3/devices/action/SBRv3-0110",
{
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ action: "Scan" }),
}
);
if (!response.ok) {
throw new Error(`Scan request failed: ${response.status}`);
}
const action = await response.json();
console.log(action.historyId);
Successful responses include the tracking identifier used in the next step:
{
"message": "Action requested",
"historyId": "69fb43a9e11e30bb9308e23c"
}
2. Retrieve Scan Results
Call GET /v3/history/rfid-tracking with filters[parent_id] set to the returned historyId.
curl --globoff "https://api.diamondtracker.org/v3/history/rfid-tracking?filters[parent_id]=69fb43a9e11e30bb9308e23c&size=10" \
-H "x-api-key: YOUR_API_KEY"
import requests
history_id = "69fb43a9e11e30bb9308e23c"
response = requests.get(
"https://api.diamondtracker.org/v3/history/rfid-tracking",
headers={"x-api-key": "YOUR_API_KEY"},
params={"filters[parent_id]": history_id, "size": 10},
timeout=30,
)
response.raise_for_status()
print(response.json())
const historyId = "69fb43a9e11e30bb9308e23c";
const url = new URL("https://api.diamondtracker.org/v3/history/rfid-tracking");
url.searchParams.set("filters[parent_id]", historyId);
url.searchParams.set("size", "10");
const response = await fetch(url, {
headers: { "x-api-key": "YOUR_API_KEY" },
});
if (!response.ok) {
throw new Error(`History request failed: ${response.status}`);
}
console.log(await response.json());
The response is an array of RFID tracking events.
| Field | Description |
|---|---|
id |
Unique identifier of the resulting RFID tracking event. |
parent_id |
The historyId from the scan request. |
serial_number |
Serial number of the RFID device. |
created |
Timestamp of the event. |
tagsAdded |
Tags added relative to the previous recorded stock state. |
tagsRemoved |
Tags removed relative to the previous recorded stock state. |
tagsPresent |
Full list of tags present on the device after the scan. |
Example response:
[
{
"id": "69fb43b7e11e30bb9308e23d",
"parent_id": "69fb43a9e11e30bb9308e23c",
"serial_number": "SBRv3-0110",
"created": "2026-05-06T10:15:30.000Z",
"tagsAdded": ["3025467532"],
"tagsRemoved": [],
"tagsPresent": ["3025467532"]
}
]
Tip
Scan execution is asynchronous. If the first history request returns an empty array, retry the same request after a short delay.
Pick-To-Light Workflow
Use the tagsPresent values returned by the scan as the tags field when creating a process.
1. Create the Process
Create a TAKE process with POST /v3/processes.
curl -X POST "https://api.diamondtracker.org/v3/processes" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"description": "Pick-to-light from API quickstart",
"type": "TAKE",
"tags": ["3025467532"],
"deviceSerialNumbers": ["SBRv3-0110"]
}'
import requests
tags_present = ["3025467532"]
response = requests.post(
"https://api.diamondtracker.org/v3/processes",
headers={
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
json={
"description": "Pick-to-light from API quickstart",
"type": "TAKE",
"tags": tags_present,
"deviceSerialNumbers": ["SBRv3-0110"],
},
timeout=30,
)
response.raise_for_status()
process = response.json()
print(process["id"])
const tagsPresent = ["3025467532"];
const response = await fetch("https://api.diamondtracker.org/v3/processes", {
method: "POST",
headers: {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
description: "Pick-to-light from API quickstart",
type: "TAKE",
tags: tagsPresent,
deviceSerialNumbers: ["SBRv3-0110"],
}),
});
if (!response.ok) {
throw new Error(`Process create request failed: ${response.status}`);
}
const process = await response.json();
console.log(process.id);
Successful responses include the process id:
{
"message": "Item created",
"id": "69f4b1ee7dcc388e262c47a9"
}
2. Cancel the Process
Stop the pick-to-light process with DELETE /v3/processes/{id}.
curl -X DELETE "https://api.diamondtracker.org/v3/processes/69f4b1ee7dcc388e262c47a9" \
-H "x-api-key: YOUR_API_KEY"
import requests
process_id = "69f4b1ee7dcc388e262c47a9"
response = requests.delete(
f"https://api.diamondtracker.org/v3/processes/{process_id}",
headers={"x-api-key": "YOUR_API_KEY"},
timeout=30,
)
response.raise_for_status()
const processId = "69f4b1ee7dcc388e262c47a9";
const response = await fetch(`https://api.diamondtracker.org/v3/processes/${processId}`, {
method: "DELETE",
headers: { "x-api-key": "YOUR_API_KEY" },
});
if (!response.ok) {
throw new Error(`Process cancel request failed: ${response.status}`);
}
Internal App API
The DiamondTracker frontend uses authenticated internal v3 routes in addition to the API-key routes documented above.
GET /v3/devices/latest/{serialNumber}returns the latest cached stock snapshot for a device without requesting a new scan.POST /v3/devices/action/{serialNumber}requests a scan or other device action.GET /v3/devices/action/{historyId}returns the materialized result for a previously requested action.
More API Details
For base URL, authentication, pagination, and inventory customization details, see the API Introduction. The complete OpenAPI documentation is available from the deployed backend /v3/api-docs endpoint.