Terminal Integration API

NEW ELD WORLD endpoints for withterminal.com

Base URL

https://mystage.neweldworld.com

Authentication

Get an API key from POST /terminal/create-api-key/, then pass it as a query parameter on every request:

?api_key=your_api_key

Integration Flow

  1. 1
    Create API Key
    POST /terminal/create-api-key/ with username + password to get your api_key
  2. 2
    Fetch Company
    GET /terminal/company/ to retrieve company profile data
  3. 3
    Get Coordinates
    GET /terminal/coordinates/ for live vehicle positions and trip history
  4. 4
    Pull History
    GET /terminal/history/ for up to 6 months of GPS points and engine on/off events, page by page

Endpoints

Create API key#

POST/api/web/v1/terminal/create-api-key/

Authenticates a user and returns an API key. Use the returned key as the api_key parameter in all subsequent requests.

Request Body

usernamerequiredstring
Account email / username
passwordrequiredstring
Account password

Example Request

bash
curl -X POST "https://mystage.neweldworld.com/api/web/v1/terminal/create-api-key/" \
  -H "Content-Type: application/json" \
  -d '{"username": "manager@example.com", "password": "your_password"}'

Example Response

json
{
  "guid": "00000000-0000-0000-0000-000000000002",
  "key": "manager@example.com:example-trucking-llc-0123456789abcdef012345",
  "company": "00000000-0000-0000-0000-000000000001",
  "client": "manager@example.com"
}

Response Fields

guidstring (UUID)
Unique identifier for this API key
keystring
API key to pass as api_key in subsequent requests
companystring (UUID)
Company unique identifier associated with this key
clientstring
Username / email of the authenticated user

Coordinates#

GET/api/web/v1/terminal/coordinates/

Returns current GPS position, driver assignment, and trip history for fleet vehicles. location_history lists the start point of each driving segment between start_date and end_date — the last 6 days when no dates are given. For every GPS point and engine on/off events, use /terminal/history/.

Query Parameters

api_keyrequiredstring
API key from create-api-key endpoint
vinstring
Filter to a single vehicle by VIN
vehicle_idstring
Filter to a single vehicle by power unit number
start_datedatetime
Start of the location_history window — format: YYYY-MM-DD HH:MM:SS (UTC). Default: 6 days ago, 00:00 UTC
end_datedatetime
End of the location_history window — format: YYYY-MM-DD HH:MM:SS. Always extended to the end of that day (23:59:59 UTC). Default: today

Omit vin/vehicle_id to get all vehicles.

Example Requests

All vehicles, current position only:

bash
curl "https://mystage.neweldworld.com/api/web/v1/terminal/coordinates/?api_key=your_api_key"

Single vehicle with trip history for a date range:

bash
curl "https://mystage.neweldworld.com/api/web/v1/terminal/coordinates/?api_key=your_api_key&vin=YOUR_VIN_HERE&start_date=2025-08-01+04:00:00&end_date=2025-08-08+04:00:00"

Example Response

json
[
  {
    "vehicle_id": "unit001",
    "make": "PETERBILT",
    "model": "579",
    "year": 2022,
    "vin": "1XPBD49X0ND000001",
    "odometer": 124500,
    "start_point": "3.2 mi W of Nashville, TN",
    "speed": 0.0,
    "coordinates": [
      {
        "latitude": "36.16589000000000",
        "longitude": "-86.78440000000000",
        "associated_date": "2025-08-15T10:22:00.000000Z"
      }
    ],
    "driver": {
      "username": "driver01",
      "first_name": "John",
      "last_name": "Smith",
      "phone_number": "5550001234"
    },
    "location_history": [
      {
        "latitude": 36.16589000000000,
        "longitude": -86.78440000000000,
        "associated_date": "2025-08-01T07:16:32.242146Z"
      },
      {
        "latitude": 36.16589500000000,
        "longitude": -86.78441000000000,
        "associated_date": "2025-08-01T14:21:15.018615Z"
      }
    ]
  }
]

Response Fields

vehicle_idstring
Vehicle power unit number
makestring
Manufacturer
modelstring
Vehicle model
yearnumber
Manufacturing year
vinstring
Vehicle Identification Number
odometernumber
Total mileage in miles
start_pointstring
Human-readable current location
speednumber
Current speed in km/h
coordinatesarray
Latest GPS fix — see below
driverobject
Currently assigned driver — see below
location_historyarray
Start point of each driving segment within start_date–end_date (default: last 6 days) — see below

coordinates[ ] object

latitudestring
Latitude in decimal degrees
longitudestring
Longitude in decimal degrees
associated_datestring (ISO 8601)
UTC timestamp of this GPS reading

driver object

usernamestring
Driver login username
first_namestring
First name
last_namestring
Last name
phone_numberstring
Contact phone number

location_history[ ] object

latitudenumber | null
Latitude where the driving segment started
longitudenumber | null
Longitude where the driving segment started
associated_datestring (ISO 8601)
UTC time the driving segment started

History#

GET/api/web/v1/terminal/history/

