Loading LoadFlow Platform...
REST API for fleet compliance: expiration reminders, drivers, driver portal links, vehicles, compliance status, and (when enabled) permit-aligned routing. Use JWT or API key. This page documents base URL, auth, plan-based access, and all main endpoints with curl and fetch examples.
Base URL (versioned): https://api.loadflowlogistics.com/v1
The LoadFlow API is a REST API. Access is determined by your plan. Summary:
POST /auth/register, POST /auth/login; JWT or X-API-Key for all other requests.GET /compliance/status (can_operate), /compliance/analytics, /compliance/metrics (Mega+)./routes and /driver/routes return 503 until the feature is enabled.GET /health, GET /health/ready (no auth).Paths, request bodies, and examples are covered in the sections below and in the Full API reference.
Use the versioned base so your integration stays stable when we add paths or behavior:
https://api.loadflowlogistics.com/v1 (this app uses NEXT_PUBLIC_REMINDERS_API_URL or NEXT_PUBLIC_API_URL + /v1).http://localhost:8000/v1 (backend on port 8000).The backend mounts the same routes at root and at /v1. Prefer /v1 for new integrations. Responses include X-API-Version: 1 when applicable.
There is no /api prefix in the backend; the base URL is the host (and optional /v1) only.
Which endpoints you can call depends on your subscription. Requests for a feature your plan does not include return 403 Forbidden (or a clear detail message).
| Plan | API access |
|---|---|
| Free | No API (dashboard only). |
| Pro | Reminders, templates, auth (JWT, API keys). No drivers/vehicles/compliance analytics. |
| Ultra | Pro + drivers, vehicles, driver portal (access links), uploads, role escalation. Permit routes when Permit GPS is enabled (currently coming soon). |
| Mega | Ultra + compliance analytics, can_operate hook, higher limits. |
| Enterprise | Mega + webhooks, team access, SLA tiers, configurable limits & retention. Driver portal and Permit GPS (coming soon) included. |
Permit GPS (permit-aligned routing): The /routes and /driver/routes APIs are temporarily disabled and return 503 with a “coming soon” message. When the feature launches, Ultra, Mega, and Enterprise will have access.
You need either a JWT (from login) or an API key (created in the dashboard). Send one of these on every request except health and public auth endpoints.
POST /auth/login with { "email", "password" } to get access_token (JWT).X-API-Key: YOUR_API_KEY.Authorization: Bearer YOUR_JWT or X-API-Key: YOUR_API_KEY. Use the Full API reference and Code examples below to try requests (e.g. with curl).Every request (except GET /health, GET /health/ready, POST /auth/register, POST /auth/login, and password-reset/email-verification flows) must include one of:
After POST /auth/login with email/password, use the returned access_token:
Authorization: Bearer YOUR_ACCESS_TOKEN
Create an API key in the dashboard and send it in the header:
X-API-Key: YOUR_API_KEY
To obtain a JWT, register and then POST /auth/login with email and password.
Never expose API keys or tokens in frontend code. Use them only in server-side or trusted environments.
All paths under /reminders. Scope: your account only. DELETE /reminders/{id} is soft-delete (set deleted_at); use POST /reminders/{id}/restore to restore. Optional Idempotency-Key header on POST create for duplicate detection. More reminder endpoints (bulk-*, attachments, from-template, search, views) are listed in the Full API reference below.
GET /remindersList all reminders for the authenticated user or API key. Optional: ?active_only=true
fetch("https://api.loadflowlogistics.com/v1/reminders", {
headers: { "X-API-Key": "YOUR_API_KEY" }
})
// Or: { "Authorization": "Bearer YOUR_JWT" }POST /remindersCreate a reminder. Required: name, email, expires_on (YYYY-MM-DD). Optional: enabled (default true), operational_impact, blocking_operations, driver_id, visibility (internal|driver), offset_days_override, timezone. See OpenAPI schema for full fields.
fetch("https://api.loadflowlogistics.com/v1/reminders", {
method: "POST",
headers: { "Authorization": "Bearer YOUR_JWT", "Content-Type": "application/json" },
body: JSON.stringify({
name: "Driver License",
email: "user@example.com",
expires_on: "2026-12-31",
enabled: true
})
})GET /reminders/{reminder_id}Get a reminder's status: last_sent_at, next_scheduled_fire, and details.
fetch("https://api.loadflowlogistics.com/v1/reminders/1", {
headers: { "Authorization": "Bearer YOUR_JWT" }
})PUT /reminders/{reminder_id}Update a reminder. Body: expires_on (required), optional operational_impact, blocking_operations, driver_id, visibility, etc. See OpenAPI.
fetch("https://api.loadflowlogistics.com/v1/reminders/1", {
method: "PUT",
headers: { "Authorization": "Bearer YOUR_JWT", "Content-Type": "application/json" },
body: JSON.stringify({ expires_on: "2027-01-15" })
})POST /reminders/{reminder_id}/disableDisable a reminder (stops future email alerts).
fetch("https://api.loadflowlogistics.com/v1/reminders/1/disable", {
method: "POST",
headers: { "Authorization": "Bearer YOUR_JWT" }
})POST /reminders/{reminder_id}/enableRe-enable a previously disabled reminder.
fetch("https://api.loadflowlogistics.com/v1/reminders/1/enable", {
method: "POST",
headers: { "Authorization": "Bearer YOUR_JWT" }
})GET /reminders/{reminder_id}/logsGet send/failure logs for a reminder.
fetch("https://api.loadflowlogistics.com/v1/reminders/1/logs", {
headers: { "Authorization": "Bearer YOUR_JWT" }
})DELETE /reminders/{reminder_id}Soft-delete a reminder (sets deleted_at; list/get exclude it until restored).
fetch("https://api.loadflowlogistics.com/v1/reminders/1", {
method: "DELETE",
headers: { "Authorization": "Bearer YOUR_JWT" }
})POST /reminders/{reminder_id}/restoreRestore a soft-deleted reminder.
fetch("https://api.loadflowlogistics.com/v1/reminders/1/restore", {
method: "POST",
headers: { "Authorization": "Bearer YOUR_JWT" }
})POST /auth/register — body: email, password, first_name, last_name (required). Returns user object.POST /auth/login — body: email, password. Returns access_token, token_type, user.
Plan: Ultra and above. Drivers: GET/POST /drivers, GET/PATCH/DELETE /drivers/{id}, POST /drivers/{id}/access-link (creates driver portal URL). Assign permit routes: PATCH /drivers/{id}/permit-routes (body: { "route_ids": [1,2] }) — returns 503 while Permit GPS is disabled. Vehicles: GET/POST /vehicles, GET/PATCH/DELETE /vehicles/{id}, GET /vehicles/heatmap, GET /vehicles/{id}/summary, GET /vehicles/{id}/reminders, GET /vehicles/{id}/compliance-score. Request/response bodies are documented in the Full API reference.
Plan: Mega and above for analytics and can_operate. Key paths: GET /compliance/status (account-level can_operate and blocking items), GET /compliance/analytics, GET /compliance/metrics (counts and risk metrics). Additional endpoints: report, certificate, trends, score-history, forecast, email-templates, storage, audit-export, etc. — see the Full API reference for curl examples.
Permit-aligned GPS routing is launching soon. Until then, all requests to /routes (admin: create, list, get, lock, from-permit, gpx, etc.) and /driver/routes (driver: list routes, start/ping/end session) return 503 Service Unavailable with a message that the feature is temporarily unavailable. When enabled (Ultra, Mega, Enterprise), the same paths will work; no API contract change.
Billing (JWT): GET /billing/summary, GET /billing/history, POST /billing/checkout (body: plan, billing_interval), POST /billing/portal (returns Stripe portal URL). No API key for billing. — Webhooks (Enterprise only): create/manage endpoints and subscribe to events from the webhooks dashboard. — Audit logs: GET /audit-logs (JWT only; query: limit, offset).
Replace YOUR_API_KEY with your key from API Keys. Base URL: https://api.loadflowlogistics.com/v1. For JWT, use -H "Authorization: Bearer YOUR_JWT" instead of X-API-Key.
curl "https://api.loadflowlogistics.com/v1/health"
# List reminders
curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/reminders"
# List with filters (?active_only=true, ?limit=50&offset=0)
curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/reminders?active_only=true"
# Create reminder
curl -X POST -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"Insurance","email":"you@example.com","expires_on":"2026-12-31","enabled":true}' \
"https://api.loadflowlogistics.com/v1/reminders"
# Get reminder
curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/reminders/1"
# Update reminder
curl -X PUT -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"expires_on":"2027-01-15"}' "https://api.loadflowlogistics.com/v1/reminders/1"
# Delete reminder
curl -X DELETE -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/reminders/1"
# Disable / enable
curl -X POST -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/reminders/1/disable"
curl -X POST -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/reminders/1/enable"
# Get logs
curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/reminders/1/logs"
# Bulk enable/disable
curl -X POST -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"ids":[1,2,3]}' "https://api.loadflowlogistics.com/v1/reminders/bulk-enable"
curl -X POST -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"ids":[1,2,3]}' "https://api.loadflowlogistics.com/v1/reminders/bulk-disable"
# Create from template
curl -X POST -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"template_id":"fmcra-carrier","email":"you@example.com"}' \
"https://api.loadflowlogistics.com/v1/reminders/from-template"# Status (can_operate) curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/compliance/status" # Analytics (risk metrics) curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/compliance/analytics" # Metrics (counts, risk) curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/compliance/metrics"
# List drivers
curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/drivers"
# Create driver
curl -X POST -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"John Smith","license_number":"X1234567","license_state":"TX"}' \
"https://api.loadflowlogistics.com/v1/drivers"
# Get / update / delete driver
curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/drivers/1"
curl -X PATCH -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"John Doe"}' "https://api.loadflowlogistics.com/v1/drivers/1"
curl -X DELETE -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/drivers/1"
# Create driver access link (portal URL)
curl -X POST -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"expires_in_days":90}' "https://api.loadflowlogistics.com/v1/drivers/1/access-link"# List vehicles
curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/vehicles"
# Create vehicle
curl -X POST -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"unit_number":"101","display_name":"Truck 101"}' \
"https://api.loadflowlogistics.com/v1/vehicles"
# Get / update / delete vehicle
curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/vehicles/1"
curl -X PATCH -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"display_name":"Unit 101"}' "https://api.loadflowlogistics.com/v1/vehicles/1"
curl -X DELETE -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/vehicles/1"These return 503 until Permit GPS is enabled. Shown for reference.
# List routes
curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/routes"
# Create route (manual coordinates)
curl -X POST -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"LA Permit","permit_number":"123","source_type":"manual","coordinates":[[34.05,-118.25],[35.5,-120.0]],"buffer_meters":100}' \
"https://api.loadflowlogistics.com/v1/routes"
# Get / update / delete route
curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/routes/1"
curl -X PATCH -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"Updated name"}' "https://api.loadflowlogistics.com/v1/routes/1"
curl -X DELETE -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/routes/1"
# Lock / unlock route
curl -X POST -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/routes/1/lock"
curl -X POST -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/routes/1/unlock"
# Export GPX
curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/routes/1/gpx" -o route.gpx# Usage (API key supported)
curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/auth/usage"
# Login (returns JWT; no API key for this)
curl -X POST -H "Content-Type: application/json" \
-d '{"email":"you@example.com","password":"your_password"}' \
"https://api.loadflowlogistics.com/v1/auth/login"# List audit logs (requires JWT; account admin/owner) curl -H "Authorization: Bearer YOUR_JWT" "https://api.loadflowlogistics.com/v1/audit-logs?limit=50&offset=0"
More endpoints (attachments, from-template, bulk-assign, bulk-update-expiration, search, views, etc.) use the same base URL and auth; request bodies follow the same JSON patterns as above.
No authentication required. Use for liveness and readiness probes.
GET https://api.loadflowlogistics.com/v1/health # Liveness: process is up GET https://api.loadflowlogistics.com/v1/health/ready # Readiness: DB (and optional Redis) reachable
/health returns { "status": "healthy", "timestamp": "..." }. /health/ready returns 200 when dependencies are OK, 503 otherwise.
Errors return JSON with a detail field (string or array of validation errors). Use it to show messages or retry logic.
Retry-After if present.{
"detail": "Reminder 99 not found"
}Requests are limited per identity (user or API key) per minute. Defaults: 100 req/min per user, 60 req/min per API key (configurable via RATE_LIMIT_PER_USER_PER_MIN, RATE_LIMIT_PER_API_KEY_PER_MIN). When exceeded, the API returns 429 Too Many Requests. Use Retry-After when present. Rate limiting is Redis-backed in production; in-memory fallback when Redis is not set.
curl -X POST "https://api.loadflowlogistics.com/v1/reminders" \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{"name":"Insurance","email":"you@example.com","expires_on":"2026-12-31","enabled":true}'curl -H "X-API-Key: YOUR_API_KEY" "https://api.loadflowlogistics.com/v1/reminders"
const res = await fetch("https://api.loadflowlogistics.com/v1/reminders", {
headers: { "Authorization": "Bearer " + token }
});
const reminders = await res.json();