Deletes an existing Lead
curl --request DELETE \
--url https://commerce.driv.ly/api/leads/{id} \
--header 'Authorization: <api-key>'{
"doc": {
"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
},
"message": "<string>"
}Leads
Deletes an existing Lead
Deletes an existing Lead
DELETE
/
leads
/
{id}
Deletes an existing Lead
curl --request DELETE \
--url https://commerce.driv.ly/api/leads/{id} \
--header 'Authorization: <api-key>'{
"doc": {
"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
},
"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.delete(leadsId: string): Promise<void>
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
⌘I