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"
}
}
]
}
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" }]}'
{
"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"
}
}
]
}
Show child attributes
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" }]}'
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?