Update multiple Leads
curl --request PATCH \
--url https://commerce.driv.ly/api/leads \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"updatedAt": "<string>",
"createdAt": "<string>",
"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": [],
"monthlyPayment": 123,
"budgetLower": "<string>",
"budgetUpper": "<string>",
"mileageLower": 123,
"mileageUpper": 123,
"cashDown": 123,
"newOrUsed": "<string>",
"bodyStyle": [],
"carStyle": [],
"truckStyle": [],
"suvStyle": [],
"vanStyle": [],
"yearLower": 123,
"yearUpper": 123,
"year": 123,
"make": "<string>",
"model": "<string>",
"exterior": [],
"interior": [],
"fuelType": [],
"drivetrain": [],
"transmission": [],
"comfort": [],
"safety": [],
"entertainment": [],
"utility": [],
"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
}
'import requests
url = "https://commerce.driv.ly/api/leads"
payload = {
"updatedAt": "<string>",
"createdAt": "<string>",
"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": [],
"monthlyPayment": 123,
"budgetLower": "<string>",
"budgetUpper": "<string>",
"mileageLower": 123,
"mileageUpper": 123,
"cashDown": 123,
"newOrUsed": "<string>",
"bodyStyle": [],
"carStyle": [],
"truckStyle": [],
"suvStyle": [],
"vanStyle": [],
"yearLower": 123,
"yearUpper": 123,
"year": 123,
"make": "<string>",
"model": "<string>",
"exterior": [],
"interior": [],
"fuelType": [],
"drivetrain": [],
"transmission": [],
"comfort": [],
"safety": [],
"entertainment": [],
"utility": [],
"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
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
updatedAt: '<string>',
createdAt: '<string>',
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: [],
monthlyPayment: 123,
budgetLower: '<string>',
budgetUpper: '<string>',
mileageLower: 123,
mileageUpper: 123,
cashDown: 123,
newOrUsed: '<string>',
bodyStyle: [],
carStyle: [],
truckStyle: [],
suvStyle: [],
vanStyle: [],
yearLower: 123,
yearUpper: 123,
year: 123,
make: '<string>',
model: '<string>',
exterior: [],
interior: [],
fuelType: [],
drivetrain: [],
transmission: [],
comfort: [],
safety: [],
entertainment: [],
utility: [],
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
})
};
fetch('https://commerce.driv.ly/api/leads', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'updatedAt' => '<string>',
'createdAt' => '<string>',
'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' => [
],
'monthlyPayment' => 123,
'budgetLower' => '<string>',
'budgetUpper' => '<string>',
'mileageLower' => 123,
'mileageUpper' => 123,
'cashDown' => 123,
'newOrUsed' => '<string>',
'bodyStyle' => [
],
'carStyle' => [
],
'truckStyle' => [
],
'suvStyle' => [
],
'vanStyle' => [
],
'yearLower' => 123,
'yearUpper' => 123,
'year' => 123,
'make' => '<string>',
'model' => '<string>',
'exterior' => [
],
'interior' => [
],
'fuelType' => [
],
'drivetrain' => [
],
'transmission' => [
],
'comfort' => [
],
'safety' => [
],
'entertainment' => [
],
'utility' => [
],
'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
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://commerce.driv.ly/api/leads"
payload := strings.NewReader("{\n \"updatedAt\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"latestEvent\": 123,\n \"notes\": \"<string>\",\n \"statusTracker\": \"<string>\",\n \"searches\": [\n 123\n ],\n \"attachments\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phone\": \"<string>\",\n \"call\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"email\": \"<string>\",\n \"loginEmail\": \"<string>\",\n \"purchaseOption\": \"<string>\",\n \"timeToPurchase\": [],\n \"monthlyPayment\": 123,\n \"budgetLower\": \"<string>\",\n \"budgetUpper\": \"<string>\",\n \"mileageLower\": 123,\n \"mileageUpper\": 123,\n \"cashDown\": 123,\n \"newOrUsed\": \"<string>\",\n \"bodyStyle\": [],\n \"carStyle\": [],\n \"truckStyle\": [],\n \"suvStyle\": [],\n \"vanStyle\": [],\n \"yearLower\": 123,\n \"yearUpper\": 123,\n \"year\": 123,\n \"make\": \"<string>\",\n \"model\": \"<string>\",\n \"exterior\": [],\n \"interior\": [],\n \"fuelType\": [],\n \"drivetrain\": [],\n \"transmission\": [],\n \"comfort\": [],\n \"safety\": [],\n \"entertainment\": [],\n \"utility\": [],\n \"subscribe\": true,\n \"agree\": true,\n \"customer\": \"<string>\",\n \"messageNotifications\": true,\n \"emailNotifications\": true,\n \"emailAlerts\": true,\n \"emailOffers\": true,\n \"leadEvents\": [\n 123\n ],\n \"cfZipcode\": \"<string>\",\n \"cfState\": \"<string>\",\n \"cfCity\": \"<string>\",\n \"completedDate\": \"<string>\",\n \"localTime\": \"<string>\",\n \"trade\": [\n 123\n ],\n \"messages\": [\n 123\n ],\n \"creditScore\": \"<string>\",\n \"contactScore\": \"<string>\",\n \"contactBelongsTo\": \"<string>\",\n \"contactType\": \"<string>\",\n \"contactValid\": true,\n \"testingCustomer\": true,\n \"estimatedAgeRange\": \"<string>\",\n \"estimatedAddress\": \"<string>\",\n \"estimatedZipcode\": \"<string>\",\n \"meetings\": [\n 123\n ],\n \"makeAndModel\": \"<string>\",\n \"conversation\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"preApprovalId\": \"<string>\",\n \"vdpEmails\": [\n 123\n ],\n \"favorites\": [\n 123\n ],\n \"calls\": [\n 123\n ],\n \"salesRep\": 123,\n \"preApprovals\": [\n 123\n ],\n \"anonymousId\": \"<string>\",\n \"manual\": true,\n \"trim\": \"<string>\",\n \"oneOwner\": true,\n \"customers\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://commerce.driv.ly/api/leads")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"updatedAt\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"latestEvent\": 123,\n \"notes\": \"<string>\",\n \"statusTracker\": \"<string>\",\n \"searches\": [\n 123\n ],\n \"attachments\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phone\": \"<string>\",\n \"call\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"email\": \"<string>\",\n \"loginEmail\": \"<string>\",\n \"purchaseOption\": \"<string>\",\n \"timeToPurchase\": [],\n \"monthlyPayment\": 123,\n \"budgetLower\": \"<string>\",\n \"budgetUpper\": \"<string>\",\n \"mileageLower\": 123,\n \"mileageUpper\": 123,\n \"cashDown\": 123,\n \"newOrUsed\": \"<string>\",\n \"bodyStyle\": [],\n \"carStyle\": [],\n \"truckStyle\": [],\n \"suvStyle\": [],\n \"vanStyle\": [],\n \"yearLower\": 123,\n \"yearUpper\": 123,\n \"year\": 123,\n \"make\": \"<string>\",\n \"model\": \"<string>\",\n \"exterior\": [],\n \"interior\": [],\n \"fuelType\": [],\n \"drivetrain\": [],\n \"transmission\": [],\n \"comfort\": [],\n \"safety\": [],\n \"entertainment\": [],\n \"utility\": [],\n \"subscribe\": true,\n \"agree\": true,\n \"customer\": \"<string>\",\n \"messageNotifications\": true,\n \"emailNotifications\": true,\n \"emailAlerts\": true,\n \"emailOffers\": true,\n \"leadEvents\": [\n 123\n ],\n \"cfZipcode\": \"<string>\",\n \"cfState\": \"<string>\",\n \"cfCity\": \"<string>\",\n \"completedDate\": \"<string>\",\n \"localTime\": \"<string>\",\n \"trade\": [\n 123\n ],\n \"messages\": [\n 123\n ],\n \"creditScore\": \"<string>\",\n \"contactScore\": \"<string>\",\n \"contactBelongsTo\": \"<string>\",\n \"contactType\": \"<string>\",\n \"contactValid\": true,\n \"testingCustomer\": true,\n \"estimatedAgeRange\": \"<string>\",\n \"estimatedAddress\": \"<string>\",\n \"estimatedZipcode\": \"<string>\",\n \"meetings\": [\n 123\n ],\n \"makeAndModel\": \"<string>\",\n \"conversation\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"preApprovalId\": \"<string>\",\n \"vdpEmails\": [\n 123\n ],\n \"favorites\": [\n 123\n ],\n \"calls\": [\n 123\n ],\n \"salesRep\": 123,\n \"preApprovals\": [\n 123\n ],\n \"anonymousId\": \"<string>\",\n \"manual\": true,\n \"trim\": \"<string>\",\n \"oneOwner\": true,\n \"customers\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerce.driv.ly/api/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"updatedAt\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"latestEvent\": 123,\n \"notes\": \"<string>\",\n \"statusTracker\": \"<string>\",\n \"searches\": [\n 123\n ],\n \"attachments\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phone\": \"<string>\",\n \"call\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"email\": \"<string>\",\n \"loginEmail\": \"<string>\",\n \"purchaseOption\": \"<string>\",\n \"timeToPurchase\": [],\n \"monthlyPayment\": 123,\n \"budgetLower\": \"<string>\",\n \"budgetUpper\": \"<string>\",\n \"mileageLower\": 123,\n \"mileageUpper\": 123,\n \"cashDown\": 123,\n \"newOrUsed\": \"<string>\",\n \"bodyStyle\": [],\n \"carStyle\": [],\n \"truckStyle\": [],\n \"suvStyle\": [],\n \"vanStyle\": [],\n \"yearLower\": 123,\n \"yearUpper\": 123,\n \"year\": 123,\n \"make\": \"<string>\",\n \"model\": \"<string>\",\n \"exterior\": [],\n \"interior\": [],\n \"fuelType\": [],\n \"drivetrain\": [],\n \"transmission\": [],\n \"comfort\": [],\n \"safety\": [],\n \"entertainment\": [],\n \"utility\": [],\n \"subscribe\": true,\n \"agree\": true,\n \"customer\": \"<string>\",\n \"messageNotifications\": true,\n \"emailNotifications\": true,\n \"emailAlerts\": true,\n \"emailOffers\": true,\n \"leadEvents\": [\n 123\n ],\n \"cfZipcode\": \"<string>\",\n \"cfState\": \"<string>\",\n \"cfCity\": \"<string>\",\n \"completedDate\": \"<string>\",\n \"localTime\": \"<string>\",\n \"trade\": [\n 123\n ],\n \"messages\": [\n 123\n ],\n \"creditScore\": \"<string>\",\n \"contactScore\": \"<string>\",\n \"contactBelongsTo\": \"<string>\",\n \"contactType\": \"<string>\",\n \"contactValid\": true,\n \"testingCustomer\": true,\n \"estimatedAgeRange\": \"<string>\",\n \"estimatedAddress\": \"<string>\",\n \"estimatedZipcode\": \"<string>\",\n \"meetings\": [\n 123\n ],\n \"makeAndModel\": \"<string>\",\n \"conversation\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"preApprovalId\": \"<string>\",\n \"vdpEmails\": [\n 123\n ],\n \"favorites\": [\n 123\n ],\n \"calls\": [\n 123\n ],\n \"salesRep\": 123,\n \"preApprovals\": [\n 123\n ],\n \"anonymousId\": \"<string>\",\n \"manual\": true,\n \"trim\": \"<string>\",\n \"oneOwner\": true,\n \"customers\": 123\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"errors": [
"<string>"
],
"docs": [
{
"updatedAt": "<string>",
"createdAt": "<string>",
"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": [],
"monthlyPayment": 123,
"budgetLower": "<string>",
"budgetUpper": "<string>",
"mileageLower": 123,
"mileageUpper": 123,
"cashDown": 123,
"newOrUsed": "<string>",
"bodyStyle": [],
"carStyle": [],
"truckStyle": [],
"suvStyle": [],
"vanStyle": [],
"yearLower": 123,
"yearUpper": 123,
"year": 123,
"make": "<string>",
"model": "<string>",
"exterior": [],
"interior": [],
"fuelType": [],
"drivetrain": [],
"transmission": [],
"comfort": [],
"safety": [],
"entertainment": [],
"utility": [],
"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
}
]
}Leads
Update multiple Leads
Update all Leads matching the where query
PATCH
/
leads
Update multiple Leads
curl --request PATCH \
--url https://commerce.driv.ly/api/leads \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"updatedAt": "<string>",
"createdAt": "<string>",
"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": [],
"monthlyPayment": 123,
"budgetLower": "<string>",
"budgetUpper": "<string>",
"mileageLower": 123,
"mileageUpper": 123,
"cashDown": 123,
"newOrUsed": "<string>",
"bodyStyle": [],
"carStyle": [],
"truckStyle": [],
"suvStyle": [],
"vanStyle": [],
"yearLower": 123,
"yearUpper": 123,
"year": 123,
"make": "<string>",
"model": "<string>",
"exterior": [],
"interior": [],
"fuelType": [],
"drivetrain": [],
"transmission": [],
"comfort": [],
"safety": [],
"entertainment": [],
"utility": [],
"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
}
'import requests
url = "https://commerce.driv.ly/api/leads"
payload = {
"updatedAt": "<string>",
"createdAt": "<string>",
"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": [],
"monthlyPayment": 123,
"budgetLower": "<string>",
"budgetUpper": "<string>",
"mileageLower": 123,
"mileageUpper": 123,
"cashDown": 123,
"newOrUsed": "<string>",
"bodyStyle": [],
"carStyle": [],
"truckStyle": [],
"suvStyle": [],
"vanStyle": [],
"yearLower": 123,
"yearUpper": 123,
"year": 123,
"make": "<string>",
"model": "<string>",
"exterior": [],
"interior": [],
"fuelType": [],
"drivetrain": [],
"transmission": [],
"comfort": [],
"safety": [],
"entertainment": [],
"utility": [],
"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
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
updatedAt: '<string>',
createdAt: '<string>',
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: [],
monthlyPayment: 123,
budgetLower: '<string>',
budgetUpper: '<string>',
mileageLower: 123,
mileageUpper: 123,
cashDown: 123,
newOrUsed: '<string>',
bodyStyle: [],
carStyle: [],
truckStyle: [],
suvStyle: [],
vanStyle: [],
yearLower: 123,
yearUpper: 123,
year: 123,
make: '<string>',
model: '<string>',
exterior: [],
interior: [],
fuelType: [],
drivetrain: [],
transmission: [],
comfort: [],
safety: [],
entertainment: [],
utility: [],
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
})
};
fetch('https://commerce.driv.ly/api/leads', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'updatedAt' => '<string>',
'createdAt' => '<string>',
'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' => [
],
'monthlyPayment' => 123,
'budgetLower' => '<string>',
'budgetUpper' => '<string>',
'mileageLower' => 123,
'mileageUpper' => 123,
'cashDown' => 123,
'newOrUsed' => '<string>',
'bodyStyle' => [
],
'carStyle' => [
],
'truckStyle' => [
],
'suvStyle' => [
],
'vanStyle' => [
],
'yearLower' => 123,
'yearUpper' => 123,
'year' => 123,
'make' => '<string>',
'model' => '<string>',
'exterior' => [
],
'interior' => [
],
'fuelType' => [
],
'drivetrain' => [
],
'transmission' => [
],
'comfort' => [
],
'safety' => [
],
'entertainment' => [
],
'utility' => [
],
'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
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://commerce.driv.ly/api/leads"
payload := strings.NewReader("{\n \"updatedAt\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"latestEvent\": 123,\n \"notes\": \"<string>\",\n \"statusTracker\": \"<string>\",\n \"searches\": [\n 123\n ],\n \"attachments\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phone\": \"<string>\",\n \"call\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"email\": \"<string>\",\n \"loginEmail\": \"<string>\",\n \"purchaseOption\": \"<string>\",\n \"timeToPurchase\": [],\n \"monthlyPayment\": 123,\n \"budgetLower\": \"<string>\",\n \"budgetUpper\": \"<string>\",\n \"mileageLower\": 123,\n \"mileageUpper\": 123,\n \"cashDown\": 123,\n \"newOrUsed\": \"<string>\",\n \"bodyStyle\": [],\n \"carStyle\": [],\n \"truckStyle\": [],\n \"suvStyle\": [],\n \"vanStyle\": [],\n \"yearLower\": 123,\n \"yearUpper\": 123,\n \"year\": 123,\n \"make\": \"<string>\",\n \"model\": \"<string>\",\n \"exterior\": [],\n \"interior\": [],\n \"fuelType\": [],\n \"drivetrain\": [],\n \"transmission\": [],\n \"comfort\": [],\n \"safety\": [],\n \"entertainment\": [],\n \"utility\": [],\n \"subscribe\": true,\n \"agree\": true,\n \"customer\": \"<string>\",\n \"messageNotifications\": true,\n \"emailNotifications\": true,\n \"emailAlerts\": true,\n \"emailOffers\": true,\n \"leadEvents\": [\n 123\n ],\n \"cfZipcode\": \"<string>\",\n \"cfState\": \"<string>\",\n \"cfCity\": \"<string>\",\n \"completedDate\": \"<string>\",\n \"localTime\": \"<string>\",\n \"trade\": [\n 123\n ],\n \"messages\": [\n 123\n ],\n \"creditScore\": \"<string>\",\n \"contactScore\": \"<string>\",\n \"contactBelongsTo\": \"<string>\",\n \"contactType\": \"<string>\",\n \"contactValid\": true,\n \"testingCustomer\": true,\n \"estimatedAgeRange\": \"<string>\",\n \"estimatedAddress\": \"<string>\",\n \"estimatedZipcode\": \"<string>\",\n \"meetings\": [\n 123\n ],\n \"makeAndModel\": \"<string>\",\n \"conversation\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"preApprovalId\": \"<string>\",\n \"vdpEmails\": [\n 123\n ],\n \"favorites\": [\n 123\n ],\n \"calls\": [\n 123\n ],\n \"salesRep\": 123,\n \"preApprovals\": [\n 123\n ],\n \"anonymousId\": \"<string>\",\n \"manual\": true,\n \"trim\": \"<string>\",\n \"oneOwner\": true,\n \"customers\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://commerce.driv.ly/api/leads")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"updatedAt\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"latestEvent\": 123,\n \"notes\": \"<string>\",\n \"statusTracker\": \"<string>\",\n \"searches\": [\n 123\n ],\n \"attachments\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phone\": \"<string>\",\n \"call\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"email\": \"<string>\",\n \"loginEmail\": \"<string>\",\n \"purchaseOption\": \"<string>\",\n \"timeToPurchase\": [],\n \"monthlyPayment\": 123,\n \"budgetLower\": \"<string>\",\n \"budgetUpper\": \"<string>\",\n \"mileageLower\": 123,\n \"mileageUpper\": 123,\n \"cashDown\": 123,\n \"newOrUsed\": \"<string>\",\n \"bodyStyle\": [],\n \"carStyle\": [],\n \"truckStyle\": [],\n \"suvStyle\": [],\n \"vanStyle\": [],\n \"yearLower\": 123,\n \"yearUpper\": 123,\n \"year\": 123,\n \"make\": \"<string>\",\n \"model\": \"<string>\",\n \"exterior\": [],\n \"interior\": [],\n \"fuelType\": [],\n \"drivetrain\": [],\n \"transmission\": [],\n \"comfort\": [],\n \"safety\": [],\n \"entertainment\": [],\n \"utility\": [],\n \"subscribe\": true,\n \"agree\": true,\n \"customer\": \"<string>\",\n \"messageNotifications\": true,\n \"emailNotifications\": true,\n \"emailAlerts\": true,\n \"emailOffers\": true,\n \"leadEvents\": [\n 123\n ],\n \"cfZipcode\": \"<string>\",\n \"cfState\": \"<string>\",\n \"cfCity\": \"<string>\",\n \"completedDate\": \"<string>\",\n \"localTime\": \"<string>\",\n \"trade\": [\n 123\n ],\n \"messages\": [\n 123\n ],\n \"creditScore\": \"<string>\",\n \"contactScore\": \"<string>\",\n \"contactBelongsTo\": \"<string>\",\n \"contactType\": \"<string>\",\n \"contactValid\": true,\n \"testingCustomer\": true,\n \"estimatedAgeRange\": \"<string>\",\n \"estimatedAddress\": \"<string>\",\n \"estimatedZipcode\": \"<string>\",\n \"meetings\": [\n 123\n ],\n \"makeAndModel\": \"<string>\",\n \"conversation\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"preApprovalId\": \"<string>\",\n \"vdpEmails\": [\n 123\n ],\n \"favorites\": [\n 123\n ],\n \"calls\": [\n 123\n ],\n \"salesRep\": 123,\n \"preApprovals\": [\n 123\n ],\n \"anonymousId\": \"<string>\",\n \"manual\": true,\n \"trim\": \"<string>\",\n \"oneOwner\": true,\n \"customers\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://commerce.driv.ly/api/leads")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"updatedAt\": \"<string>\",\n \"createdAt\": \"<string>\",\n \"latestEvent\": 123,\n \"notes\": \"<string>\",\n \"statusTracker\": \"<string>\",\n \"searches\": [\n 123\n ],\n \"attachments\": \"<string>\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"phone\": \"<string>\",\n \"call\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"email\": \"<string>\",\n \"loginEmail\": \"<string>\",\n \"purchaseOption\": \"<string>\",\n \"timeToPurchase\": [],\n \"monthlyPayment\": 123,\n \"budgetLower\": \"<string>\",\n \"budgetUpper\": \"<string>\",\n \"mileageLower\": 123,\n \"mileageUpper\": 123,\n \"cashDown\": 123,\n \"newOrUsed\": \"<string>\",\n \"bodyStyle\": [],\n \"carStyle\": [],\n \"truckStyle\": [],\n \"suvStyle\": [],\n \"vanStyle\": [],\n \"yearLower\": 123,\n \"yearUpper\": 123,\n \"year\": 123,\n \"make\": \"<string>\",\n \"model\": \"<string>\",\n \"exterior\": [],\n \"interior\": [],\n \"fuelType\": [],\n \"drivetrain\": [],\n \"transmission\": [],\n \"comfort\": [],\n \"safety\": [],\n \"entertainment\": [],\n \"utility\": [],\n \"subscribe\": true,\n \"agree\": true,\n \"customer\": \"<string>\",\n \"messageNotifications\": true,\n \"emailNotifications\": true,\n \"emailAlerts\": true,\n \"emailOffers\": true,\n \"leadEvents\": [\n 123\n ],\n \"cfZipcode\": \"<string>\",\n \"cfState\": \"<string>\",\n \"cfCity\": \"<string>\",\n \"completedDate\": \"<string>\",\n \"localTime\": \"<string>\",\n \"trade\": [\n 123\n ],\n \"messages\": [\n 123\n ],\n \"creditScore\": \"<string>\",\n \"contactScore\": \"<string>\",\n \"contactBelongsTo\": \"<string>\",\n \"contactType\": \"<string>\",\n \"contactValid\": true,\n \"testingCustomer\": true,\n \"estimatedAgeRange\": \"<string>\",\n \"estimatedAddress\": \"<string>\",\n \"estimatedZipcode\": \"<string>\",\n \"meetings\": [\n 123\n ],\n \"makeAndModel\": \"<string>\",\n \"conversation\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"preApprovalId\": \"<string>\",\n \"vdpEmails\": [\n 123\n ],\n \"favorites\": [\n 123\n ],\n \"calls\": [\n 123\n ],\n \"salesRep\": 123,\n \"preApprovals\": [\n 123\n ],\n \"anonymousId\": \"<string>\",\n \"manual\": true,\n \"trim\": \"<string>\",\n \"oneOwner\": true,\n \"customers\": 123\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>",
"errors": [
"<string>"
],
"docs": [
{
"updatedAt": "<string>",
"createdAt": "<string>",
"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": [],
"monthlyPayment": 123,
"budgetLower": "<string>",
"budgetUpper": "<string>",
"mileageLower": 123,
"mileageUpper": 123,
"cashDown": 123,
"newOrUsed": "<string>",
"bodyStyle": [],
"carStyle": [],
"truckStyle": [],
"suvStyle": [],
"vanStyle": [],
"yearLower": 123,
"yearUpper": 123,
"year": 123,
"make": "<string>",
"model": "<string>",
"exterior": [],
"interior": [],
"fuelType": [],
"drivetrain": [],
"transmission": [],
"comfort": [],
"safety": [],
"entertainment": [],
"utility": [],
"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
}
]
}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.unknown()
Authorizations
Query Parameters
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
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
Body
application/json
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 ⌘I