Get Nearby Vehicles
curl --request POST \
--url https://api.telemax.com.au/api/GetNearest \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telemax.com.au/api/GetNearest"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telemax.com.au/api/GetNearest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telemax.com.au/api/GetNearest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.telemax.com.au/api/GetNearest"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.telemax.com.au/api/GetNearest")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/api/GetNearest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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
}
]
}{
"type": "AUTHENTICATION",
"code": "TOKEN_EXPIRED",
"description": "The access token has expired. Request a new token using /api/authentication/token/user or /api/authentication/token/api-key.",
"requestId": "req_7f3a2b1c",
"docUrl": "https://docs.telemax.com.au/errors#token-expired"
}{
"type": "AUTHORIZATION",
"code": "COMPANY_ACCESS_DENIED",
"description": "Your token does not grant access to company 99. Ensure you are using a token issued for this company.",
"requestId": "req_4a1d9e2f",
"docUrl": "https://docs.telemax.com.au/errors#company-access-denied"
}{
"type": "NOT_FOUND",
"code": "VEHICLE_NOT_FOUND",
"description": "Vehicle with ID 9999 was not found.",
"requestId": "req_2b8c1a5d",
"docUrl": "https://docs.telemax.com.au/errors#not-found"
}{
"type": "RATE_LIMIT",
"code": "RATE_LIMIT_EXCEEDED",
"description": "Too many requests. Wait 30 seconds before retrying.",
"requestId": "req_6d2f8b4a",
"docUrl": "https://docs.telemax.com.au/errors#rate-limit"
}{
"type": "SERVER_ERROR",
"code": "INTERNAL_ERROR",
"description": "An unexpected error occurred. Please try again or contact support with the requestId.",
"requestId": "req_1e5a3c7d",
"docUrl": "https://docs.telemax.com.au/errors#server-error"
}Companies & fleet
Nearest vehicles
Find vehicles nearest to a coordinate, with optional count and radius.
POST
/
api
/
GetNearest
Get Nearby Vehicles
curl --request POST \
--url https://api.telemax.com.au/api/GetNearest \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telemax.com.au/api/GetNearest"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telemax.com.au/api/GetNearest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telemax.com.au/api/GetNearest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.telemax.com.au/api/GetNearest"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.telemax.com.au/api/GetNearest")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/api/GetNearest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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
}
]
}{
"type": "AUTHENTICATION",
"code": "TOKEN_EXPIRED",
"description": "The access token has expired. Request a new token using /api/authentication/token/user or /api/authentication/token/api-key.",
"requestId": "req_7f3a2b1c",
"docUrl": "https://docs.telemax.com.au/errors#token-expired"
}{
"type": "AUTHORIZATION",
"code": "COMPANY_ACCESS_DENIED",
"description": "Your token does not grant access to company 99. Ensure you are using a token issued for this company.",
"requestId": "req_4a1d9e2f",
"docUrl": "https://docs.telemax.com.au/errors#company-access-denied"
}{
"type": "NOT_FOUND",
"code": "VEHICLE_NOT_FOUND",
"description": "Vehicle with ID 9999 was not found.",
"requestId": "req_2b8c1a5d",
"docUrl": "https://docs.telemax.com.au/errors#not-found"
}{
"type": "RATE_LIMIT",
"code": "RATE_LIMIT_EXCEEDED",
"description": "Too many requests. Wait 30 seconds before retrying.",
"requestId": "req_6d2f8b4a",
"docUrl": "https://docs.telemax.com.au/errors#rate-limit"
}{
"type": "SERVER_ERROR",
"code": "INTERNAL_ERROR",
"description": "An unexpected error occurred. Please try again or contact support with the requestId.",
"requestId": "req_1e5a3c7d",
"docUrl": "https://docs.telemax.com.au/errors#server-error"
}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
number
required
Latitude in degrees.
number
required
Longitude in degrees.
integer
required
Company id to scope vehicles.
integer
Max results (default: unlimited in practice via
int.MaxValue when omitted).integer
Max distance filter (default: unlimited when omitted).
Response
200 OK —NearestVehiclesDto
| Field | Type | Description |
|---|---|---|
| Status | string | e.g. Ok |
| result | array | Each item: vehicle (PositionDto), distance (rounded), realDistance (meters) |
Error responses
| Status | Meaning |
|---|---|
| 401 | Company not in tree or error object { "error": "Company {compId} not found" } |
Authorizations
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
Standard and must keep as it is.
Bearer your_token
Query Parameters
Latitude
Longitude
Company ID.
Number of vehicles to get.
Search radius in metres (not kilometres). Example: 5000 = 5 km radius. Omit to search without a radius constraint.
Was this page helpful?