Set Vehicle Listening State
curl --request POST \
--url https://api.volteras.com/v1/vehicles/{vehicle_id}/listening \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isListening": true
}
'import requests
url = "https://api.volteras.com/v1/vehicles/{vehicle_id}/listening"
payload = { "isListening": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({isListening: true})
};
fetch('https://api.volteras.com/v1/vehicles/{vehicle_id}/listening', 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}/listening",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'isListening' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.volteras.com/v1/vehicles/{vehicle_id}/listening"
payload := strings.NewReader("{\n \"isListening\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.volteras.com/v1/vehicles/{vehicle_id}/listening")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isListening\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.volteras.com/v1/vehicles/{vehicle_id}/listening")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isListening\": true\n}"
response = http.request(request)
puts response.read_body{
"vehicleId": "<string>",
"isListening": true,
"lastUpdated": "2023-11-07T05:31:56Z"
}{
"vehicleId": "<string>",
"isListening": true,
"lastUpdated": "2023-11-07T05:31:56Z"
}Vehicle Listening
Set Vehicle Listening State
Set the listening state for a vehicle.
The listening state controls whether a vehicle can:
- Process incoming data stream messages
- Accept remote commands
- Fetch data from OEM endpoints
Requirements:
- Vehicle must belong to the authenticated organization
- Request will update the vehicle’s desired listening state
If the vehicle is already in the requested listening state, the request is a no-op: no new audit entry is recorded and a 200 response is returned with the current state.
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
POST
/
v1
/
vehicles
/
{vehicle_id}
/
listening
Set Vehicle Listening State
curl --request POST \
--url https://api.volteras.com/v1/vehicles/{vehicle_id}/listening \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"isListening": true
}
'import requests
url = "https://api.volteras.com/v1/vehicles/{vehicle_id}/listening"
payload = { "isListening": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({isListening: true})
};
fetch('https://api.volteras.com/v1/vehicles/{vehicle_id}/listening', 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}/listening",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'isListening' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.volteras.com/v1/vehicles/{vehicle_id}/listening"
payload := strings.NewReader("{\n \"isListening\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.volteras.com/v1/vehicles/{vehicle_id}/listening")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"isListening\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.volteras.com/v1/vehicles/{vehicle_id}/listening")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"isListening\": true\n}"
response = http.request(request)
puts response.read_body{
"vehicleId": "<string>",
"isListening": true,
"lastUpdated": "2023-11-07T05:31:56Z"
}{
"vehicleId": "<string>",
"isListening": true,
"lastUpdated": "2023-11-07T05:31:56Z"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Unique internal identifier for the vehicle.
Body
application/json
Indicates whether the vehicle should be marked as listening for data.
Response
The vehicle is already in the requested listening state; no change was made.

