Retrieve a Deal
curl --request GET \
--url https://commerce.driv.ly/api/deals/{id}import requests
url = "https://commerce.driv.ly/api/deals/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://commerce.driv.ly/api/deals/{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/deals/{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/deals/{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/deals/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerce.driv.ly/api/deals/{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": "<string>",
"vehicle": "<string>",
"customer": "<string>",
"maximumBidPrice": 123,
"dealer": "<string>",
"currentBidPrice": 123,
"minimumBidPrice": 123,
"facilitator": "<string>",
"coBuyerOrCoSellerCustomer": "<string>"
},
"success": true
}{
"error": {
"code": 123,
"message": "<string>"
},
"success": true
}{
"error": {
"code": 123,
"message": "<string>"
},
"success": true
}{
"error": {
"code": 123,
"message": "<string>"
},
"success": true
}Deals
Retrieve a Deal
GET
/
deals
/
{id}
Retrieve a Deal
curl --request GET \
--url https://commerce.driv.ly/api/deals/{id}import requests
url = "https://commerce.driv.ly/api/deals/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://commerce.driv.ly/api/deals/{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/deals/{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/deals/{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/deals/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerce.driv.ly/api/deals/{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": "<string>",
"vehicle": "<string>",
"customer": "<string>",
"maximumBidPrice": 123,
"dealer": "<string>",
"currentBidPrice": 123,
"minimumBidPrice": 123,
"facilitator": "<string>",
"coBuyerOrCoSellerCustomer": "<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
Deal is uniquely identified by id
Query Parameters
The number of levels of related objects to include in the response
Response
Deal Found
Show child attributes
Show child attributes
Example:
{
"id": "deal_5ksj49dkvdl2",
"dealer": {
"location": {
"id": "loc_8dj39dksm2d9",
"zip": "90210",
"city": {
"name": "Anytown",
"state": { "code": "CA" }
},
"line2": "Suite 100",
"line1": "456 Dealership Blvd",
"latitude": 34.0522,
"longitude": -118.2437
}
},
"vehicle": {
"id": "veh_3k12j9qksdf0",
"vin": "1C4HJXEN5MW592818",
"year": 2021,
"make": "Jeep",
"trim": "Sport",
"spec": "Off-Road Package",
"model": "Wrangler",
"engine": "3.6L V6",
"seatCount": 5,
"doorCount": 4,
"bodyStyle": "SUV",
"drivetrain": "4WD",
"transmission": "Automatic",
"interiorColor": "Black",
"exteriorColor": "Red"
},
"customer": {
"id": "cus_9kd39fkj4l5d",
"addresses": [
{
"id": "adr_9fdk39dkc9d3",
"city": {
"name": "New City",
"state": { "code": "CA" }
},
"zip": "90212",
"line2": "Apt 202",
"line1": "987 New Address Blvd"
}
],
"phoneNumbers": ["555-456-7890"]
},
"facilitator": {
"id": "fac_6dj39dk3kdl3",
"name": "AutoFacilitators Inc.",
"location": {
"id": "loc_2kj49d1msod2",
"zip": "90310",
"city": {
"name": "Uptown",
"state": { "code": "CA" }
},
"line2": "Floor 3",
"line1": "789 Facilitator Road"
}
},
"maximumBidPrice": 50000,
"currentBidPrice": 45000,
"minimumBidPrice": 30000,
"coBuyerOrCoSellerCustomer": {
"id": "cus_k3j5s9qj3w0d",
"addresses": [
{
"id": "adr_4kj6s9qj3w0d",
"city": {
"name": "Anytown",
"state": { "code": "NY" }
},
"zip": "10001",
"line2": "",
"line1": "123 Customer St"
}
],
"phoneNumbers": ["555-987-6543"]
}
}
⌘I