Skip to main content
POST
/
api
/
GetNearest
Get Nearby Vehicles
curl --request POST \
  --url https://api.telemax.com.au/api/GetNearest \
  --header 'Authorization: Bearer <token>'
{
  "Status": "OK",
  "result": [
    {
      "vehicle": {
        "Id": 1305200,
        "UtcTime": "2024-01-15T10:30:00Z",
        "UserTime": "2024-01-15T12:30:00+02:00",
        "UserTimeFormated": "15/01/2024 12:30:00",
        "Lat": 40.7128,
        "Lng": -74.006,
        "Speed": 65.5,
        "Course": 90,
        "Ignition": true,
        "Odometer": 125000.5,
        "Voltage": 12.6,
        "Fatigue": "PT2H30M",
        "EngineHours": 30.5,
        "SatSignal": "Good",
        "Satellites": 8,
        "ConnectionStrengh": "Excellent",
        "DeviceId": 12345,
        "IgnitionTime": 3600.5,
        "DeviceName": "Fleet Vehicle 001",
        "IMEI": "123456789012345",
        "Vin": "1HGBH41JXMN109186",
        "StartMovingTime": "2024-01-15T08:00:00Z",
        "StartMovingTimeUser": "2024-01-15T10:00:00+02:00",
        "LastMovementTime": "2024-01-15T16:00:00Z",
        "LastMovementTimeUser": "2024-01-15T18:00:00+02:00",
        "LastMovementTimeUserFormated": "15/01/2024 18:00:00",
        "DrivingTime": 3000,
        "Driver": "John Smith",
        "FuelLevel": 75,
        "DTC": "P0301",
        "IsDoorLocked": true,
        "Address": "123 Main St, New York, NY 10001",
        "EngineEnabled": true,
        "timeElapsed": 0.125,
        "startedTime": "2024-01-15T10:30:00Z",
        "endTime": "2024-01-15T10:30:01Z"
      },
      "distance": "10500.0,",
      "realDistance": 10500
    }
  ]
}

Overview

Finds vehicles with recent snapshots nearest to a coordinate, optionally limited by count and radius (meters; implementation rounds distance to 100 m buckets for sorting/filtering).
A V2 version of this endpoint is available: Nearest vehicles. New integrations should prefer V2.

Endpoint

POST /api/GetNearest

Query parameters

lat
number
required
Latitude in degrees.
lng
number
required
Longitude in degrees.
compId
integer
required
Company id to scope vehicles.
num
integer
Max results (default: unlimited in practice via int.MaxValue when omitted).
radius
integer
Max distance filter (default: unlimited when omitted).

Response

200 OKNearestVehiclesDto
FieldTypeDescription
Statusstringe.g. Ok
resultarrayEach item: vehicle (PositionDto), distance (rounded), realDistance (meters)

Error responses

StatusMeaning
401Company not in tree or error object { "error": "Company {compId} not found" }

Authorizations

Authorization
string
header
required

JWT Bearer token obtained from POST /api/authentication/token/user or POST /api/authentication/token/api-key.

Lifetime: ~24 hours (86,399 seconds). Cache the token and reuse it. Re-authenticate 5 minutes before expiry.

Scoping:

  • User tokens are scoped to a single company.
  • API key tokens may restrict access to a vehicle allowlist and/or action set (see token claims).

No refresh endpoint — re-authenticate with your credentials when the token expires.

Headers

Content-Type
string

Standard and must keep as it is.

Authorization
string
required

Bearer your_token

Query Parameters

lat
number
required

Latitude

lng
number
required

Longitude

compId
integer
required

Company ID.

num
integer

Number of vehicles to get.

radius
number

Search radius in metres (not kilometres). Example: 5000 = 5 km radius. Omit to search without a radius constraint.

Response

Successful response with array of vehicle records and distances

Status
string
Example:

"OK"

result
object[]