Returns up to 6 months (183 days) of history for one vehicle: GPS points in location_data, thinned on the server to one point per interval seconds, and engine power-up / shut-down events in power_logs, which are never thinned. Both lists come in the same response, oldest first, and every page covers the same span of time for both.

Results are cursor-paginated — see Pagination below. The vehicle_id and vin of every vehicle your key can see come from /terminal/coordinates/.

Requests from Postman are refused with 403 — any request whose User-Agent starts with PostmanRuntime or that carries a Postman-Token header. Use curl, HTTPie or your own client, or in Postman turn off Settings → General → Send Postman Token header and set your own User-Agent.

Query Parameters

api_keyrequiredstring
API key from create-api-key endpoint
vehicle_idstring
Vehicle power unit number. On the first page vehicle_id or vin is required. If two active vehicles share a unit number, the newest one is used — prefer vin.
vinstring
Vehicle Identification Number. On the first page vehicle_id or vin is required.
start_datedatetime (ISO 8601)
Start of the window, inclusive. Default: 7 days before end_date. Anything older than 183 days is raised to that limit — the response start_date shows the window served. A value without an offset is UTC.
end_datedatetime (ISO 8601)
End of the window, inclusive. Default and maximum: the moment the first page is served. Must be after start_date.
intervalinteger
Seconds per GPS slot, 0–3600, default 60: the first point of each slot is returned, the rest are skipped. 0 returns every stored point. Power logs are never thinned.
page_sizeinteger
Maximum records per page, both lists counted together: 1–5000, default 1000. The only parameter read on every page.
cursorstring
next_cursor of the previous page, unchanged. Required on every page after the first.

With a cursor, the vehicle, window and interval come from the cursor: send only api_key, cursor and, optionally, page_size — anything else is ignored.

Example Requests

First page — last 7 days, one GPS point per minute:

bash
curl "https://mystage.neweldworld.com/api/web/v1/terminal/history/?api_key=your_api_key&vehicle_id=unit001&interval=60&page_size=1000"

First page — by VIN, from a given date until now:

bash
curl "https://mystage.neweldworld.com/api/web/v1/terminal/history/?api_key=your_api_key&vin=YOUR_VIN_HERE&start_date=2026-11-01T00:00:00Z"

Every next page — only the key and the cursor from the previous response:

bash
curl "https://mystage.neweldworld.com/api/web/v1/terminal/history/?api_key=your_api_key&cursor=NEXT_CURSOR&page_size=1000"

Dates are ISO 8601. For an offset other than Z, URL-encode the plus sign: +05:00 → %2B05:00.

Example Response

json
{
  "vehicle": {
    "vehicle_id": "unit001",
    "vin": "1XPBD49X0ND000001",
    "make": "PETERBILT",
    "model": "579",
    "year": 2022
  },
  "start_date": "2026-11-01T08:30:12.451230Z",
  "end_date": "2026-11-08T08:30:12.451230Z",
  "interval": 60,
  "next_cursor": ".eJxVjMEKgzAQRP9lz...:1v2Xk9:Qy7fN...",
  "power_logs": [
    {
      "type": "power_up",
      "start_time": "2026-11-01T11:02:07.118904Z",
      "latitude": 36.16271,
      "longitude": -86.83891,
      "odometer": 124500,
      "engine_hours": 8112.4,
      "location": "3.2 mi W of Nashville, TN",
      "driver": {
        "username": "driver01",
        "first_name": "John",
        "last_name": "Smith"
      }
    }
  ],
  "location_data": [
    {
      "start_time": "2026-11-01T11:06:41.502117Z",
      "latitude": 36.16302,
      "longitude": -86.85677,
      "odometer": 124501,
      "engine_hours": 8112.5,
      "location": "4.2 mi W of Nashville, TN",
      "speed": 38,
      "driver": {
        "username": "driver01",
        "first_name": "John",
        "last_name": "Smith"
      }
    }
  ]
}

Response Fields

vehicleobject
The vehicle served — see below
start_datestring (ISO 8601)
Start of the window actually served, after the 183-day limit
end_datestring (ISO 8601)
End of the window actually served
intervalnumber
GPS thinning in effect, in seconds
next_cursorstring | null
Send as cursor to get the next page; null when the window is fully served
power_logsarray
Engine power-up / shut-down events of this page, oldest first — see below
location_dataarray
GPS points of this page, oldest first — see below

vehicle object

vehicle_idstring
Vehicle power unit number
vinstring
Vehicle Identification Number
makestring
Manufacturer
modelstring
Vehicle model
yearnumber
Manufacturing year

power_logs[ ] object

typestring
power_up or power_down
start_timestring (ISO 8601)
UTC time of the engine event, as recorded by the ELD
latitudenumber | null
Latitude in decimal degrees; can be null on old records
longitudenumber | null
Longitude in decimal degrees; can be null on old records
odometernumber | null
Odometer in miles; 0 = no reading, null on some old records
engine_hoursnumber | null
Engine hours, one decimal; 0 = no reading, null on some old records
locationstring
e.g. "3.2 mi W of Nashville, TN"; "Nashville, TN" when the offset is unknown; "" when not geocoded
driverobject | null
Driver on the record — see below

