API Reference
Interactive documentation for the trucktracker REST API.
Language
List loads
Cursor-paginated tenant-scoped load list.
import { TrucktrackerClient } from '@trucktracker/sdk';
const tt = new TrucktrackerClient({ apiKey: process.env.TT_API_KEY! });
const page = await tt.loads.list({ limit: 25 });
for (const load of page.items) {
console.log(load.id, load.status);
}Create webhook
Subscribe a URL to canonical ShipmentEvents.
await tt.webhooks.create({
url: 'https://carrier.example.com/tt-webhook',
events: ['load.status_changed', 'pod.submitted'],
});Submit a POD packet
Driver-side proof-of-delivery packet submission.
const pod = await tt.pod.submit(loadId, {
signed_at: new Date().toISOString(),
signer_name: 'Connie Consignee',
fields: { signature_present: true, photo_count: 2, bol_number_match: true },
});Stream live events (SSE)
Long-lived EventSource for tenant-scoped updates.
const es = new EventSource( 'https://api.trucktracker.ai/v1/events/stream?tenant_id=' + tid + '&topic=loads', ); es.onmessage = (ev) => console.log(JSON.parse(ev.data));
List MCP tools (JSON-RPC)
Enumerate the tools an API key is authorised to call.
const res = await fetch('https://api.trucktracker.ai/mcp', {
method: 'POST',
headers: { 'X-Api-Key': apiKey, 'Content-Type': 'application/json' },
body: JSON.stringify({ jsonrpc: '2.0', id: '1', method: 'tools/list' }),
});
const body = await res.json();Approve an agent proposal
HITL round-trip for write-capable agents.
await tt.agents.approvals.decide(approvalId, { verdict: 'approved' });Create a freight quote
Price a lane against tariffs + benchmarks; draft is sharable as a customer-facing token.
const quote = await tt.rater.quotes.create({
customer_id: customerId,
origin_kma: 'ATL',
dest_kma: 'DAL',
equipment: 'dry_van',
service_level: 'standard',
});Audit a freight invoice
Run the reconciliation engine against a received EDI 210 invoice and pull resulting findings.
await tt.audit.invoices.audit(invoiceId); const findings = await tt.audit.invoices.findings(invoiceId);
Build & file a cross-border eManifest
Assemble a filing-ready ACE/ACI/BorderConnect manifest from a load and submit it.
const manifest = await tt.edi.emanifest.buildAndFile({
load_id: loadId,
direction: 'us_inbound',
});Configure a notification channel
Register an outbound delivery endpoint (SMS, voice, email, Slack, Teams, or webhook).
await tt.notifications.channels.create({
name: 'ops-slack',
kind: 'slack',
config: { incoming_webhook_url: process.env.SLACK_WEBHOOK_URL! },
});