Get a single Lead by its id
curl --request GET \
--url https://commerce.driv.ly/api/leads/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://commerce.driv.ly/api/leads/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://commerce.driv.ly/api/leads/{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/leads/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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/leads/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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/leads/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerce.driv.ly/api/leads/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"updatedAt": "<string>",
"createdAt": "<string>",
"processStatuses": "Qualified Lead",
"reason": "Do Not Contact",
"latestEvent": 123,
"notes": "<string>",
"statusTracker": "<string>",
"searches": [
123
],
"attachments": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phone": "<string>",
"call": "<string>",
"zipcode": "<string>",
"email": "<string>",
"loginEmail": "<string>",
"purchaseOption": "<string>",
"timeToPurchase": [
"ASAP"
],
"monthlyPayment": 123,
"budgetLower": "<string>",
"budgetUpper": "<string>",
"mileageLower": 123,
"mileageUpper": 123,
"cashDown": 123,
"newOrUsed": "<string>",
"bodyStyle": [
"truck"
],
"carStyle": [
"sedan"
],
"truckStyle": [
"crew"
],
"suvStyle": [
"small/compact"
],
"vanStyle": [
"cargo"
],
"yearLower": 123,
"yearUpper": 123,
"year": 123,
"make": "<string>",
"model": "<string>",
"exterior": [
"Silver"
],
"interior": [
"Black"
],
"fuelType": [
"Gasoline"
],
"drivetrain": [
"Four Wheel Drive"
],
"transmission": [
"Automatic"
],
"comfort": [
"Leather/premium Seats"
],
"safety": [
"Adaptive Cruise Control"
],
"entertainment": [
"Premium Audio System"
],
"utility": [
"Towing Package"
],
"subscribe": true,
"agree": true,
"customer": "<string>",
"messageNotifications": true,
"emailNotifications": true,
"emailAlerts": true,
"emailOffers": true,
"leadEvents": [
123
],
"cfZipcode": "<string>",
"cfState": "<string>",
"cfCity": "<string>",
"completedDate": "<string>",
"localTime": "<string>",
"trade": [
123
],
"messages": [
123
],
"creditScore": "<string>",
"contactScore": "<string>",
"contactBelongsTo": "<string>",
"contactType": "<string>",
"contactValid": true,
"testingCustomer": true,
"estimatedAgeRange": "<string>",
"estimatedAddress": "<string>",
"estimatedZipcode": "<string>",
"meetings": [
123
],
"makeAndModel": "<string>",
"conversation": "<string>",
"city": "<string>",
"state": "<string>",
"preApprovalId": "<string>",
"vdpEmails": [
123
],
"favorites": [
123
],
"calls": [
123
],
"salesRep": 123,
"preApprovals": [
123
],
"anonymousId": "<string>",
"manual": true,
"trim": "<string>",
"oneOwner": true,
"customers": 123
}{
"errors": [
{
"message": "<string>"
}
]
}Leads
Get a single Lead by its id
Get a single Lead by its id
GET
/
leads
/
{id}
Get a single Lead by its id
curl --request GET \
--url https://commerce.driv.ly/api/leads/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://commerce.driv.ly/api/leads/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://commerce.driv.ly/api/leads/{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/leads/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$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/leads/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
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/leads/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerce.driv.ly/api/leads/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"updatedAt": "<string>",
"createdAt": "<string>",
"processStatuses": "Qualified Lead",
"reason": "Do Not Contact",
"latestEvent": 123,
"notes": "<string>",
"statusTracker": "<string>",
"searches": [
123
],
"attachments": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"phone": "<string>",
"call": "<string>",
"zipcode": "<string>",
"email": "<string>",
"loginEmail": "<string>",
"purchaseOption": "<string>",
"timeToPurchase": [
"ASAP"
],
"monthlyPayment": 123,
"budgetLower": "<string>",
"budgetUpper": "<string>",
"mileageLower": 123,
"mileageUpper": 123,
"cashDown": 123,
"newOrUsed": "<string>",
"bodyStyle": [
"truck"
],
"carStyle": [
"sedan"
],
"truckStyle": [
"crew"
],
"suvStyle": [
"small/compact"
],
"vanStyle": [
"cargo"
],
"yearLower": 123,
"yearUpper": 123,
"year": 123,
"make": "<string>",
"model": "<string>",
"exterior": [
"Silver"
],
"interior": [
"Black"
],
"fuelType": [
"Gasoline"
],
"drivetrain": [
"Four Wheel Drive"
],
"transmission": [
"Automatic"
],
"comfort": [
"Leather/premium Seats"
],
"safety": [
"Adaptive Cruise Control"
],
"entertainment": [
"Premium Audio System"
],
"utility": [
"Towing Package"
],
"subscribe": true,
"agree": true,
"customer": "<string>",
"messageNotifications": true,
"emailNotifications": true,
"emailAlerts": true,
"emailOffers": true,
"leadEvents": [
123
],
"cfZipcode": "<string>",
"cfState": "<string>",
"cfCity": "<string>",
"completedDate": "<string>",
"localTime": "<string>",
"trade": [
123
],
"messages": [
123
],
"creditScore": "<string>",
"contactScore": "<string>",
"contactBelongsTo": "<string>",
"contactType": "<string>",
"contactValid": true,
"testingCustomer": true,
"estimatedAgeRange": "<string>",
"estimatedAddress": "<string>",
"estimatedZipcode": "<string>",
"meetings": [
123
],
"makeAndModel": "<string>",
"conversation": "<string>",
"city": "<string>",
"state": "<string>",
"preApprovalId": "<string>",
"vdpEmails": [
123
],
"favorites": [
123
],
"calls": [
123
],
"salesRep": 123,
"preApprovals": [
123
],
"anonymousId": "<string>",
"manual": true,
"trim": "<string>",
"oneOwner": true,
"customers": 123
}{
"errors": [
{
"message": "<string>"
}
]
}Usage with the Drivly SDK
Usage with the Drivly SDK
Make sure you install our SDK first. You can find out how, and more here.
import { SDK } from '@drivly/commerce'
import type { leads } from '@drivly/commerce'
const sdk = new SDK(...)
const leads = await sdk.leads.findOne(leadsId: string): Promise<leads>
Authorizations
Path Parameters
id of the Lead
Query Parameters
number of levels to automatically populate relationships and uploads
retrieves document(s) in a specific locale
specifies a fallback locale if no locale value exists
sort by field
pass a where query to constrain returned documents (complex type, see documentation)
Show child attributes
Show child attributes
Example:
{
"or": [
{ "color": { "equals": "mint" } },
{
"and": [
{ "color": { "equals": "white" } },
{ "featured": { "equals": false } }
]
}
]
}
limit the returned documents to a certain number
get a specific page of documents
Response
ok
Available options:
Qualified Lead, Actively Communicating, First Communication Attempt (phone and text), Second Communication Attempt, On Hold, Lost Available options:
Do Not Contact, Duplicate, Looking For Business Financing, Looking For Listings, Looking For Personal Financing, Not Responding, Test, Bad Credit Available options:
ASAP, This week, Within 1-2 weeks, Within 2-4 weeks, Asap, This Week, Within 1-2 Weeks, Within 2-4 Weeks, within 1-2 weeks, within 2-4 weeks, within 1-2 months, other, this week, asap, 2+ months, just browsing, 1-2 months, 1-2 weeks, 2-4 weeks Available options:
truck, car, van, suv, wagon Available options:
sedan, coupe, convertible, hatchback Available options:
crew, reg, extended Available options:
small/compact, mid-size, large/full-size Available options:
cargo, passenger, conversion Available options:
Silver, White, Black, Brown, Blue, Orange, Red, Green, Any color, Beige, Gold, Gray, Light Blue Available options:
Black, Gray, Tan, Beige, Blue, Brown, Red, White, Any color, Ivory, Cream Available options:
Gasoline, Electric, Hybrid, gasoline, flex fuel, diesel, other, hybrid, electric Available options:
Four Wheel Drive, Rear Wheel Drive, Front Wheel Drive, all wheel drive, front wheel drive, rear wheel drive Available options:
Automatic, Manual, automatic, cvt, manual Available options:
Leather/premium Seats, Heated Steering Wheel, leather/premium seats, heated steering wheel, ventilated or cooled seats, heated seats, dual-zone/climate control, power-adjustable seats, noise-cancelling technology, massage seats Available options:
Adaptive Cruise Control, Blind Spot Monitor, lane departure warning, back up camera, 360 camera, park assist, heads-up display, adaptive cruise control, blind spot monitor Available options:
Premium Audio System, Entertainment Package/dvd, premium audio system, apple carplay/android auto, bluetooth, auxiliary input, usb ports, wireless device charging, wi-fi hotspot, navigation system, entertainment package/dvd, satellite radio Available options:
Towing Package, Sunroof/moonroof/panoramic Roof, towing package, sunroof/moonroof/panoramic roof, adaptive suspension, 4 wheel drive, 3rd row seats, handicap accessible