Vehicle Endpoints
Batch
Introduction
Compatibility
Connection Management
Vehicle Endpoints
- GETAll Vehicles
- POSTBatch
- GETBattery Capacity
- GETBattery Level
- GETCharge Limit
- POSTCharge Limit
- GETCharge Status
- GETDiagnostic Trouble Codes
- GETFuel Tank
- GETLocation
- GETLock Status
- POSTLock & Unlock
- GETOdometer
- GETOil Life
- GETPermissions
- POSTSend Destination
- POSTStart & Stop Charge
- GETService History
- GETSystem Status
- GETTire Pressure
- GETUser
- GETVehicle Attributes
- GETVIN
Make Specific
- About Make Specific
- Audi
- Chevrolet and Cadillac
- BMW and MINI
- Ford and Lincoln
- Nissan
- Tesla
Vehicle Endpoints
Batch
Returns a list of responses from multiple Smartcar GET
endpoints, all combined into a single request.
POST
/
vehicles
/
{id}
/
batch
curl "https://api.smartcar.com/v2.0/vehicles/{id}/batch" \
-H "Authorization: Bearer {token}" \
-X "POST" \
-H "Content-Type: application/json" \
-d '{"requests": [{ "path" : "/odometer" }, { "path" : "/location" }]}'
{
"responses": [
{
"path": "/odometer",
"body": {
"distance": 37829
},
"code": 200,
"headers": {
"sc-data-age": "2019-10-24T00:43:46.000Z",
"sc-unit-system": "metric"
}
},
{
"path": "/location",
"body": {
"latitude": 37.4292,
"longitude": 122.1381
},
"code": 200,
"headers": {
"sc-data-age": "2019-10-24T00:43:46.000Z"
}
}
]
}
Each endpoint in the batch counts against your request limit for a vehicle.
Request
Path
The vehicle ID of the vehicle you are making a request to.
Body
An array of requests to make.
The Smartcar endpoint to request data from.
curl "https://api.smartcar.com/v2.0/vehicles/{id}/batch" \
-H "Authorization: Bearer {token}" \
-X "POST" \
-H "Content-Type: application/json" \
-d '{"requests": [{ "path" : "/odometer" }, { "path" : "/location" }]}'
Response
The responses from Smartcar.
The HTTP response status code.
The Smartcar endpoint to request data from.
The response body of this request. The structure of this object will vary by endpoint. See the according endpoint specification.
{
"responses": [
{
"path": "/odometer",
"body": {
"distance": 37829
},
"code": 200,
"headers": {
"sc-data-age": "2019-10-24T00:43:46.000Z",
"sc-unit-system": "metric"
}
},
{
"path": "/location",
"body": {
"latitude": 37.4292,
"longitude": 122.1381
},
"code": 200,
"headers": {
"sc-data-age": "2019-10-24T00:43:46.000Z"
}
}
]
}
Was this page helpful?
curl "https://api.smartcar.com/v2.0/vehicles/{id}/batch" \
-H "Authorization: Bearer {token}" \
-X "POST" \
-H "Content-Type: application/json" \
-d '{"requests": [{ "path" : "/odometer" }, { "path" : "/location" }]}'
{
"responses": [
{
"path": "/odometer",
"body": {
"distance": 37829
},
"code": 200,
"headers": {
"sc-data-age": "2019-10-24T00:43:46.000Z",
"sc-unit-system": "metric"
}
},
{
"path": "/location",
"body": {
"latitude": 37.4292,
"longitude": 122.1381
},
"code": 200,
"headers": {
"sc-data-age": "2019-10-24T00:43:46.000Z"
}
}
]
}