Lock & unlock

API

Schalte Autos von deiner App aus frei

Die Smartcar-Plattform ermöglicht es Ihrer Mobilitäts-App, digitale Autoschlüssel für Ihre Kunden auszustellen, zu verwalten und zu teilen.

Sperren oder Entsperren

Verriegeln oder entriegeln Sie die Türen eines Fahrzeugs.

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

// Lock the vehicle
await vehicle.lock();

// Unlock the vehicle
await vehicle.unlock();
// Example http response from Smartcar
{
  "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>")

# Lock the vehicle
vehicle.lock()

# Unlock the vehicle
vehicle.unlock()
// Example http response from Smartcar
{
  "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>");

// Lock the vehicle
vehicle.lock();

// Unlock the vehicle
vehicle.unlock();
// Example http response from Smartcar
{
  "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>"},
);

// Lock the vehicle
var lock, resErr = vehicle.Lock(context.TODO());

// Unlock the vehicle
var unlock, resErr = vehicle.Unlock(context.TODO());
// Example http response from Smartcar
{
  "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
)

# Lock the vehicle
vehicle.lock!

# Unlock the vehicle
vehicle.unlock!
// Example http response from Smartcar
{
  "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-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

Peer-to-Peer-Carsharing

Bieten Sie kontaktlose Anmietungen mit digitalen Schlüsseln direkt in Ihrer Carsharing-App an.

Dienste auf Abruf

Bieten Sie kontaktlose Dienste an, indem Sie Kunden einen digitalen Autoschlüssel mit Ihren Technikern teilen lassen.

Was wir bauen

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