EV charging

API

Das Laden von Elektrofahrzeugen aus der Ferne verwalten

Überprüfen Sie den Ladestatus und laden Sie Elektrofahrzeuge mit einfachen API-Anfragen auf.

Ladestatus

Prüfen Sie, ob das Ladekabel eines Elektrofahrzeugs angeschlossen ist und geladen wird.

Ladevorgang starten oder beenden

Starten oder beenden Sie den Ladevorgang eines batterieelektrischen (BEV) oder Plug-in-Hybridfahrzeugs (PHEV) aus der Ferne.

Gebührenlimit abrufen und festlegen

Schonen Sie den Batteriezustand, indem Sie die Ladegrenzwerte für Elektrofahrzeuge verwalten.

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"
}
Sehen Sie sich die API-Dokumente an

Eigenschaften des Produkts

  • Compatible with 36 car brands

    kompatibel mit 39 Automarken

  • Friendly user consent flow

    Benutzerfreundlicher Zustimmungsfluss

  • Works on 2015 and newer vehicles

    Funktioniert mit Fahrzeugen von 2015 und neueren

  • Trusted & secure

    Vertrauenswürdig und sicher

  • Retrieve live data and trigger actions

    Live-Daten abrufen und Live-Aktionen auslösen

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

    SDKs für Go, Java, Node.js, Python und Ruby

Learn more about Smartcar's APIs

Verwandte Branchen

Ladenetzwerke für Elektrofahrzeuge

Geben Sie in Ihrer App geschätzte Ladezeiten, automatische Ladepläne und die Reiseplanung für Elektrofahrzeuge an.

Energie- und Versorgungsunternehmen

Steuern Sie das Laden der Elektrofahrzeuge Ihrer Kunden in Privathaushalten, um die Stromnetzlast optimal auszugleichen.

Was wir bauen

Latenz und Häufigkeit der Datenverfügbarkeit können je nach Hersteller und Modell variieren.