UpdateLead

Function updates an existing lead. Only the sent fields are changed. A new assignee is notified by e-mail

PUT https://rest.crmango.com/api/UpdateLead

Authorization

1 Sent in the request headers
Bearer varchar

Auth token

Body data

22 Sent in the request body
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)

lead_assignee integer

Assigned user, 0 = unassigned
Reference: GetAllUsers

company_id varchar

Company id (IČO)

company_mango_id integer

Company id in Mango
Reference: GetAllCompanies

company_name varchar

Company name

company_country_id integer

Country id
Reference: GetAllStates

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

person_mango_id integer

Person id in Mango
Reference: GetAllPersons

lead_status_id integer

Lead status id
Reference: GetAllLists

lead_source_id integer

Lead source id
Reference: GetAllLists

lead_campaign_id integer

Lead campaign id
Reference: GetAllLists

priority integer

Priority
Options: 1, 2 or 3

lead_note varchar

Note

product_id integer

Id of active product/service

Response

2 HTTP 200

Function updates an existing lead. Only the sent fields are changed

code integer

Return code

message varchar

Info message

Example request

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"
    }
  }'
{
    "code": 200,
    "message": "Lead has been updated"
}