Sales
Update an existing Sales Rep
PATCH
/
salesreps
/
{id}
curl --request PATCH \
--url https://commerce.driv.ly/api/salesreps/{id} \
--header 'Content-Type: application/json' \
--data '{
"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
}'
{
"data": {
"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": true
}
Path Parameters
Contact is uniquely identified by id
Query Parameters
The number of levels of related objects to include in the response
Body
application/json
Response
200
application/json
Sales Rep Updated
The response is of type object
.
curl --request PATCH \
--url https://commerce.driv.ly/api/salesreps/{id} \
--header 'Content-Type: application/json' \
--data '{
"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
}'
{
"data": {
"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": true
}