Lock & unlock

API

Auto's ontgrendelen via je app

Met het Smartcar-platform kan uw mobiliteitsapp digitale autosleutels uitgeven, beheren en delen voor uw klanten.

Vergrendelen of ontgrendelen

De deuren van een voertuig vergrendelen of ontgrendelen.

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"
}
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-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

Peer-to-peer autodelen

Bied contactloze huurmogelijkheden met digitale sleutels rechtstreeks in uw autodeel-app aan.

Diensten op aanvraag

Bied contactloze diensten aan door klanten een digitale autosleutel te laten delen met uw technici.