Base URL
https://api.lunaeld.usIntegration Flow
Endpoints
/api/web/v1/terminal/create-api-key/Authenticate with username/password and receive an API key for subsequent requests.
/api/web/v1/terminal/coordinates/Vehicle GPS coordinates + location history. Filterable by VIN, vehicle ID, and date range.
/api/web/v1/terminal/company/Company profile: name, USDOT, timezone, phone.
/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
| Parameter | Type | Description |
|---|---|---|
username* | string | Account email / username |
password* | string | Account password |
* Required
Example Request
curl -X POST "https://api.lunaeld.us/api/web/v1/terminal/create-api-key/" \
-H "Content-Type: application/json" \
-d '{"username": "managers@gmail.com", "password": "your_password"}'Example Response
{
"guid": "56806616-a27c-4516-bd31-e656792ab138",
"key": "managers@gmail.com:company-name-9bed2373db6e6cd6e1b234",
"company": "d5eb6f53-87ef-4195-b7c9-54ea4adeb7cc",
"client": "managers@gmail.com"
}Response Fields
| Field | Type | Description |
|---|---|---|
guid | string (UUID) | Unique identifier for this API key |
key | string | API key to pass as api_key in subsequent requests |
company | string (UUID) | Company unique identifier associated with this key |
client | string | Username / email of the authenticated user |
/api/web/v1/terminal/coordinates/Returns current GPS position, driver assignment, and location history for fleet vehicles. Provide start_date and end_date to get location_history — a list of historical GPS coordinates within that window.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
api_key* | string | API key from create-api-key endpoint |
vin | string | Filter to a single vehicle by VIN |
vehicle_id | string | Filter to a single vehicle by power unit number |
start_date | datetime | Start of history window — format: YYYY-MM-DD HH:MM:SS |
end_date | datetime | End of history window — format: YYYY-MM-DD HH:MM:SS |
* Required. Omit vin/vehicle_id to get all vehicles.
Example Requests
All vehicles, current position only:
curl "https://api.lunaeld.us/api/web/v1/terminal/coordinates/?api_key=your_api_key"Single vehicle with trip history for a date range:
curl "https://api.lunaeld.us/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
[
{
"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
| Field | Type | Description |
|---|---|---|
vehicle_id | string | Vehicle power unit number |
make | string | Manufacturer |
model | string | Vehicle model |
year | number | Manufacturing year |
vin | string | Vehicle Identification Number |
odometer | number | Total mileage in miles |
start_point | string | Human-readable current location |
speed | number | Current speed in mph |
coordinates | array | Latest GPS fix — see below |
driver | object | Currently assigned driver — see below |
location_history | array | Historical GPS points within start_date–end_date — see below |
coordinates[ ] object
| Field | Type | Description |
|---|---|---|
latitude | string | Latitude in decimal degrees |
longitude | string | Longitude in decimal degrees |
associated_date | string (ISO 8601) | UTC timestamp of this GPS reading |
driver object
| Field | Type | Description |
|---|---|---|
username | string | Driver login username |
first_name | string | First name |
last_name | string | Last name |
phone_number | string | Contact phone number |
location_history[ ] object
| Field | Type | Description |
|---|---|---|
latitude | number | Latitude in decimal degrees |
longitude | number | Longitude in decimal degrees |
associated_date | string (ISO 8601) | UTC timestamp of this GPS reading |
/api/web/v1/terminal/company/Returns the company profile associated with the given API key: name, DOT number, timezone, and contact info.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
api_key* | string | API key from create-api-key endpoint |
* Required
Example Request
curl "https://api.lunaeld.us/api/web/v1/terminal/company/?api_key=your_api_key"Example Response
{
"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
| Field | Type | Description |
|---|---|---|
guid | string (UUID) | Company unique identifier |
name | string | Company legal name |
phone_number | string | Company contact phone |
usdot | string | US Department of Transportation number |
avatar | string | null | Company logo URL, or null if not set |
home_terminal_timezone | string | Timezone of the company home terminal (e.g. US/Central, US/Eastern) |
