FreightFighter

API reference (v1)

Base URL /api/v1. Authenticate with Authorization: Bearer ff_live_… (Broker → Settings → API keys). Machine-readable: openapi.json.

Conventions

Endpoints

MethodPathScopeWhat it does
GET/carriers/lookupcarriers:readPublic FMCSA record + identity level + risk for any carrier.
GET/carriers/{dot}carriers:readCarrier summary. Connected carriers also return your latest evaluation and risk signals.
GET/connectionscarriers:readYour carriers. Cursor-paginated.
POST/connectionsconnections:writeInvite a carrier by DOT or MC and evaluate it.
GET/connections/{id}carriers:readOne connection with its latest evaluation.
POST/connections/{id}/evaluateconnections:writeRefresh from FMCSA and re-run your standard now.
GET/connections/{id}/evaluationscarriers:readEvaluation history with reasons.
GET/loadsloads:writeYour loads, newest first. Cursor-paginated.
POST/loadsloads:writeCreate a load; optionally tender it in the same call.
GET/loads/{id}loads:writeStatus, stops, last positions, alerts.
GET/loads/{id}/eventsloads:writeTimeline events.
POST/loads/{id}/tenderloads:writeTender to a connected carrier. 409 when the carrier fails your standard.
POST/loads/{id}/cancelloads:writeCancel; tracking and links stop.
GET/alertsalerts:readAlerts, newest first.
POST/alerts/{id}/acknowledgealerts:readMark an alert handled.
GET/webhookswebhooks:manageYour webhook endpoints.
POST/webhookswebhooks:manageAdd an endpoint. The signing secret is returned once.
DELETE/webhooks/{id}webhooks:manageDisable an endpoint.
POST/webhooks/{id}/testwebhooks:manageSend 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);
}