Vehicle Simulator allows you to quickly test your application in realistic scenarios with any Smartcar-compatible vehicle. Simulate live trips and receive API data without the cost or logistics of physical test vehicles! You can even run tests across multiple cars at the same time.

Demo

How do I connect to simulated vehicles?

In order for Connect to know you’re using credentials generated from Vehicle Simulator, you’ll need to pass mode=siumlated in the Connect URL.

Please ensure you’re passing or changing the country flag for Connect based on the region you’ve created your vehicle for. Failure to do so will result in an invalid credential error on login. You can read more about country selection for Connect here.

Expected Responses

Data

PermissionRequest Method / PathExample Response
read_engine_oilGET /engine/oil{ lifeRemaining: 0.35 }
read_batteryGET /battery{ percentRemaining: 0.3, range: 40.5 }
read_batteryGET /battery/capacity{ capacity: 28 }
read_chargeGET /charge{ isPluggedIn: true, state: 'FULLY_CHARGED' }
read_chargeGET /charge/limit{ limit: 1 }
read_fuelGET /fuel{ amountRemaining: 53.2, percentRemaining: 0.3, range: 40.5 }
read_locationGET /location{ latitude: 37.4292, longitude: 122.1382 }
read_odometerGET /odometer{ distance: 104.32 }
read_tiresGET /tires/pressure{ backLeft: 219.3, backRight: 219.3, frontLeft: 219.3, frontRight: 219.3 }
read_vehicle_infoGET /{ id: 36ab27d0-fd9d-4455-823a-ce30af709ffc, make: "TESLA", model: "Model S", year: 2014 }
read_vinGET /vin{ vin: 1234A67Q90F2T4567 }

Commands

Below are the various action requests that can be made to simulated vehicles, and what responses to expect based on the simulated vehicle’s current state along the trip or simulator support.

Not listed here are the standard API errors that will be returned if the vehicle does not support the capability or the application has not been granted permission.

PermissionRequest (method / path)Action requestVehicle stateResponse
control_securityPOST /securityLOCKParked / Charging{ status: "success" }
control_securityPOST /securityUNLOCKParked / Charging{ status: "success" }
control_securityPOST /securityLOCKDriving{ type: VEHICLE_STATE, code: IN_MOTION }
control_securityPOST /securityUNLOCKDriving{ type: VEHICLE_STATE, code: IN_MOTION }
control_chargePOST /chargeSTARTCharging{ status: "success" }
control_chargePOST /chargeSTOPCharging{ status: "success" }
control_chargePOST /chargeSTOPParked / Driving (not plugged in){ type: VEHICLE_STATE, code: CHARGING_PLUG_NOT_CONNECTED }
control_chargePOST /chargeSTARTParked / Driving (not plugged in){ type: VEHICLE_STATE, code: CHARGING_PLUG_NOT_CONNECTED }
control_chargePOST /charge-limit<limit>Charging{ "type": "COMPATIBILITY", "code": "SMARTCAR_NOT_CAPABLE", }
control_chargePOST /charge-limit<limit>Parked / Driving (not plugged in){ type: VEHICLE_STATE, code: CHARGING_PLUG_NOT_CONNECTED }

Errors

EventError responseSuggested resolution
Making an API request to a simulated vehicle before connecting the vehicle to your application via Smartcar Connect{ type: "PERMISSION", statusCode: 403, resolution: "REAUTHENTICATE" }Locate the ‘Connect Credentials’ button at the top of the simulation screen in the Smartcar Dashboard for your simulated vehicle. There you will find the credentials necessary to connect the vehicle to your application as well as instructions for doing so through Smartcar Connect.
Making an API request to a simulated vehicle before a trip has been started in the simulator on Dashboard{ type: "CONNECTED_SERVICES_ACCOUNT", code: "ACCOUNT_ISSUE", statusCode: 400 }Open the Simulator tab in the Smartcar Dashboard and navigate to your target vehicle. If you haven’t yet selected a trip, do so now, and then start the simulated trip using the ‘Play’ button on the simulation screen.
Making an API request to a simulated vehicle that is not associated with your application{ type: "CONNECTED_SERVICES_ACCOUNT", code: "VEHICLE_MISSING", statusCode: 400 }Ensure the simulated vehicle you are making requests to has been created in the Simulator within your Smartcar Dashboard.

Mode Comparison

Feature
Simluator
Test
Live
Single Select
Brand Select
Non-Randomised Datan/a
Compatibility API*
control_security
control_charge
Make-Specific Endpoints
Scheduled Webhooks
Event Based Webhooks**

*When a real VIN is used either through VIN@smartcar for test mode, or generating a simulated vehicle with a real VIN.

0SC and 1SC prefixed VINs will not work.

**For supported brands - Toyota, Ford and Tesla.

FAQs