Retrieve a Vehicle
curl --request GET \
--url https://commerce.driv.ly/api/vehicles/{vin}import requests
url = "https://commerce.driv.ly/api/vehicles/{vin}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://commerce.driv.ly/api/vehicles/{vin}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://commerce.driv.ly/api/vehicles/{vin}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://commerce.driv.ly/api/vehicles/{vin}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://commerce.driv.ly/api/vehicles/{vin}")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerce.driv.ly/api/vehicles/{vin}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"vin": "<string>",
"year": 123,
"make": "<string>",
"transmission": "<string>",
"engine": "<string>",
"drivetrain": "<string>",
"model": "<string>",
"bodyStyle": "<string>",
"seatCount": 1,
"doorCount": 1,
"interiorColor": "<string>",
"exteriorColor": "<string>",
"trim": "<string>",
"spec": "<string>"
},
"success": true
}{
"error": {
"code": 123,
"message": "<string>"
},
"success": true
}{
"error": {
"code": 123,
"message": "<string>"
},
"success": true
}{
"error": {
"code": 123,
"message": "<string>"
},
"success": true
}Vehicles
Retrieve a Vehicle
GET
/
vehicles
/
{vin}
Retrieve a Vehicle
curl --request GET \
--url https://commerce.driv.ly/api/vehicles/{vin}import requests
url = "https://commerce.driv.ly/api/vehicles/{vin}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://commerce.driv.ly/api/vehicles/{vin}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://commerce.driv.ly/api/vehicles/{vin}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://commerce.driv.ly/api/vehicles/{vin}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://commerce.driv.ly/api/vehicles/{vin}")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerce.driv.ly/api/vehicles/{vin}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"vin": "<string>",
"year": 123,
"make": "<string>",
"transmission": "<string>",
"engine": "<string>",
"drivetrain": "<string>",
"model": "<string>",
"bodyStyle": "<string>",
"seatCount": 1,
"doorCount": 1,
"interiorColor": "<string>",
"exteriorColor": "<string>",
"trim": "<string>",
"spec": "<string>"
},
"success": true
}{
"error": {
"code": 123,
"message": "<string>"
},
"success": true
}{
"error": {
"code": 123,
"message": "<string>"
},
"success": true
}{
"error": {
"code": 123,
"message": "<string>"
},
"success": true
}Path Parameters
Vehicle is uniquely identified by vin
Query Parameters
The number of levels of related objects to include in the response
Response
Vehicle Found
Show child attributes
Show child attributes
Example:
{
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "vs_4jf8x9jv5c0b",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
}
⌘I