Upload an annual inspection
Upload a federal (FHWA) annual inspection report, also called smart upload. DPB reads the report with AI, files it on the right vehicle or trailer, and sets the expiry date from the inspection date printed on it. This endpoint only handles annual inspections. For other documents, use Create a document.
Send only the file and DPB finds the unit and the inspection date in the report, and sets the expiry to one year after that date. Send unit_no to choose the unit yourself; the report is still read for the inspection date. Send expiry_frame to use a different expiry window.
The document's own date is always the upload day. If the report can't be read, the file is still saved and the response says so, so you can finish it in the dashboard.
Authorization
Your company's API key.
Request body
multipart/form-data · required
The inspection report: PDF, PNG, JPG, JPEG, TIFF or TIF.
Document description. Defaults to Annual Inspection.
Unit number to file the report on. When sent, the unit isn't read from the report. Must match the unit number in DPB exactly, including upper and lower case. If no active unit has that number, the request is rejected and nothing is saved.
Use with unit_no when a vehicle and a trailer share the same unit number.
One of: Vehicle Trailer
Expiry window counted from the inspection date printed on the report. Defaults to 1 yr.
One of: 3 mo 6 mo 1 yr 2 yr 3 yr 4 yr 5 yr
Response
The new document's id.
Unit number of the vehicle or trailer the report was filed on.
One of: Vehicle Trailer
VIN of the unit.
Inspection date read from the report.
Inspection date plus the expiry window.
A short summary of what happened.
How the unit was matched and the expiry was set.
Only when the report was saved but couldn't be read, for example Analysis timeout.
Other responses
{
"success": true,
"document_id": 12345,
"message": "Annual Inspection document saved but data extraction failed",
"error": "Analysis timeout"
}{
"file": [
"Unsupported file format. Supported formats: .png, .jpg, .jpeg, .pdf, .tiff, .tif"
]
}unit_no. Nothing was saved.{
"error": "No active Trailer found with unit no 'T1001'."
}{
"expiry_frame": [
"\"180 days\" is not a valid choice."
]
}{
"error": "Failed to process Annual Inspection document"
}