Skip to main content
PATCH
/
leads
/
{id}
Update an existing Lead
curl --request PATCH \
  --url https://commerce.driv.ly/api/leads/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "salesRep": "<string>",
  "consumer": "<string>",
  "phoneNumber": "<string>",
  "email": "<string>",
  "favorites": [
    "<string>"
  ],
  "acceptsGeneratedMessages": true
}
'
{
  "data": {
    "id": "<string>",
    "phoneNumber": "<string>",
    "email": "<string>",
    "salesRep": "<string>",
    "consumer": "<string>",
    "favorites": [
      "<string>"
    ],
    "acceptsGeneratedMessages": true
  },
  "success": true
}

Path Parameters

id
string
required

Lead is uniquely identified by id

Query Parameters

depth
integer

The number of levels of related objects to include in the response

Body

application/json
id
string

Lead is uniquely identified by id

salesRep

Sales Rep is assigned to Lead

consumer

Lead participates in transactions as Consumer

phoneNumber
string

Lead has Phone Number

Pattern: ^\+?1?[- ]?\(?([0-9]{3})\)?[- ]?([0-9]{3})-?([0-9]{4})$
email
string<idn-email>

Lead has Email

favorites
(string | Vehicle · object)[]

Lead favorites Vehicle

acceptsGeneratedMessages
boolean

Lead accepts generated messages

Response

Lead Updated

data
Lead · object
Example:
{
"id": "led_3k2jd9s8v2s4",
"email": "contact@example.com",
"salesRep": "SalesRep ID",
"consumer": "Consumer ID",
"favorites": ["Vehicle ID Number"],
"phoneNumber": "555-6789",
"acceptsGeneratedMessages": true
}
success
boolean