Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ShohjahonSohibov/repo-for-agent/llms.txt

Use this file to discover all available pages before exploring further.

UpdaterAgent integrates with multiple Electronic Logging Device (ELD) providers to import real-time vehicle GPS positions. Position data feeds the hybrid routing engine, which calculates ETAs, detects delays, and updates load statuses for active trips. Each company selects one ELD provider; the system handles polling, credential management, and data retention automatically.

Supported providers

ProviderAuth methodPosition data included
Zippyx-api-key + provider-token headersLatitude, longitude, rotation, timestamp
SamsaraBearer token (API key)Vehicle location, speed, mileage
UTrackinOAuth 2.0 with token refreshVehicle position, driver name
LevelELDAPI credentialsELD position data
OnTimeLogsAPI credentialsOnTime driver logs

How position data is imported

The LogisticsCoreImportJob (also referred to as eld-import:positions) runs every 25 minutes via Hangfire. For each company with an active ELD configuration:
  1. Retrieve ELD credentials from the company’s ELD settings.
  2. Call the provider API to get current unit positions.
  3. Filter out units with no coordinates.
  4. Map each unit to an EldPosition record and persist to the database.
  5. Trigger ETA recalculation for loads with active drivers.
// EldPosition entity fields populated per position import
public class EldPosition
{
    public long TruckId { get; set; }       // Matched by VIN against local Truck records
    public double Latitude { get; set; }
    public double Longitude { get; set; }
    public double? Speed { get; set; }
    public int? Heading { get; set; }
    public string? VehicleId { get; set; }
    public DateTime RecordedAt { get; set; }
    public EldPositionSource Source { get; set; }  // Zippy, Samsara, UTrackin, ...
    public string? TripStatus { get; set; }         // OnSchedule, Behind, Critical
    public long? OsrmRemainingDuration { get; set; }
    public double? DeviationPct { get; set; }
}

Data retention

ELD positions are kept in a 72-hour rolling window. The ClearUnnecessaryPositionsAsync routine removes records older than three days to control database growth. Historical trend queries can use the retained window for per-truck deviation analysis.

Configuration per company

ELD credentials are stored and managed per company via the ELD settings API:
MethodEndpointDescription
POST/api/eld-settingsCreate ELD settings for a company
PUT/api/eld-settings/{companyId}Update existing ELD settings
GET/api/eld-settings/{companyId}Retrieve current ELD settings
POST/api/eld-settings/test-connectionVerify credentials against the provider
API keys and secret tokens are encrypted at rest. USDOT numbers and non-sensitive identifiers are stored as plain text.
If a company has no ELD settings configured, the import job skips it silently. No error is raised for unconfigured companies.

Provider-specific setup

Zippy authenticates using two custom headers on every request. Credentials are issued directly by Zippy.Required credentials:
FieldHeader sentEncrypted at rest
ApiKeyx-api-keyYes
ProviderTokenprovider-tokenYes
UsdotPath parameter in URLNo
Create ELD settings for Zippy:
POST /api/eld-settings
{
  "companyId": 1,
  "zippySetting": {
    "apiKey": "your-api-key",
    "providerToken": "your-provider-token",
    "usdot": "1234567"
  }
}
The broker calls GET /api/v2/units-by-usdot/{usdot} against https://read.zippyeld.com/. Units without coordinates in the response are ignored.Example response from Zippy:
{
  "units": [
    {
      "truck_number": "114195",
      "vin": "3AKJHHDRXSSVT2519",
      "id": 3897,
      "coordinates": {
        "lat": 39.41371536254883,
        "lng": -84.15188598632812
      },
      "rotation": 303,
      "timestamp": "2026-02-17T12:57:57.896Z"
    }
  ]
}

Multiple ELD providers per deployment

A single UpdaterAgent deployment can serve companies on different ELD platforms simultaneously. The import job iterates over all companies, reads each company’s configured provider from EldSetting, and dispatches to the correct broker:
  • Company A → Zippy broker
  • Company B → Samsara broker
  • Company C → UTrackin broker
Companies with no ELD configuration are skipped. The ELD provider selection is changed by updating the company’s ELD settings via PUT /api/eld-settings/{companyId}.

Build docs developers (and LLMs) love