Quickstart
This guide takes you from a sandbox key to a booking decision in your own code. It uses the sandbox throughout, so nothing you do here touches real data or your quota.
1. Get your keys#
DollarTraq issues API keys to each customer. Your account manager will send you a sandbox key (dt_test_…) to build with, and a live key (dt_live_…) when you are ready to go live.
Each key is shown once, when it is created. Store it as a secret, for example in an environment variable, and never put it in browser or mobile app code:
export DT_SCORE_KEY="dt_test_…"
2. Check the connection#
GET /v1/usage returns your limits and costs nothing. A 200 means your key works:
curl https://sandbox-api.dollartraq.com/v1/usage -H "Authorization: Bearer $DT_SCORE_KEY"
{
"object": "usage",
"livemode": false,
"account": { "id": "cli_4k2m9x1q7w4e6r0t", "name": "Acme Logistics" },
"live_requests_used": 0,
"monthly_quota": 10000,
"remaining": 10000,
"rate_limit_per_minute": 120
}
A 401 means the key is missing, mistyped, or a live key sent to the sandbox. The error's message says which.
3. Score a carrier#
Ask for the DT Score of sandbox carrier 1000003, which is built to need review:
curl "https://sandbox-api.dollartraq.com/v1/dt-score?dot_number=1000003" \
-H "Authorization: Bearer $DT_SCORE_KEY"
const response = await fetch(
"https://sandbox-api.dollartraq.com/v1/dt-score?dot_number=1000003",
{ headers: { Authorization: `Bearer ${process.env.DT_SCORE_KEY}` } }
);
const score = await response.json();
import os, requests
score = requests.get(
"https://sandbox-api.dollartraq.com/v1/dt-score",
params={"dot_number": "1000003"},
headers={"Authorization": f"Bearer {os.environ['DT_SCORE_KEY']}"},
timeout=30,
).json()
$context = stream_context_create(['http' => [
'header' => 'Authorization: Bearer ' . getenv('DT_SCORE_KEY'),
'ignore_errors' => true,
]]);
$score = json_decode(file_get_contents(
'https://sandbox-api.dollartraq.com/v1/dt-score?dot_number=1000003', false, $context
), true);
The response, shortened:
{
"object": "dt_score",
"livemode": false,
"carrier": {
"dot_number": "1000003",
"mc_number": "MC1000003",
"legal_name": "Sandbox Midway Logistics LLC",
"dba_name": null
},
"score": 66,
"grade": "D",
"decision": "review",
"verdict": "Medium risk — review before booking",
"needs_manual_review": true,
"knockout": { "triggered": false, "reasons": [] },
"reasons": [
{
"check": "Unsafe Driving BASIC over threshold",
"area": "Safety & Roadside",
"severity": "medium",
"detail": "Unsafe Driving BASIC at or above the intervention threshold.",
"facts": [{ "label": "Unsafe Driving measure", "value": "12.4" }]
}
],
"data_confidence": 0.75,
"model_version": "dt-trust-v3.5-sandbox",
"calculated_at": "2026-10-15T10:00:00Z"
}
You can look a carrier up by MC number instead: ?mc_number=MC1000003.
4. Act on the decision#
Most integrations branch on decision and show reasons to whoever makes the call:
switch (score.decision) {
case "approved":
return tender(load, carrier);
case "review":
return sendToCarrierDesk(carrier, score.reasons); // a person decides
case "high_risk":
case "rejected":
return block(carrier, score.verdict);
}
How the score works explains each decision. Reading a response covers every field.
5. Handle the failures#
Test these against the sandbox before you go live:
| Try | You get | Your code should |
|---|---|---|
dot_number=4242 |
404 carrier_not_found |
Tell the user the number was not found |
dot_number=1000503 |
503 scoring_unavailable |
Retry with backoff, then fall back |
No Authorization header |
401 missing_api_key |
Alert you: this is a configuration bug |
| Many requests quickly | 429 rate_limit_exceeded |
Wait for Retry-After, then retry |
See Errors for every error code.
6. Go live#
Swap the base URL for https://api.dollartraq.com and the key for your dt_live_ key. Going live has the checklist.