Function updates an existing lead. Only the sent fields are changed. A new assignee is notified by e-mail
https://rest.crmango.com/api/UpdateLead
Bearer
varchar
Auth token
lead_name
varchar
Lead name
when_contact_date
date
Date when to contact the lead (YYYY-MM-DD)
contacted_date
date
Date when the lead was contacted (YYYY-MM-DD)
company_id
varchar
Company id (IČO)
company_name
varchar
Company name
company_country
varchar
Country ISO2 code
company_address
varchar
Company address
company_postal
varchar
Company postal
person_name
varchar
Person name
person_surname
varchar
Person surname
person_phone
varchar
Person phone number
person_email
varchar
Person e-mail
priority
integer
Priority
Options: 1, 2 or 3
lead_note
varchar
Note
product_id
integer
Id of active product/service
Function updates an existing lead. Only the sent fields are changed
code
integer
Return code
message
varchar
Info message
curl --request PUT \
--url 'https://rest.crmango.com/api/UpdateLead' \
--header 'Authorization: Bearer auth_token' \
--header 'Content-Type: application/json' \
--data '{
"lead_id": 150,
"data": {
"lead_status_id": 2,
"lead_assignee": 5,
"priority": 1,
"lead_note": "Called, waiting for an offer"
}
}'
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://rest.crmango.com/api/UpdateLead',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{
"lead_id": 150,
"data": {
"lead_status_id": 2,
"lead_assignee": 5,
"priority": 1,
"lead_note": "Called, waiting for an offer"
}
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer auth_token',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
echo $response;
var data = JSON.stringify({
"lead_id": 150,
"data": {
"lead_status_id": 2,
"lead_assignee": 5,
"priority": 1,
"lead_note": "Called, waiting for an offer"
}
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === 4) {
console.log(this.responseText);
}
});
xhr.open("PUT", "https://rest.crmango.com/api/UpdateLead");
xhr.setRequestHeader("Authorization", "Bearer auth_token");
xhr.setRequestHeader("Content-Type", "application/json");
xhr.send(data);
import requests
import json
url = "https://rest.crmango.com/api/UpdateLead"
payload = json.dumps({
"lead_id": 150,
"data": {
"lead_status_id": 2,
"lead_assignee": 5,
"priority": 1,
"lead_note": "Called, waiting for an offer"
}
})
headers = {
'Authorization': 'Bearer auth_token',
'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
{
"code": 200,
"message": "Lead has been updated"
}
{
"code": "int",
"message": "string"
}