curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/charge_port_door" \
-H "Authorization: Bearer {token}" \
-X "POST" \
-H "Content-Type: application/json" \
-d '{"action" : "OPEN"}'
charge_port = vehicle.request(
"POST",
"{make}/charge/charge_port_door",
{"action" : "OPEN"}
)
const chargePort = vehicle.request(
"POST",
"{make}/charge/charge_port_door",
{"action" : "OPEN"}
);
SmartcarVehicleRequest request = new SmartcarVehicleRequest.Builder()
.method("POST")
.path("{make}/charge/charge_port_door")
.addBodyParameter("action" : "OPEN")
.build();
VehicleResponse chargePort = vehicle.request(request);
charge_port = vehicle.request(
"POST",
"{make}/charge/charge_port_door",
{"action" : "OPEN"}
)
{
"message": "Successfully sent request to vehicle",
"status": "success"
}
Tesla
Charge Port
Open or close the vehicle’s charge port door.
POST
/
v2.0
/
vehicles
/
{id}
/
{make}
/
charge
/
charge_port_door
curl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/charge_port_door" \
-H "Authorization: Bearer {token}" \
-X "POST" \
-H "Content-Type: application/json" \
-d '{"action" : "OPEN"}'
charge_port = vehicle.request(
"POST",
"{make}/charge/charge_port_door",
{"action" : "OPEN"}
)
const chargePort = vehicle.request(
"POST",
"{make}/charge/charge_port_door",
{"action" : "OPEN"}
);
SmartcarVehicleRequest request = new SmartcarVehicleRequest.Builder()
.method("POST")
.path("{make}/charge/charge_port_door")
.addBodyParameter("action" : "OPEN")
.build();
VehicleResponse chargePort = vehicle.request(request);
charge_port = vehicle.request(
"POST",
"{make}/charge/charge_port_door",
{"action" : "OPEN"}
)
{
"message": "Successfully sent request to vehicle",
"status": "success"
}
This endpoint is currently available for
teslaPermission
control_charge
Request
Pathstring
required
The vehicle ID of the vehicle you are making a request to.
string
required
Indicate whether to open or close the charge port door.
Options:
OPEN or CLOSEcurl "https://api.smartcar.com/v2.0/vehicles/{id}/{make}/charge/charge_port_door" \
-H "Authorization: Bearer {token}" \
-X "POST" \
-H "Content-Type: application/json" \
-d '{"action" : "OPEN"}'
charge_port = vehicle.request(
"POST",
"{make}/charge/charge_port_door",
{"action" : "OPEN"}
)
const chargePort = vehicle.request(
"POST",
"{make}/charge/charge_port_door",
{"action" : "OPEN"}
);
SmartcarVehicleRequest request = new SmartcarVehicleRequest.Builder()
.method("POST")
.path("{make}/charge/charge_port_door")
.addBodyParameter("action" : "OPEN")
.build();
VehicleResponse chargePort = vehicle.request(request);
charge_port = vehicle.request(
"POST",
"{make}/charge/charge_port_door",
{"action" : "OPEN"}
)
Response
string
If the request is successful, Smartcar will return “success”.
string
If the request is successful, Smartcar will return a message.
{
"message": "Successfully sent request to vehicle",
"status": "success"
}
Was this page helpful?

