Skip to main content
PATCH
/
salesreps
/
{id}
Update an existing Sales Rep
curl --request PATCH \
  --url https://commerce.driv.ly/api/salesreps/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "agent": "<string>",
  "address": "<string>",
  "primaryPhoneNumber": "<string>",
  "primaryEmail": "<string>",
  "lastName": "<string>",
  "firstName": "<string>",
  "emails": [
    "<string>"
  ],
  "phoneNumbers": [
    "<string>"
  ],
  "roles": [
    "<string>"
  ],
  "creditBands": [
    "<string>"
  ],
  "templates": [
    "<string>"
  ],
  "isAcceptingNewLeads": true
}
'
{
  "data": {
    "id": "<string>",
    "lastName": "<string>",
    "firstName": "<string>",
    "agent": "<string>",
    "address": "<string>",
    "primaryPhoneNumber": "<string>",
    "primaryEmail": "<string>",
    "emails": [
      "<string>"
    ],
    "phoneNumbers": [
      "<string>"
    ],
    "roles": [
      "<string>"
    ],
    "creditBands": [
      "<string>"
    ],
    "templates": [
      "<string>"
    ],
    "isAcceptingNewLeads": true
  },
  "success": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.driv.ly/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

id
string
required

Contact 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

Contact is uniquely identified by id

agent

Contact is automated Agent

address

Contact has Address

primaryPhoneNumber
string

Contact has Primary Phone Number

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

Contact has Primary Email

lastName
string

Contact has Last Name

firstName
string

Contact has First Name

emails
string<idn-email>[]

Contact has Email

phoneNumbers
string[]

Contact has Phone Number

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

Contact has Role

creditBands
(string | Credit Band · object)[]

Sales Rep accepts leads from Credit Band

templates
(string | Template · object)[]

Sales Rep uses Template

isAcceptingNewLeads
boolean

Sales Rep is accepting new leads

Response

Sales Rep Updated

data
Sales Rep · object
Example:
{
"id": "srep_8f9v2j1kd92j",
"emails": [
"sales.rep@example.com",
"contact@example.com"
],
"lastName": "Smith",
"firstName": "Alice",
"templates": ["Welcome Template", "Follow-up Template"],
"creditBands": ["Prime", "Subprime"],
"primaryEmail": "sales.rep@example.com",
"phoneNumbers": ["+1-555-0123", "+1-555-0456"],
"primaryPhoneNumber": "+1-555-0123",
"isAcceptingNewLeads": true
}
success
boolean