Get Vehicle Range
curl --request GET \
--url https://api.volteras.com/v1/vehicles/{vehicle_id}/range \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.volteras.com/v1/vehicles/{vehicle_id}/range"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.volteras.com/v1/vehicles/{vehicle_id}/range', 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.volteras.com/v1/vehicles/{vehicle_id}/range",
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.volteras.com/v1/vehicles/{vehicle_id}/range"
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.volteras.com/v1/vehicles/{vehicle_id}/range")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.volteras.com/v1/vehicles/{vehicle_id}/range")
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{
"vehicleId": "<string>",
"unit": "<string>",
"calculationDate": "2023-12-25",
"range": {
"nominal": {},
"score": {},
"real": "<string>",
"realWarmerRange": "<string>",
"realColderRange": "<string>"
}
}Vehicle Range
Get Vehicle Range
Retrieves both nominal and real-world maximum range information for specified vehicles. It enables accurate vehicle range analysis by drawing on historical data and usage patterns for the specified vehicle.
Parameters:
vehicle_id: A unique identifier for the vehicle, which must correspond to a vehicle registered in our system.
Returns:
- A vehicle range instance encapsulating detailed range information for the vehicle. The data includes both the standard (nominal) range and the real (observed) maximum range based on data retrieved directly from the vehicle and the specifications published by the OEMs.
Raises:
APIException: Raised when the system cannot locate the vehicle’s range details, due to an invalid ‘vehicle_id’ or absence of range data. This results in a 404 Not Found status code.
Note:
- The first availability of
real_max_rangedepends on the first instance of data retrieved from the vehicle where the State of Charge is above 40%. As more data is collected, the endpoint is updated on a rolling basis, always providing the most accurate information available. - We recommend charging the vehicle to a State of Charge greater than 40% should the endpoint not be available.
- The inclusion of
nominal_max_rangeis reliant on the availability of the trim of the vehicle. Identifying the trim requires the registration country of the vehicle to be known and to be one we hold specification data for, currently Canada, France, Germany, Ireland, Italy, Spain, the United Kingdom, and the United States. For vehicles registered elsewhere,nominal_max_rangemay be unavailable whilereal_max_rangeis still returned. - The endpoint’s accuracy and availability depend upon the reliability of data sourced from and published by OEMs.
Possible Codes in Error Response (see Errors for error response schema and meaning of codes):
- AUTHENTICATION_ERROR
- REQUEST_VALIDATION_ERROR
- RESOURCE_NOT_FOUND
- SERVER_ERROR
GET
/
v1
/
vehicles
/
{vehicle_id}
/
range
Get Vehicle Range
curl --request GET \
--url https://api.volteras.com/v1/vehicles/{vehicle_id}/range \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.volteras.com/v1/vehicles/{vehicle_id}/range"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.volteras.com/v1/vehicles/{vehicle_id}/range', 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.volteras.com/v1/vehicles/{vehicle_id}/range",
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.volteras.com/v1/vehicles/{vehicle_id}/range"
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.volteras.com/v1/vehicles/{vehicle_id}/range")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.volteras.com/v1/vehicles/{vehicle_id}/range")
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{
"vehicleId": "<string>",
"unit": "<string>",
"calculationDate": "2023-12-25",
"range": {
"nominal": {},
"score": {},
"real": "<string>",
"realWarmerRange": "<string>",
"realColderRange": "<string>"
}
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Unique internal identifier for the vehicle.

