Retrieve a Listing
curl --request GET \
--url https://commerce.driv.ly/api/listings/{id}import requests
url = "https://commerce.driv.ly/api/listings/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://commerce.driv.ly/api/listings/{id}', 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/listings/{id}",
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/listings/{id}"
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/listings/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerce.driv.ly/api/listings/{id}")
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": {
"id": "lst_k3j5s9qj3w0d",
"dealer": "dlr_4dk39dkl3d93",
"vehicle": "veh_3k12j9qksdf0",
"vhrUrls": [
"https://example.com/vhr.pdf"
],
"odometer": 15000,
"ownerCount": 1,
"attachments": [],
"accidentCount": 0,
"vehicleRating": 8,
"initialOfferDate": "2022-05-10",
"retailBuyNowPrice": 35000,
"retailAskingPrice": 34000,
"wholesaleBuyNowPrice": 30000,
"wholesaleMinimumBidPrice": 28000,
"wholesaleMaximumBidPrice": 32000
},
"success": true
}{
"error": {
"code": 401,
"message": "Unauthorized"
},
"success": false
}{
"error": {
"code": 404,
"message": "Listing Not Found"
},
"success": false
}{
"error": {
"code": 429,
"message": "Too Many Requests"
},
"success": false
}Listings
Retrieve a Listing
GET
/
listings
/
{id}
Retrieve a Listing
curl --request GET \
--url https://commerce.driv.ly/api/listings/{id}import requests
url = "https://commerce.driv.ly/api/listings/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://commerce.driv.ly/api/listings/{id}', 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/listings/{id}",
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/listings/{id}"
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/listings/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerce.driv.ly/api/listings/{id}")
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": {
"id": "lst_k3j5s9qj3w0d",
"dealer": "dlr_4dk39dkl3d93",
"vehicle": "veh_3k12j9qksdf0",
"vhrUrls": [
"https://example.com/vhr.pdf"
],
"odometer": 15000,
"ownerCount": 1,
"attachments": [],
"accidentCount": 0,
"vehicleRating": 8,
"initialOfferDate": "2022-05-10",
"retailBuyNowPrice": 35000,
"retailAskingPrice": 34000,
"wholesaleBuyNowPrice": 30000,
"wholesaleMinimumBidPrice": 28000,
"wholesaleMaximumBidPrice": 32000
},
"success": true
}{
"error": {
"code": 401,
"message": "Unauthorized"
},
"success": false
}{
"error": {
"code": 404,
"message": "Listing Not Found"
},
"success": false
}{
"error": {
"code": 429,
"message": "Too Many Requests"
},
"success": false
}Path Parameters
Listing is uniquely identified by id
Query Parameters
The number of levels of related objects to include in the response
Response
Listing Found
Show child attributes
Show child attributes
Example:
{
"id": "lst_k3j5s9qj3w0d",
"dealer": "dlr_4dk39dkl3d93",
"vehicle": "veh_3k12j9qksdf0",
"vhrUrls": ["https://example.com/vhr.pdf"],
"odometer": 15000,
"ownerCount": 1,
"attachments": [],
"accidentCount": 0,
"vehicleRating": 8,
"initialOfferDate": "2022-05-10",
"retailBuyNowPrice": 35000,
"retailAskingPrice": 34000,
"wholesaleBuyNowPrice": 30000,
"wholesaleMinimumBidPrice": 28000,
"wholesaleMaximumBidPrice": 32000
}