curl --request GET \
--url https://api.telemax.com.au/v2/api/companies/{id}/vehicles/nearest \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telemax.com.au/v2/api/companies/{id}/vehicles/nearest"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telemax.com.au/v2/api/companies/{id}/vehicles/nearest', 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/v2/api/companies/{id}/vehicles/nearest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/v2/api/companies/{id}/vehicles/nearest"
req, _ := http.NewRequest("GET", 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.get("https://api.telemax.com.au/v2/api/companies/{id}/vehicles/nearest")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/companies/{id}/vehicles/nearest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"vehicle": {
"utcTime": "2026-04-28T06:14:19",
"userTime": "2026-04-28T16:14:19",
"userTimeFormatted": "28/04/2026 04:14:19 PM",
"lat": -33.8712,
"lng": 151.2065,
"speed": 0,
"course": 142,
"ignition": false,
"odometer": 45321.2,
"voltage": 12.6,
"fatigue": "00:26:11.5268750",
"engineHours": 0,
"satelliteCoverage": "Excellent",
"satelliteCoverageRawValue": 12,
"networkCoverage": "Fair",
"networkCoverageRawValue": 18,
"deviceId": 88421,
"ignitionTime": 1590,
"deviceName": "Delivery Van 07",
"imei": "353148090123456",
"vin": "1HGBH41JXMN109186",
"startMovingTime": "2026-04-28T05:22:31",
"startMovingTimeUser": "2026-04-28T15:22:31",
"lastMovementTime": "2026-04-28T05:48:05",
"lastMovementTimeUser": "2026-04-28T15:48:05",
"lastMovementTimeUserFormatted": "28/04/2026 03:48:05 PM",
"drivingTime": 3108,
"fuelLevel": 64,
"fuelVolume": 51.2,
"batteryLevel": null,
"chargerPower": null,
"chargingEnergy": null,
"batteryRange": null,
"isDoorLocked": true,
"address": "14, George St, Haymarket, Sydney, NSW, AUS",
"engineEnabled": true,
"timeElapsed": 245.12,
"startedTime": "2026-04-28T06:14:22",
"endTime": "2026-04-28T06:14:22",
"isOnline": true
},
"distance": 0,
"realDistance": 0.0036878
}
],
"totalResults": 2,
"lastResultIndex": 2,
"currentPage": 1,
"numberOfPages": 1
}Nearest vehicles
Returns the vehicles mapped to a company with their distance, in degrees, from a coordinate.
curl --request GET \
--url https://api.telemax.com.au/v2/api/companies/{id}/vehicles/nearest \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telemax.com.au/v2/api/companies/{id}/vehicles/nearest"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telemax.com.au/v2/api/companies/{id}/vehicles/nearest', 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/v2/api/companies/{id}/vehicles/nearest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/v2/api/companies/{id}/vehicles/nearest"
req, _ := http.NewRequest("GET", 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.get("https://api.telemax.com.au/v2/api/companies/{id}/vehicles/nearest")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/companies/{id}/vehicles/nearest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"vehicle": {
"utcTime": "2026-04-28T06:14:19",
"userTime": "2026-04-28T16:14:19",
"userTimeFormatted": "28/04/2026 04:14:19 PM",
"lat": -33.8712,
"lng": 151.2065,
"speed": 0,
"course": 142,
"ignition": false,
"odometer": 45321.2,
"voltage": 12.6,
"fatigue": "00:26:11.5268750",
"engineHours": 0,
"satelliteCoverage": "Excellent",
"satelliteCoverageRawValue": 12,
"networkCoverage": "Fair",
"networkCoverageRawValue": 18,
"deviceId": 88421,
"ignitionTime": 1590,
"deviceName": "Delivery Van 07",
"imei": "353148090123456",
"vin": "1HGBH41JXMN109186",
"startMovingTime": "2026-04-28T05:22:31",
"startMovingTimeUser": "2026-04-28T15:22:31",
"lastMovementTime": "2026-04-28T05:48:05",
"lastMovementTimeUser": "2026-04-28T15:48:05",
"lastMovementTimeUserFormatted": "28/04/2026 03:48:05 PM",
"drivingTime": 3108,
"fuelLevel": 64,
"fuelVolume": 51.2,
"batteryLevel": null,
"chargerPower": null,
"chargingEnergy": null,
"batteryRange": null,
"isDoorLocked": true,
"address": "14, George St, Haymarket, Sydney, NSW, AUS",
"engineEnabled": true,
"timeElapsed": 245.12,
"startedTime": "2026-04-28T06:14:22",
"endTime": "2026-04-28T06:14:22",
"isOnline": true
},
"distance": 0,
"realDistance": 0.0036878
}
],
"totalResults": 2,
"lastResultIndex": 2,
"currentPage": 1,
"numberOfPages": 1
}Overview
Returns the vehicles mapped to the specified company with their distance from a given coordinate. Like Fleet last positions, it does not include sub-company vehicles unless they are also mapped to this company.realDistance is the straight-line distance between the two coordinates in degrees of latitude and longitude — there is no road routing, and the distortion grows with latitude. distance is realDistance rounded to a multiple of 100, so it is 0 whenever the point is within 50° of the vehicles. As a result:radiusis compared with the roundeddistance: with a nearby point, anyradiusof 1 or more keeps every vehicle that has a position, and aradiusof 0 or less returns nothing.- Results are ordered by
distance, so within a bucket (in practice, all of them) the order is not by nearness. Paging follows that order. numhas no default cap, and it keeps the first N results in that order — not the N nearest.latandlngare optional; omitting them measures from (0, 0), which gives Australian vehicles adistanceof 100 or 200.- Vehicles with no stored position are included at (0, 0). From an Australian point they fall in the 100 or the 200 bucket depending on the point (100 from Perth, Adelaide or Darwin; 200 from Sydney or Brisbane), so a
radiusof up to 100 always drops them; from (0, 0) they sort first.
vehicle.lat and vehicle.lng, ignoring vehicles at 0/0.Endpoint
GET /v2/api/companies/{id}/vehicles/nearest
Path parameters
Query parameters
0.0.radius filter. No limit when omitted.distance (degrees — see the warning above): vehicles with distance at or above radius are excluded. No limit when omitted.Response
200 OK —PagedListResult<NearestPointResultItemDto>
Each item in the paginated items array:
| Field | Type | Description |
|---|---|---|
| vehicle | object | Full PositionDto for the vehicle — see PositionDto fields; the rows marked “list, fleet, nearest” apply |
| distance | number | realDistance rounded to a multiple of 100 (degrees) |
| realDistance | number | Planar distance between the reference point and the vehicle, in degrees |
Error responses
| Status | Meaning |
|---|---|
| 401 | Missing, invalid or expired bearer token (INVALID_CREDENTIALS) |
| 403 | The API key lacks this endpoint’s permission (INVALID_SCOPE), or the company is suspended (CompanySuspended) — see 403 Forbidden |
| 404 | Company not found or not in caller’s accessible hierarchy |
curl "https://api.telemax.com.au/v2/api/companies/12/vehicles/nearest?lat=-33.8688&lng=151.2093&page=1&pageSize=50" \
-H "Authorization: Bearer <token>"
Authorizations
JWT Bearer token obtained from POST /v2/api/authentication/token/api-key.
Lifetime: ~24 hours (86,399 seconds). Cache the token and reuse it. Re-authenticate 5 minutes before expiry.
Scoping: API key tokens are scoped by the key's company and its action set; see Token scoping.
No refresh endpoint — re-authenticate with your API key when the token expires.
Path Parameters
Query Parameters
Latitude of the reference point. Optional; defaults to 0.
Longitude of the reference point. Optional; defaults to 0.
Maximum number of vehicles to return, applied after the radius filter. No limit when omitted.
Upper bound on the rounded distance, which is in degrees (not metres): vehicles with distance at or above radius are excluded. No limit when omitted.
Response
Successful response
Was this page helpful?