FreightFighter
API reference (v1)
Base URL /api/v1. Authenticate with Authorization: Bearer ff_live_… (Broker → Settings → API keys). Machine-readable: openapi.json.
Conventions
- Errors:
{ error: { code, message, details? } }with the matching HTTP status. - Rate limit: 600 requests per minute per key; a 429 carries
Retry-After. - Retries: send
Idempotency-Keyon POST; for 24 h the first response is replayed (Idempotent-Replayed: true). The same key with a different body is a 422. - Lists:
?limit=1–100and?cursor=fromnext_cursor. - Key scopes:
carriers:readconnections:writeloads:writealerts:readwebhooks:manage
Endpoints
| Method | Path | Scope | What it does |
|---|---|---|---|
GET | /carriers/lookup | carriers:read | Public FMCSA record + identity level + risk for any carrier. |
GET | /carriers/{dot} | carriers:read | Carrier summary. Connected carriers also return your latest evaluation and risk signals. |
GET | /connections | carriers:read | Your carriers. Cursor-paginated. |
POST | /connections | connections:write | Invite a carrier by DOT or MC and evaluate it. |
GET | /connections/{id} | carriers:read | One connection with its latest evaluation. |
POST | /connections/{id}/evaluate | connections:write | Refresh from FMCSA and re-run your standard now. |
GET | /connections/{id}/evaluations | carriers:read | Evaluation history with reasons. |
GET | /loads | loads:write | Your loads, newest first. Cursor-paginated. |
POST | /loads | loads:write | Create a load; optionally tender it in the same call. |
GET | /loads/{id} | loads:write | Status, stops, last positions, alerts. |
GET | /loads/{id}/events | loads:write | Timeline events. |
POST | /loads/{id}/tender | loads:write | Tender to a connected carrier. 409 when the carrier fails your standard. |
POST | /loads/{id}/cancel | loads:write | Cancel; tracking and links stop. |
GET | /alerts | alerts:read | Alerts, newest first. |
POST | /alerts/{id}/acknowledge | alerts:read | Mark an alert handled. |
GET | /webhooks | webhooks:manage | Your webhook endpoints. |
POST | /webhooks | webhooks:manage | Add an endpoint. The signing secret is returned once. |
DELETE | /webhooks/{id} | webhooks:manage | Disable an endpoint. |
POST | /webhooks/{id}/test | webhooks:manage | Send a signed `ping` event. |
Webhooks
Events: carrier.status_changedcarrier.alertload.alertload.eventappeal.openedappeal.decided and ping (test). Headers: FF-Signature, FF-Event-Id (dedupe on it), FF-Event-Type.
Retries after 1 m, 5 m, 30 m, 2 h, 6 h, 12 h and 24 h; an endpoint failing for 72 h is turned off and you get an alert. Only public HTTPS addresses are accepted.
Verify every delivery (Node):
import crypto from "node:crypto";
// rawBody: the request body exactly as received (a string, before JSON.parse).
export function verifyFreightFighter(secret, rawBody, header) {
const parts = Object.fromEntries(header.split(",").map((p) => p.trim().split("=")));
const t = Number(parts.t);
if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false; // replay window
const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
const a = Buffer.from(expected), b = Buffer.from(parts.v1 ?? "");
return a.length === b.length && crypto.timingSafeEqual(a, b);
}