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.
Справочникът на ендпойнтите е на английски, както и самият API.
Whether the key’s account may use Vehicle Scan, and its limits.
Изисква обхвата vehiclescan scope.
Example request
GET https://api.thecarapi.com/api/vehiclescan/accessПримерен отговор
{
"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.
Изисква обхвата vehiclescan scope.
Параметри
brandstring · query stringReturns this make’s models instead.
Пример BMW·Откъде идва стойността /api/vehiclescan/options -> makes
countrystring · query stringNarrows the options to one country.
Пример DE·Откъде идва стойността Your user’s market.
Example requests
GET https://api.thecarapi.com/api/vehiclescan/optionsGET https://api.thecarapi.com/api/vehiclescan/options?brand=BMWПримерен отговор
{
"success": true,
"makes": [
"BMW"
],
"fuels": [
"Diesel"
],
"gearboxes": [
"Automatic"
]
}The account’s vehicle requests.
Изисква обхвата vehiclescan scope.
Example request
GET https://api.thecarapi.com/api/vehiclescan/requestsПримерен отговор
{
"success": true,
"requests": [
{
"id": 5,
"active": true,
"criteria": [
{
"make": "BMW",
"model": "320d",
"year_from": 2018
}
],
"matches_found": 41
}
]
}Save a vehicle request.
Изисква обхвата vehiclescan scope.
Параметри
criteriaobject[] · JSON bodyзадължителен1 to 5 vehicles, each with a make.
Пример [{"make": "BMW", "model": "320d", "year_from": 2018}]·Откъде идва стойността /api/vehiclescan/options
Example request
POST https://api.thecarapi.com/api/vehiclescan/requests
{"criteria": [{"make": "BMW", "model": "320d", "year_from": 2018}]}Примерен отговор
{
"success": true,
"id": 5,
"matches_found": 41
}Replace a request’s vehicles.
Изисква обхвата vehiclescan scope.
Параметри
request_idinteger · in the URL pathзадължителенThe request id.
Пример 5·Откъде идва стойността /api/vehiclescan/requests -> requests[].id
criteriaobject[] · JSON bodyзадължителен1 to 5 vehicles, each with a make. Matching restarts from the offers listed now.
Пример [{"make": "BMW", "model": "330d"}]·Откъде идва стойността /api/vehiclescan/options
Example request
PUT https://api.thecarapi.com/api/vehiclescan/requests/5
{"criteria": [{"make": "BMW", "model": "330d"}]}Примерен отговор
{
"success": true,
"id": 5,
"matches_found": 12
}Delete a request.
Изисква обхвата vehiclescan scope.
Параметри
request_idinteger · in the URL pathзадължителенThe request id.
Пример 5·Откъде идва стойността /api/vehiclescan/requests -> requests[].id
Example request
DELETE https://api.thecarapi.com/api/vehiclescan/requests/5Примерен отговор
{
"success": true
}Pause or resume a request.
Изисква обхвата vehiclescan scope.
Параметри
request_idinteger · in the URL pathзадължителенThe request id.
Пример 5·Откъде идва стойността /api/vehiclescan/requests -> requests[].id
activeboolean · JSON bodyзадължителенfalse pauses matching, true resumes it.
Пример false·Откъде идва стойността Your choice.
Example request
POST https://api.thecarapi.com/api/vehiclescan/requests/5/active
{"active": false}Примерен отговор
{
"success": true
}Offers matching a request.
Изисква обхвата vehiclescan scope.
Параметри
request_idinteger · in the URL pathзадължителенThe request id.
Пример 5·Откъде идва стойността /api/vehiclescan/requests -> requests[].id
Example request
GET https://api.thecarapi.com/api/vehiclescan/requests/5/matchesПримерен отговор
{
"success": true,
"offers": [
{
"site_name": "openlane",
"auction_id": 11409652,
"is_new": true
}
],
"retail": [
{
"reference_id": "tp-91744022",
"is_new": false
}
],
"limited": false
}Какво получавате
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.
Изисква обхвата vehiclescan scope.
Параметри
request_idinteger · in the URL pathзадължителенThe request id.
Пример 5·Откъде идва стойността /api/vehiclescan/requests -> requests[].id
auction_idinteger · in the URL pathзадължителенThe auction to dismiss.
Пример 11409652·Откъде идва стойността /api/vehiclescan/requests/{request_id}/matches -> offers[].auction_id
Example request
DELETE https://api.thecarapi.com/api/vehiclescan/requests/5/matches/11409652Примерен отговор
{
"success": true
}Dismiss a classifieds offer from a request.
Изисква обхвата vehiclescan scope.
Параметри
request_idinteger · in the URL pathзадължителенThe request id.
Пример 5·Откъде идва стойността /api/vehiclescan/requests -> requests[].id
reference_idstring · in the URL pathзадължителенThe classified listing to dismiss.
Пример tp-91744022·Откъде идва стойността /api/vehiclescan/requests/{request_id}/matches -> retail[].reference_id
Example request
DELETE https://api.thecarapi.com/api/vehiclescan/requests/5/retail/tp-91744022Примерен отговор
{
"success": true
}