Update odometer (V2)
curl --request PUT \
--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.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', 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 => "PUT",
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("PUT", 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.put("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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyVehicle commands
Update odometer
Sets the GPS odometer reading for a vehicle.
PUT
/
v2
/
api
/
vehicles
/
{id}
/
odometer
Update odometer (V2)
curl --request PUT \
--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.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', 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 => "PUT",
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("PUT", 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.put("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::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyOverview
Sends a new GPS odometer value to the vehicle’s device as a command.The V1 version of this endpoint is Change odometer.
Rate limit: 10 req/s · 30/min · 6,000/hr · 144,000/day
Endpoint
PUT /v2/api/vehicles/{id}/odometer
Path parameters
integer
required
Public vehicle ID (
deviceId).Query parameters
number
New odometer value in kilometres. Optional, but always send it — see the warning below.
Omitting
odometer sets the vehicle’s odometer to 0.Response
200 OK — empty body. Returned even when the command could not be sent to the device, so it does not confirm that the device received or applied the value; Last position changes once the device reports the new odometer.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 |
| 409 | ODOMETER_SOURCE_CONFLICT may be returned when the vehicle’s odometer comes from the CAN bus, which cannot be overridden. It is not guaranteed: when the server holds no current state for the vehicle, the check is skipped. |
| 422 | odometer is negative or not a number. A negative value is checked first, so an unknown vehicle ID with a negative value also gets 422. |
curl -X PUT "https://api.telemax.com.au/v2/api/vehicles/88421/odometer?odometer=154200" \
-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
New odometer value in kilometres. Must be ≥ 0. Omitting it sets the odometer to 0 — always send it.
Required range:
x >= 0Response
200 OK — Empty body. Returned even when the command could not be sent to the device; it does not confirm that the device received or applied the value.
Was this page helpful?