EV charging

API

Het opladen van elektrische voertuigen op afstand beheren

Controleer de laadstatus en laad elektrische voertuigen op met eenvoudige API-aanvragen.

Oplaadstatus

Controleer of de oplaadkabel van een elektrische auto is aangesloten en laad op.

Opladen starten of stoppen

Het opladen van een elektrische batterij (BEV) of plug-in hybride auto (PHEV) op afstand starten of stoppen.

Oplaadlimiet opvragen en instellen

Behoud de gezondheid van de batterij door de laadlimieten voor elektrische voertuigen te beheren.

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>");

// Fetch the vehicle's charging status
const charge = await vehicle.charge();

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

// Set the vehicle's charge limit
await vehicle.setChargeLimit(0.8);
// Example http response from Smartcar (charging status)
{
  "isPluggedIn": true,
  "state":"FULLY_CHARGED"
}

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

// Example http response from Smartcar (set charge limit)
{
  "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>")

# Fetch the vehicle's charging status
charge = vehicle.charge()

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

# Set the vehicle's charge limit
vehicle.set_charge_limit(0.8)
// Example http response from Smartcar (charging status)
{
  "isPluggedIn": true,
  "state":"FULLY_CHARGED"
}

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

// Example http response from Smartcar (set charge limit)
{
  "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>");

// Fetch the vehicle's charging status
VehicleCharge charge = vehicle.charge();

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

// Set the vehicle's charge limit
vehicle.setChargeLimit(0.8)
// Example http response from Smartcar (charging status)
{
  "isPluggedIn": true,
  "state":"FULLY_CHARGED"
}

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

// Example http response from Smartcar (set charge limit)
{
  "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>"},
);

// Fetch the vehicle's charging status
var charge, resErr = vehicle.GetCharge(context.TODO());

// Start the vehicle's charging session
var startCharge, resErr = vehicle.StartCharge(context.TODO());
// Example http response from Smartcar (charging status)
{
  "isPluggedIn": true,
  "state":"FULLY_CHARGED"
}

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

// Example http response from Smartcar (set charge limit)
{
  "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
)

# Fetch the vehicle's charging status
charge = vehicle.charge()

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

# Set the vehicle's charge limit
vehicle.set_charge_limit!(0.8)
// Example http response from Smartcar (charging status)
{
  "isPluggedIn": true,
  "state":"FULLY_CHARGED"
}

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

// Example http response from Smartcar (set charge limit)
{
  "status": "success"
}
Bekijk de API-documenten

Kenmerken van het product

  • Compatibel met 36 automerken

    Compatibel met 39 automerken

  • Vriendelijke toestemmingsstroom van gebruikers

    Vriendelijke toestemmingsstroom van gebruikers

  • Werkt op voertuigen uit 2015 en nieuwer

    Werkt op voertuigen uit 2015 en nieuwer

  • Vertrouwd en veilig

    Vertrouwd en veilig

  • Live data ophalen en acties activeren

    Live data ophalen en live acties activeren

  • SDK's voor Go, Java, Node.js, Python en Ruby

    SDK's voor Go, Java, Node.js, Python en Ruby

Meer informatie over de API's van Smartcar

Gerelateerde industrieën

Laadnetwerken voor elektrische voertuigen

Geef geschatte oplaadtijden, automatische laadschema's en EV-reisplanning op in je app.

Leveranciers van energie en nutsvoorzieningen

Beheer het opladen van elektrische voertuigen in woningen van uw klanten om de belasting van het elektriciteitsnet zo goed mogelijk in evenwicht te houden.

Wat we aan het bouwen zijn

De latentie en frequentie van de beschikbaarheid van gegevens kunnen per merk en model verschillen.