Start & Stop Charge

API

Optimize EV charging proactively

Our Start and Stop Charge commands allow developers to control when a battery electric (BEV) or plug-in hybrid vehicle (PHEV) begins or finishes charging.

How businesses use start or stop charge

Smart charging

Help drivers personalize their EV charging schedules based on their preferences. Control when a vehicle starts or stops charging based on current energy rates and demand.

Demand response

Allow drivers to easily participate in demand response programs and earn revenue by automatically optimizing EV charging schedules to align with grid needs.

Manage battery health

Enhance EV performance and preserve your customers’ battery health by preventing excessive charging.

Pre-paid charging

Enable pre-paid charging sessions by stopping charge once energy thresholds are met.

An illustration of a connected vehicle on a winding road.

Start & Stop Charge

Toggle charging on or off to manage charging sessions.

const smartcar = require('smartcar');

// Get all vehicles associated with this access token
const {vehicles} = await smartcar.getVehicles("<access-token>");

// Construct a new vehicle instance using the first vehicle's id
const vehicle = new smartcar.Vehicle(vehicles[0], "<access-token>");

// Start the vehicle's charging session
await vehicle.startCharge();
/

// Example http response from Smartcar (start charge)
{
  "status": "success"
}


import smartcar

# Get all vehicles associated with this access token
response = smartcar.get_vehicles("<access-token>")

# Construct a new vehicle instance using the first vehicle's id
vehicle = smartcar.Vehicle(response.vehicles[0], "<access-token>")

# Start the vehicle's charging session
vehicle.start_charge()
/

// Example http response from Smartcar (start charge)
{
  "status": "success"
}


import com.smartcar.sdk.*;

// Get all vehicles associated with this access token
VehicleIds response = Smartcar.getVehicles("<access-token>");
String[] vehicleIds = response.getVehicleIds();

// Construct a new vehicle instance using the first vehicle's id
Vehicle vehicle = new Vehicle(vehicleIds[0], "<access-token>");

// Start the vehicle's charging session
vehicle.startCharge();
/

// Example http response from Smartcar (start charge)
{
  "status": "success"
}


import (
  "context"
  smartcar "github.com/smartcar/go-sdk"
);

// Create a smartcar client
var smartcarClient = smartcar.NewClient();

// Get all vehicles associated with this access token
var vehicleIDs, resErr = smartcarClient.GetVehicleIDs(
  context.TODO(),
  &smartcar.VehicleIDsParams{Access: "<access-token>"},
);

// Construct a new vehicle instance using the first vehicle's id
var vehicle = smartcarClient.NewVehicle(&smartcar.VehicleParams{
  ID: vehicleIDs.VehicleIDs[0],
  AccessToken: "<access-token>"},
);

// Start the vehicle's charging session
var startCharge, resErr = vehicle.StartCharge(context.TODO());
/

// Example http response from Smartcar (start charge)
{
  "status": "success"
}


require 'smartcar'

# Get all vehicles associated with this access token
all_vehicles =  Smartcar.get_vehicles(token: token)

# Construct a new vehicle instance using the first vehicle's id
vehicle = Smartcar::Vehicle.new(
  token: "<access-token>",
  id: all_vehicles.vehicles.first
)

# Start the vehicle's charging session
vehicle.startCharge!
/

// Example http response from Smartcar (start charge)
{
  "status": "success"
}


See the API docs

Product features

  • Compatible with 36 car brands

    Compatible with 39 car brands

  • Friendly user consent flow

    Friendly user consent flow

  • Works on 2015 and newer vehicles

    Works on 2015 and newer vehicles

  • Trusted & secure

    Trusted & secure

  • Retrieve live data and trigger actions

    Retrieve live data and trigger live actions

  • SDKs for Go, Java, Node.js, Python, and Ruby

    SDKs for Go, Java, Node.js, Python, and Ruby

Learn more about Smartcar's APIs

Related industries

Energy & utility providers

Manage your customers’ residential EV charging to best balance electric grid load.

EV charging networks

Provide estimated charging times, automatic charging schedules, and EV trip planning in your app.