Skip to main content

Overview

The Tracking Backend is a FastAPI-based service that provides real-time vehicle, trailer, and driver tracking for the Hemut Transportation Management System (TMS).

Key Capabilities

  • Real-time Location Tracking: Poll and stream vehicle, trailer, and driver locations via Server-Sent Events (SSE)
  • Movement Management: Sync and query shipment movements from McLeod TMS
  • Driver Management: Track driver locations, HOS (Hours of Service), and profiles
  • Tractor Operations: Manage tractor-to-vehicle mappings and fault codes
  • AI Chat Interface: Natural language queries powered by Google Gemini

Base URL

https://api.hemut.com

Authentication

Most endpoints require authentication via API keys passed in headers. Contact your administrator for API credentials.

Data Flow Architecture

The backend integrates with multiple external systems:
SystemPurpose
Terminal APIELD provider aggregation (Motive, Samsara, Geotab) for vehicle/trailer/driver locations
McLeod TMS APIMovement and driver data synchronization
Motive APIFault code retrieval for tractors
Mapbox APIETA calculations with traffic data
Google GeminiAI-powered natural language chat

Response Format

All endpoints return JSON responses. Successful responses typically include:
{
  "dataSource": "db",
  "items": [...],
  "itemsCount": 10
}
Error responses follow this format:
{
  "detail": "Error description"
}

Real-time Updates (SSE)

For real-time data, use the SSE (Server-Sent Events) endpoints:
  • /stream/locations - Vehicle locations
  • /api/drivers/stream - Driver updates
  • /api/trailers/stream - Trailer locations
These endpoints provide continuous updates without polling.