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" }]}'
result = vehicle.batch(["/odometer", "/location"])
const batchResponse = await vehicle.batch(['/odometer','/location'])
const odometer = batchResponse.odometer()
const location = batchResponse.location()
String[] endpoints = {"/odometer", "/fuel"};
BatchResponse batch = vehicle.batch(endpoints);
VehicleOdometer odometer = batch.odometer();
VehicleFuel fuel = batch.fuel();
batch_response = vehicle.batch(%w(/odometer /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"
}
}
]
}
Vehicle Data
Batch
Returns a list of responses from multiple Smartcar GET endpoints, all combined into a single request.
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" }]}'
result = vehicle.batch(["/odometer", "/location"])
const batchResponse = await vehicle.batch(['/odometer','/location'])
const odometer = batchResponse.odometer()
const location = batchResponse.location()
String[] endpoints = {"/odometer", "/fuel"};
BatchResponse batch = vehicle.batch(endpoints);
VehicleOdometer odometer = batch.odometer();
VehicleFuel fuel = batch.fuel();
batch_response = vehicle.batch(%w(/odometer /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"
}
}
]
}
The Vehicles API v2.0 will be deprecated on December 1, 2026. The latest version, v3, was introduced on August 26, 2025. We recommend migrating as soon as possible to ensure continued support and access to new features.
Each endpoint in the batch counts against your request limit for a vehicle.
Request
PathThe vehicle ID of the vehicle you are making a request to.
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" }]}'
result = vehicle.batch(["/odometer", "/location"])
const batchResponse = await vehicle.batch(['/odometer','/location'])
const odometer = batchResponse.odometer()
const location = batchResponse.location()
String[] endpoints = {"/odometer", "/fuel"};
BatchResponse batch = vehicle.batch(endpoints);
VehicleOdometer odometer = batch.odometer();
VehicleFuel fuel = batch.fuel();
batch_response = vehicle.batch(%w(/odometer /location))
Response
The responses from Smartcar.
Hide response
Hide response
{
"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?

