Update customer by ID
curl --request PUT \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/customers/{customerId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/customers/{customerId}"
payload = {}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": false,
"response": {}
}{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL or object not found"
}{
"message": "Internal Server Error"
}Customers
Update customer by ID
PUT
/
customers
/
{customerId}
Update customer by ID
curl --request PUT \
--url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/customers/{customerId} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{}'import requests
url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/customers/{customerId}"
payload = {}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/customers/{customerId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"error": false,
"response": {}
}{
"error": true,
"errors": [
"error message",
"error message"
]
}{
"message": "Unauthorized"
}{
"message": "Request URL or object not found"
}{
"message": "Internal Server Error"
}Body raw (json)
{
"first_name", // optional | string | max:255
"last_name", // optional | string | max:255
"display_name", // optional | string | required, if first_name and last_name are not provided or empty and should be unique | max:255
"email", // optional | string | email | max:255
"phone", // optional | string | max:255 | description: should be valid phone number
"notes", // optional | string | max:7500
"has_different_billing_address", // optional | boolean | acceptable_values: true,false
"status", // optional | string | acceptable_values: lead,opportunity,current customer,lost,other,inactive
"company_name", // optional | string | max:255
"alt_email", // optional | string | email | max:255
"billing_address_1", // optional | string | max:1000
"billing_address_2", // optional | string | max:1000
"billing_city", // optional | string | max:255
"billing_state", // optional | string | max:255
"billing_zip_code", // optional | string | max:255
"assigned_to", // nullable | integer | description: the id of user whom assigned the customer
"secondary_email", // optional | string | email | max:255
"secondary_phone", // optional | string | max:255 | description: should be valid phone number
"service_address_1", // optional | string | max:255
"service_address_2", // optional | string | max:255
"service_address_city", // optional | string | max:255
"service_address_state", // optional | string | max:255
"service_address_zip_code", // optional | string | max:255
"job_notes", // optional | string | max:4000
"customfields": [ // optional | array | description: array of custom fleds
{
"id", // optional | nullable | required if field_instance_id is not set | integer | custom field id
"field_instance_id", // optional | nullable | required if id is not set | integer | custom field instance id
"value" // required | string | custom value
},
{
"id", // optional | nullable | required if field_instance_id is not set | integer | custom field id
"field_instance_id", // optional | nullable | required if id is not set | integer | custom field instance id
"value" // required | string | custom value
}
],
"locations": [ // optional | array | description: array for creating customer location(s)
{
"object_type", // required | string | description: indicate the location object type. Mostly customer
"object_id", // required | integer | description: indicate the location object id. Mostly customer id
"title", // required | string | max_length:255
"address_1", // nullable | string | max_length:255
"address_2", // nullable | string | max_length:255
"city", // nullable | string | max_length:255
"state", // nullable | string | max_length:255
"zip_code", // nullable | string | max_length:255
"is_main_location" // optional | boolean | acceptable_values: true,false | description: indicate if the location is main. This will be shown in the page
},
{
"object_type", // required | string | description: indicate the location object type. Mostly customer
"object_id", // required | integer | description: indicate the location object id. Mostly customer id
"title", // required | string | max_length:255
"address_1", // nullable | string | max_length:255
"address_2", // nullable | string | max_length:255
"city", // nullable | string | max_length:255
"state", // nullable | string | max_length:255
"zip_code", // nullable | string | max_length:255
"is_main_location" // optional | boolean | acceptable_values: true,false | description: indicate if the location is main. This will be shown in the page
}
],
"account_type", // optional | string | acceptable_values: individual,company | description: indicate customer type
"pipeline_status_id", // optional | integer | description: Existing pipeline status id
"lead_source_id", // optional | integer | description: Existing lead source id
"tags", // optional | array | description: array of existing customer tag ids
"notify_self_assigned" // optional | nullable | boolean | description: when true, the assignee is notified even if they are the user making the request
}
Authorizations
Path Parameters
Body
application/json
Maximum string length:
255Maximum string length:
255Required if first_name and last_name are not provided or empty and should be unique.
Maximum string length:
255Maximum string length:
255Should be valid phone number.
Maximum string length:
255Maximum string length:
7500Available options:
lead, opportunity, current customer, lost, other, inactive Maximum string length:
255Maximum string length:
255Maximum string length:
1000Maximum string length:
1000Maximum string length:
255Maximum string length:
255Maximum string length:
255The id of user whom assigned the customer.
Maximum string length:
255Should be valid phone number.
Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
4000Array for creating customer location(s).
Hide child attributes
Hide child attributes
Indicate the location object type. Mostly customer.
Indicate the location object id. Mostly customer id.
Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Maximum string length:
255Indicate if the location is main. This will be shown in the page.
Indicate customer type.
Available options:
individual, company Existing pipeline status id.
Existing lead source id.
Array of existing customer tag ids.
When true, the assignee is notified even if they are the user making the request.