added

Document Upload Endpoints Now Available in Public API

What’s New?

We added a new set of document upload endpoints that allow attaching files directly to Carriers, Drivers, Loads, Trailers, Trips, and Trucks. Each endpoint supports multipart/form-data uploads with validation on file size and document type.

📂File uploads up to 25 MB (PDF, JPEG, PNG)

🧾 Entity-specific validation → Each entity supports only its own DocumentType list (e.g., Carrier Agreement, Driver License, Proof of Deliver)

🗂️ Standardized metadata → Every upload returns AttachmentPath, AttachmentType, AttachmentSize, UploadedAt, and parent entity reference

🔑 Authentication & scopes → Requires valid Bearer token with read/update scope for the target entity


What Changed?

  • New endpoints:

    • POST /api/p/v{version}/carriers/{carrierId}/document
    • POST /api/p/v{version}/drivers/{driverId}/document
    • POST /api/p/v{version}/loads/{loadNumber}/document
    • POST /api/p/v{version}/trailers/{trailerId}/document
    • POST /api/p/v{version}/trips/{tripId}/document
    • POST /api/p/v{version}/trucks/{truckId}/document
  • Validation by entity:

    • Carrier→ Carrier Agreement, Carrier Application, Carrier Authority, Carrier Onboarding, Other Documents
    • Driver→ License, Drug Test, Medical (suggested rename: Medical Card), W9 Form, Operating Authority, Other Documents
    • Truck/Trailer → Motor Vehicle Record, Vehicle Image, Inspection Certificate, Certificate of Insurance (COI), Insurance Certificate, Other Documents
    • Loads→ Customer Rate and Load Confirmation, Customer Load Confirmation, Customer Rate Confirmation, Signed Customer Rate Confirmation, Proof of Delivery, Proof of Pickup, Bill of Lading, Shipping Labels
    • Trips → Proof of Delivery (POD), Bill of Lading (BOL), Carrier Rate Confirmation, Load Manifest, Trip Report, Temperature Log, Proof of Pickup, Scale Ticket, Notice of Assignment (NOA), Shipping Labels
  • Error handling standardized:

    400 invalid DocumentType or file too large

    401 invalid/expired token

    403 missing scopes

    404 parent not found/deleted

    415 unsupported content type

    429 rate limit exceeded


Example — Upload Document to Load

curl -X POST "{{host}}/api/p/v1/loads/1006321/document" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: multipart/form-data" \
  -F "File=@Test_File.pdf" \
  -F "DocumentType=Bill of Lading"

Response:

{
  "id": "4b5c38bd-005e-4903-a4ee-45ca5e86411a",
  "AttachmentPath": "DOC-1757343192.jpeg",
  "AttachmentType": "Bill of Lading",
  "AttachmentSize": 5245329,
  "UploadedAt": "2025-09-08T14:53:12Z",
  "ParentId": "1006321",
  "ParentType": "Load"
}

Why?

This enhancement provides a standardized and secure way to upload and manage documents across all core entities. By enforcing file size and type validation, plus entity-specific DocumentType rules, we improve compliance and data integrity. These endpoints also unlock automation use cases, such as auto-attaching Proof of Delivery, Insurance Certificates, or Rate Confirmations during operational workflows.