convertLeads Method - Comparison

convertLeads Method - Comparison

Purpose

To convert lead to potential, account and contact.

Request URL

Version 1.0:

https://crm.zoho.com/crm/private/xml/Leads/convertLead?authtoken=AuthToken&scope=crmapi&leadId=entity Id&xmlData=POTENTIALXMLDATA

Version 2.0:

URL: https://www.zohoapis.com/crm/v2/Leads/{record_id}/actions/convert

Method: POST

Request body: The content of a record given in JSON format.

Header: Authorization=Zoho-oauthtoken {oauth_token}

Request Parameters

Version 1.0 Version 2.0
authtoken=**** Authorization=Zoho-oauthtoken ***** - as a Header.
scope=crmapi N/A
id id has to be given in the request URL.
 

Sample API Request:

Request in Version 1.0 Request in Version 2.0
https://crm.zoho.com/crm/private/xml/Leads/convertLead?authtoken=***&id=1386586000002574001&xmlData=<Potentials>
<row no="1">
<option val="createPotential">true</option>
<option val="assignTo">sample@zoho.com</option>
<option val="notifyLeadOwner">true</option>
<option val="notifyNewEntityOwner">true</option>
</row>
<row no="2">
<FL val="Potential Name">Samplepotential</FL>
<FL val="Closing Date">12/21/2009</FL>
<FL val="Potential Stage">Closed Won</FL>
<FL val="Contact Role">Purchasing</FL>
<FL val="Amount">3432.23</FL>
<FL val="Probability">100</FL>
</row>
</Potentials>
https://www.zohoapis.com/crm/v2/Leads/{record_id}/actions/convert
Body: {
  "data": [
   {
    "overwrite": true,
    "notify_lead_owner": true,
    "notify_new_entity_owner": true,
    "Accounts": "1386586000000753001",
    "Contacts": "1386586000000599023",
    "assign_to": "1386586000000105001",
    "Deals": {
     "Campaign_Source": "1386586000000803001",
     "Deal_Name": "Potential_Name1",
     "Closing_Date": "2016-02-18",
     "Stage": "Stage0",
     "Amount": 56.6
    }
   }
  ]
}
 

Note:

  • 1386586000000753001 is account id
  • 1386586000000599023 is contact id
  • 1386586000000105001 is user id
  • 1386586000000803001 is campaign id

Sample Responses:

Response in Version 1.0 Response in Version 2.0
<?xml version="1.0" encoding="UTF-8" ?>
<success>
<Contact param="id">1386586000002579015</Contact>
<Potential param="id">1386586000002579018</Potential>
</success>
{
  "data": [
    {
      "Contacts":"1386586000000599023",
      "Deals":"1386586000002577051",
      "Accounts":"1386586000000753001",
    }
  ]
}
    • Related Articles

    • downloadPhoto Method - Comparison

      Purpose To download the photo of a lead or a contact. Request URL Version 1.0: https://crm.zoho.com/crm/private/xml/(Leads or Contacts)/downloadPhoto?authtoken=AuthToken&scope=crmapi&id=RecordID Version 2.0: URL: ...
    • downloadFile Method - Comparison

      Purpose To download a file attached to a record. Request URL Version 1.0: https://crm.zoho.com/crm/private/xml/Leads/downloadFile?authtoken=AuthToken&scope=crmapi&id=Attachment Id Version 2.0: URL: ...
    • deletePhoto Method - Comparison

      Purpose To delete a photo of a contact or lead. Request URL Version 1.0: https://crm.zoho.com/crm/private/xml/(Leads or Contacts)/deletePhoto?authtoken=AuthToken&scope=crmapi&id=RecordID Version 2.0: URL: https://www.zohoapis.com/crm/v2/{Leads or ...
    • deleteRecords Method - Comparison

      Purpose To delete the selected records. Request URL Version 1.0: https://crm.zoho.com/crm/private/xml/Leads/deleteRecords?authtoken=AuthToken&scope=crmapi&id=Record ID Version 2.0: URL: https://www.zohoapis.com/crm/v2/Leads/{record_id} Method: DELETE ...
    • deleteFile Method - Comparison

      Purpose To delete a file attached to a record. Request URL Version 1.0: https://crm.zoho.com/crm/private/xml/Leads/deleteFile?authtoken=AuthToken&scope=crmapi&sid=Attachment Id Version 2.0: URL: ...