Vehicle Scan
The Vehicle Scan tool over the API: saved vehicle requests and the auction and classifieds offers that match them. These are the same requests the account sees in the portal. Scope: vehiclescan, granted per contract, and the key’s account must also be granted Vehicle Scan.
Whether the key’s account may use Vehicle Scan, and its limits.
Requires the vehiclescan scope.
Example request
GET https://api.thecarapi.com/api/vehiclescan/accessExample response
{
"success": true,
"limits": {
"requests": 20,
"vehicles_per_request": 5,
"matches_per_request": 200
}
}Makes, fuels and gearboxes for a request, or one make’s models.
Requires the vehiclescan scope.
Parameters
brandstring · query stringReturns this make’s models instead.
Example BMW·Where the value comes from /api/vehiclescan/options -> makes
countrystring · query stringNarrows the options to one country.
Example DE·Where the value comes from Your user’s market.
Example requests
GET https://api.thecarapi.com/api/vehiclescan/optionsGET https://api.thecarapi.com/api/vehiclescan/options?brand=BMWExample response
{
"success": true,
"makes": [
"BMW"
],
"fuels": [
"Diesel"
],
"gearboxes": [
"Automatic"
]
}The account’s vehicle requests.
Requires the vehiclescan scope.
Example request
GET https://api.thecarapi.com/api/vehiclescan/requestsExample response
{
"success": true,
"requests": [
{
"id": 5,
"active": true,
"criteria": [
{
"make": "BMW",
"model": "320d",
"year_from": 2018
}
],
"matches_found": 41
}
]
}Save a vehicle request.
Requires the vehiclescan scope.
Parameters
criteriaobject[] · JSON bodyrequired1 to 5 vehicles, each with a make.
Example [{"make": "BMW", "model": "320d", "year_from": 2018}]·Where the value comes from /api/vehiclescan/options
Example request
POST https://api.thecarapi.com/api/vehiclescan/requests
{"criteria": [{"make": "BMW", "model": "320d", "year_from": 2018}]}Example response
{
"success": true,
"id": 5,
"matches_found": 41
}Replace a request’s vehicles.
Requires the vehiclescan scope.
Parameters
request_idinteger · in the URL pathrequiredThe request id.
Example 5·Where the value comes from /api/vehiclescan/requests -> requests[].id
criteriaobject[] · JSON bodyrequired1 to 5 vehicles, each with a make. Matching restarts from the offers listed now.
Example [{"make": "BMW", "model": "330d"}]·Where the value comes from /api/vehiclescan/options
Example request
PUT https://api.thecarapi.com/api/vehiclescan/requests/5
{"criteria": [{"make": "BMW", "model": "330d"}]}Example response
{
"success": true,
"id": 5,
"matches_found": 12
}Delete a request.
Requires the vehiclescan scope.
Parameters
request_idinteger · in the URL pathrequiredThe request id.
Example 5·Where the value comes from /api/vehiclescan/requests -> requests[].id
Example request
DELETE https://api.thecarapi.com/api/vehiclescan/requests/5Example response
{
"success": true
}Pause or resume a request.
Requires the vehiclescan scope.
Parameters
request_idinteger · in the URL pathrequiredThe request id.
Example 5·Where the value comes from /api/vehiclescan/requests -> requests[].id
activeboolean · JSON bodyrequiredfalse pauses matching, true resumes it.
Example false·Where the value comes from Your choice.
Example request
POST https://api.thecarapi.com/api/vehiclescan/requests/5/active
{"active": false}Example response
{
"success": true
}Offers matching a request.
Requires the vehiclescan scope.
Parameters
request_idinteger · in the URL pathrequiredThe request id.
Example 5·Where the value comes from /api/vehiclescan/requests -> requests[].id
Example request
GET https://api.thecarapi.com/api/vehiclescan/requests/5/matchesExample response
{
"success": true,
"offers": [
{
"site_name": "openlane",
"auction_id": 11409652,
"is_new": true
}
],
"retail": [
{
"reference_id": "tp-91744022",
"is_new": false
}
],
"limited": false
}What you get back
offers / retailobject[]Auctions and classifieds respectively, up to 200 each. is_new marks offers found since the request was saved; dismissed offers are left out.
limitedbooleanTrue when there were more than 200 of either.
Dismiss an auction offer from a request.
Requires the vehiclescan scope.
Parameters
request_idinteger · in the URL pathrequiredThe request id.
Example 5·Where the value comes from /api/vehiclescan/requests -> requests[].id
auction_idinteger · in the URL pathrequiredThe auction to dismiss.
Example 11409652·Where the value comes from /api/vehiclescan/requests/{request_id}/matches -> offers[].auction_id
Example request
DELETE https://api.thecarapi.com/api/vehiclescan/requests/5/matches/11409652Example response
{
"success": true
}Dismiss a classifieds offer from a request.
Requires the vehiclescan scope.
Parameters
request_idinteger · in the URL pathrequiredThe request id.
Example 5·Where the value comes from /api/vehiclescan/requests -> requests[].id
reference_idstring · in the URL pathrequiredThe classified listing to dismiss.
Example tp-91744022·Where the value comes from /api/vehiclescan/requests/{request_id}/matches -> retail[].reference_id
Example request
DELETE https://api.thecarapi.com/api/vehiclescan/requests/5/retail/tp-91744022Example response
{
"success": true
}