location_data[ ] object

start_timestring (ISO 8601)
UTC time the point reached our server (the app sends no device time)
latitudenumber
Latitude in decimal degrees
longitudenumber
Longitude in decimal degrees
odometernumber
Odometer in miles; 0 = no reading
engine_hoursnumber
Engine hours, one decimal; 0 = no reading
locationstring
Same format as in power_logs
speednumber
Speed in km/h
driverobject | null
Driver on the record — see below

driver object

usernamestring
Driver login username
first_namestring
First name
last_namestring
Last name

Pagination

  1. Send the first request with api_key, vehicle_id or vin, and the window, interval and page_size you want.
  2. Save power_logs and location_data from the response.
  3. If next_cursor is null, you are done.
  4. Otherwise send api_key=…&cursor=<next_cursor> (plus page_size for a size other than 1000) and go back to step 2.
  • Short pages are normal. A page can hold fewer records than page_size — even none — and still carry a cursor. Stop only when next_cursor is null.
  • The window is fixed by the first page. end_date defaults to that moment; points that arrive later belong to the next walk.
  • Cursors are signed and expire after 30 days. A modified or expired cursor answers 400. Do not keep cursors between runs — keep end_date instead (see Keeping in Sync).
  • Retries are safe. Repeating a request with the same cursor does no harm.

Walking a 6-month window in Python:

python
import time

import requests

BASE = "https://mystage.neweldworld.com/api/web/v1/terminal/history/"

def walk(api_key, vehicle_id, **window):
    params = {"api_key": api_key, "vehicle_id": vehicle_id, "page_size": 5000, **window}
    while True:
        r = requests.get(BASE, params=params, timeout=60)
        if r.status_code == 429:
            time.sleep(int(r.headers.get("Retry-After", "5")))
            continue
        r.raise_for_status()
        page = r.json()
        yield page["power_logs"], page["location_data"]
        if not page["next_cursor"]:
            return
        params = {"api_key": api_key, "cursor": page["next_cursor"], "page_size": 5000}

for power_logs, points in walk("your_api_key", "unit001", start_date="2026-05-15T00:00:00Z"):
    save(power_logs, points)

Keeping in Sync

Store the end_date of each completed walk. Next time, request start_date=<previous end_date> and no end_date: the new window starts exactly where the last one ended and runs to now. A record whose start_time equals the boundary can appear in both runs — de-duplicate on vehicle, list and start_time if that matters.

Errors

400
Missing api_key; neither vehicle_id nor vin on the first page; unparsable date; end_date not after the effective start_date (for example, older than 183 days); interval or page_size out of range; invalid or expired cursor. Body: {"detail": "..."} or per-field errors.
401
Unknown or revoked api_key. Empty body.
403
Request sent from Postman — see the note above.
404
No such vehicle in your company, or the vehicle is inactive or not shared with integrations: {"detail": "Vehicle not found or not enabled for integration feeds."}
429
More than 300 requests a minute on one API key. Wait the number of seconds in the Retry-After header.

Good to Know

  • One vehicle per request. For a fleet, take the vehicles from /terminal/coordinates/ and walk them one by one, or a few at a time — the 300 requests/minute limit is per API key.
  • At most 183 days back and at most 5,000 records per page.
  • GPS time is receipt time: a point's start_time is when it reached our server. Points the app uploads late (after being offline) carry the late time.
  • Power logs come from the driver's current log: later log corrections can add, move or remove events.
  • At interval=60 a 6-month pull is at most ~264,000 points per vehicle; interval=0 can return millions — use it only when you need every point.
  • Units: speed in km/h, odometer in miles, engine hours in hours, coordinates in WGS-84 decimal degrees, all times in UTC.

Company#

GET/api/web/v1/terminal/company/

Returns the company profile associated with the given API key: name, DOT number, timezone, and contact info.

Query Parameters

api_keyrequiredstring
API key from create-api-key endpoint

Example Request

bash
curl "https://mystage.neweldworld.com/api/web/v1/terminal/company/?api_key=your_api_key"

Example Response

json
{
  "guid": "00000000-0000-0000-0000-000000000001",
  "name": "Example Trucking LLC",
  "phone_number": "+1 (555) 000-1234",
  "usdot": "0000001",
  "avatar": null,
  "home_terminal_timezone": "US/Central"
}

Response Fields

guidstring (UUID)
Company unique identifier
namestring
Company legal name
phone_numberstring
Company contact phone
usdotstring
US Department of Transportation number
avatarstring | null
Company logo URL, or null if not set
home_terminal_timezonestring
Timezone of the company home terminal (e.g. US/Central, US/Eastern)

HTTP Status Codes

200
OK
Request successful
400
Bad Request
Invalid parameter, body or cursor
401
Unauthorized
Unknown or revoked api_key
403
Forbidden
Request sent from Postman (history endpoint)
404
Not Found
Vehicle not found or not shared (history endpoint)
429
Too Many Requests
Over 300 requests a minute on one key (history endpoint)
500
Server Error
Internal error, try again later