curl --request GET \
--url https://api.telemax.com.au/v2/api/vehicles/{id}/odometer \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telemax.com.au/v2/api/vehicles/{id}/odometer"
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/vehicles/{id}/odometer', 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/vehicles/{id}/odometer",
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/vehicles/{id}/odometer"
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/vehicles/{id}/odometer")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/vehicles/{id}/odometer")
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{
"odometerSource": "GPS",
"odometerValue": 154200.5
}Get odometer
Returns the vehicle’s odometer source and the odometer reading reported by Flespi.
curl --request GET \
--url https://api.telemax.com.au/v2/api/vehicles/{id}/odometer \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telemax.com.au/v2/api/vehicles/{id}/odometer"
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/vehicles/{id}/odometer', 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/vehicles/{id}/odometer",
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/vehicles/{id}/odometer"
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/vehicles/{id}/odometer")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/vehicles/{id}/odometer")
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{
"odometerSource": "GPS",
"odometerValue": 154200.5
}Overview
Returns the vehicle’s odometer source and the odometer reading read live from Flespi telemetry. For the platform’s own odometer, useodometer from Last position; Flespi’s value comes from a different pipeline and may differ.
Endpoint
GET /v2/api/vehicles/{id}/odometer
Path parameters
deviceId).Response
200 OK — returns the odometer source and Flespi’s live mileage reading.| Field | Type | Description |
|---|---|---|
odometerSource | string | CAN when the latest odometer reading came from the CAN bus, otherwise GPS (including when the source is unknown). Always present. |
odometerValue | number | null | Mileage (km) read live from Flespi: can.vehicle.mileage when odometerSource is CAN, otherwise Flespi’s vehicle.mileage. Always null for vehicles not on the Flespi data provider, and also null when Flespi has no value or the call fails. |
{
"odometerSource": "GPS",
"odometerValue": 154200.5
}
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 | Vehicle not found, or not in your companies |
curl "https://api.telemax.com.au/v2/api/vehicles/88421/odometer" \
-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
Response
200 OK — Odometer source and Flespi's live mileage reading.
CAN when the latest odometer reading came from the CAN bus, otherwise GPS (including when the source is unknown). Always present.
CAN, GPS Mileage (km) read live from Flespi: can.vehicle.mileage when odometerSource is CAN, otherwise Flespi's vehicle.mileage. Always null for vehicles not on the Flespi data provider, and also null when Flespi has no value or the call fails.
Was this page helpful?