diff --git a/api/src/routes/dot-lookup.ts b/api/src/routes/dot-lookup.ts index 6d042ff..c7f3271 100644 --- a/api/src/routes/dot-lookup.ts +++ b/api/src/routes/dot-lookup.ts @@ -98,12 +98,16 @@ router.get("/api/v1/dot/lookup", async (req, res) => { C: "Cancelled", }; const statusLabel = statusLabels[statusCode] || statusCode; + const isInactive = statusCode === "I" || statusCode === "S" || statusCode === "C"; + const effectiveStatus = allowed && !isInactive ? "green" : isInactive && allowed ? "yellow" : "red"; checks.push({ id: "operating_status", label: "Operating Status", - status: allowed ? "green" : "red", - detail: allowed - ? `Authorized to operate (${statusLabel}).` + status: effectiveStatus, + detail: effectiveStatus === "green" + ? `Active and authorized to operate.` + : effectiveStatus === "yellow" + ? `USDOT status is ${statusLabel}, but FMCSA still shows as authorized. This may indicate your registration needs to be updated or reactivated. Contact FMCSA at (800) 832-5660 if this is incorrect.` : `NOT authorized to operate — ${statusLabel}. ${ statusCode === "I" ? "This USDOT number is inactive. You may need to reactivate it before operating." : statusCode === "N" ? "This carrier is not authorized. Operating authority may be required."