Action Lock Doors
curl --request POST \
--url https://api.volteras.com/v1/vehicles/{vehicle_id}/command-execution:lock-doors \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.volteras.com/v1/vehicles/{vehicle_id}/command-execution:lock-doors"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.volteras.com/v1/vehicles/{vehicle_id}/command-execution:lock-doors', 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}/command-execution:lock-doors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/command-execution:lock-doors"
req, _ := http.NewRequest("POST", 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.post("https://api.volteras.com/v1/vehicles/{vehicle_id}/command-execution:lock-doors")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.volteras.com/v1/vehicles/{vehicle_id}/command-execution:lock-doors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"vehicleId": "<string>",
"command": "WAKE_UP",
"id": "<string>",
"commandArguments": {},
"timeout": 123,
"executedAt": "2023-11-07T05:31:56Z",
"status": "PENDING",
"failedReason": "OEM_UNKNOWN_ERROR"
}Vehicle Command Executions
Action Lock Doors
Create a LOCK_DOORS command execution.
Parameters:
vehicle_id: The unique identifier (ID) of the vehicle to execute the command.
Returns:
- A response containing detailed information about the vehicle command execution.
Possible Codes in Error Response (see Errors for error response schema and meaning of codes):
- AUTHENTICATION_ERROR
- COMMAND_ALREADY_IN_PROGRESS
- REQUEST_VALIDATION_ERROR
- RESOURCE_NOT_FOUND
- SERVER_ERROR
Create a LOCK_DOORS command execution.
Parameters:
vehicle_id: The unique identifier (ID) of the vehicle to execute the command.
Returns:
- A response containing detailed information about the vehicle command execution.
POST
/
v1
/
vehicles
/
{vehicle_id}
/
command-execution:lock-doors
Action Lock Doors
curl --request POST \
--url https://api.volteras.com/v1/vehicles/{vehicle_id}/command-execution:lock-doors \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.volteras.com/v1/vehicles/{vehicle_id}/command-execution:lock-doors"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.volteras.com/v1/vehicles/{vehicle_id}/command-execution:lock-doors', 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}/command-execution:lock-doors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/command-execution:lock-doors"
req, _ := http.NewRequest("POST", 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.post("https://api.volteras.com/v1/vehicles/{vehicle_id}/command-execution:lock-doors")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.volteras.com/v1/vehicles/{vehicle_id}/command-execution:lock-doors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"vehicleId": "<string>",
"command": "WAKE_UP",
"id": "<string>",
"commandArguments": {},
"timeout": 123,
"executedAt": "2023-11-07T05:31:56Z",
"status": "PENDING",
"failedReason": "OEM_UNKNOWN_ERROR"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Unique internal identifier for the vehicle.
Response
200 - application/json
Successful Response
Enum for available commands.
Available options:
WAKE_UP, UNLOCK_DOORS, LOCK_DOORS, HONK_HORN, FLASH_LIGHTS, START_HVAC_SYSTEM, CLIMATE_ON, CLIMATE_OFF, SET_TEMPERATURE, SET_CHARGE_LIMIT, ACTUATE_FRONT_TRUNK, ACTUATE_REAR_TRUNK, OPEN_CHARGE_PORT, CLOSE_CHARGE_PORT, START_CHARGING, STOP_CHARGING, SET_VEHICLE_NAME, SCHEDULE_SOFTWARE_UPDATE, CANCEL_SOFTWARE_UPDATE, WINDOW_HEATING_ON, WINDOW_HEATING_OFF When the command was accepted and sent to the OEM. Command outcome arrives later through status.
Enum for command execution status.
Available options:
PENDING, EXECUTED, FAILED The reason the command failed to execute. Should be one of the codes listed in the enum, but may in some cases be a plain string.
Available options:
OEM_UNKNOWN_ERROR, OEM_TIMEOUT, OEM_UNAVAILABLE, OEM_NETWORK_ERROR, OEM_INCORRECT_REGION, OEM_APP_REQUIRED_UPDATE, OEM_USER_ACCOUNT_LOCKED, OEM_OAUTH_TOKEN_EXPIRED, OEM_VEHICLE_OFFLINE, OEM_VEHICLE_REMOTE_ACCESS_DISABLED, OEM_VEHICLE_LOCATION_SHARING_DISABLED, OEM_AUTH_DRIVER_IS_NOT_PRIMARY_USER, OEM_DEVICE_NOT_FOUND, OEM_COMMAND_TIMEOUT, OEM_COMMAND_FAILED, OEM_COMMAND_SUCCEEDED_WITH_DOOR_AJAR, OEM_RATE_LIMITED, OEM_ACCOUNT_RATE_LIMITED, OEM_DEVICE_RATE_LIMITED, OEM_STOP_CHARGE_RATE_LIMITED, OEM_COMMANDS_RATE_LIMITED, OEM_VEHICLE_LOCATION_UNKNOWN, OEM_VEHICLE_NOT_IN_AUTHORIZED_LOCATION, OEM_VEHICLE_CHARGING_NOT_FINISHED, OEM_VEHICLE_CHARGING_NOT_STOPPED, OEM_VEHICLE_CHARGING_NOT_STARTED, OEM_VEHICLE_CHARGING_NOT_PAUSED, OEM_VEHICLE_CHARGING_REFUSED_PLAY_PROTECTION, OEM_COMMAND_REFUSED_OTHER_SERVICE_RUNNING, OEM_COMMAND_REFUSED_VEHICLE_AWAKE_IN_STAND_STILL_AND_RESTING_STATE, OEM_COMMAND_REFUSED_VEHICLE_AWAKE_IN_STAND_STILL_AND_ACTIVE_STATE, OEM_COMMAND_REFUSED_VEHICLE_AWAKE_IN_DRIVING_OR_READY_TO_DRIVE, OEM_COMMAND_REFUSED_VEHICLE_AWAKE_IN_DIAGNOSTICS_MODE, SERVER_ERROR, INTERNAL_RATE_LIMITED, AUTHENTICATION_ERROR, NOT_PERMITTED 
