Skip to main content
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>",
  "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
}
'
{
  "message": "<string>",
  "errors": [
    "<string>"
  ],
  "docs": [
    {
      "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
    }
  ]
}
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

Authorization
string
header
required

Query Parameters

sort
string

sort by field

where
Where clause · object
required

pass a where query to constrain returned documents (complex type, see documentation)

Example:
{
"or": [
{ "color": { "equals": "mint" } },
{
"and": [
{ "color": { "equals": "white" } },
{ "featured": { "equals": false } }
]
}
]
}
limit
number

limit the returned documents to a certain number

page
number

get a specific page of documents

depth
number

number of levels to automatically populate relationships and uploads

locale
string

retrieves document(s) in a specific locale

fallback-locale
string

specifies a fallback locale if no locale value exists

Body

application/json
updatedAt
string
required
createdAt
string
required
processStatuses
enum<string> | null
Available options:
Qualified Lead,
Actively Communicating,
First Communication Attempt (phone and text),
Second Communication Attempt,
On Hold,
Lost
reason
enum<string> | null
Available options:
Do Not Contact,
Duplicate,
Looking For Business Financing,
Looking For Listings,
Looking For Personal Financing,
Not Responding,
Test,
Bad Credit
latestEvent
notes
string | null
statusTracker
string | null
searches
(number | Search · object)[] | null
attachments
string | null
firstName
string | null
lastName
string | null
phone
string | null
call
string | null
zipcode
string | null
email
string | null
loginEmail
string | null
purchaseOption
string | null
timeToPurchase
enum<string>[] | null
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
monthlyPayment
number | null
budgetLower
string | null
budgetUpper
string | null
mileageLower
number | null
mileageUpper
number | null
cashDown
number | null
newOrUsed
string | null
bodyStyle
enum<string>[] | null
Available options:
truck,
car,
van,
suv,
wagon
carStyle
enum<string>[] | null
Available options:
sedan,
coupe,
convertible,
hatchback
truckStyle
enum<string>[] | null
Available options:
crew,
reg,
extended
suvStyle
enum<string>[] | null
Available options:
small/compact,
mid-size,
large/full-size
vanStyle
enum<string>[] | null
Available options:
cargo,
passenger,
conversion
yearLower
number | null
yearUpper
number | null
year
number | null
make
string | null
model
string | null
exterior
enum<string>[] | null
Available options:
Silver,
White,
Black,
Brown,
Blue,
Orange,
Red,
Green,
Any color,
Beige,
Gold,
Gray,
Light Blue
interior
enum<string>[] | null
Available options:
Black,
Gray,
Tan,
Beige,
Blue,
Brown,
Red,
White,
Any color,
Ivory,
Cream
fuelType
enum<string>[] | null
Available options:
Gasoline,
Electric,
Hybrid,
gasoline,
flex fuel,
diesel,
other,
hybrid,
electric
drivetrain
enum<string>[] | null
Available options:
Four Wheel Drive,
Rear Wheel Drive,
Front Wheel Drive,
all wheel drive,
front wheel drive,
rear wheel drive
transmission
enum<string>[] | null
Available options:
Automatic,
Manual,
automatic,
cvt,
manual
comfort
enum<string>[] | null
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
safety
enum<string>[] | null
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
entertainment
enum<string>[] | null
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
utility
enum<string>[] | null
Available options:
Towing Package,
Sunroof/moonroof/panoramic Roof,
towing package,
sunroof/moonroof/panoramic roof,
adaptive suspension,
4 wheel drive,
3rd row seats,
handicap accessible
subscribe
boolean | null
agree
boolean | null
customer
string | null
messageNotifications
boolean | null
emailNotifications
boolean | null
emailAlerts
boolean | null
emailOffers
boolean | null
leadEvents
(number | LeadEvent · object)[] | null
cfZipcode
string | null
cfState
string | null
cfCity
string | null
completedDate
string | null
localTime
string | null
trade
(number | Trade · object)[] | null
messages
(number | Message · object)[] | null
creditScore
string | null
contactScore
string | null
contactBelongsTo
string | null
contactType
string | null
contactValid
boolean | null
testingCustomer
boolean | null
estimatedAgeRange
string | null
estimatedAddress
string | null
estimatedZipcode
string | null
meetings
(number | Meeting · object)[] | null
makeAndModel
string | null
conversation
string | null
city
string | null
state
string | null
preApprovalId
string | null
vdpEmails
(number | VdpEmail · object)[] | null
favorites
(number | CrmVehicle · object)[] | null
calls
(number | Call · object)[] | null
salesRep
preApprovals
(number | PreApproval · object)[] | null
anonymousId
string | null
manual
boolean | null
trim
string | null
oneOwner
boolean | null
customers

Response

200 - application/json

ok

message
string
errors
string[]
docs
Lead · object[]