updateRecords Method - Comparison

updateRecords Method - Comparison

Purpose

To update specific or multiple records.

Request URL

Version 1.0:

https://crm.zoho.com/crm/private/xml/Leads/updateRecords?authtoken=AuthToken&scope=crmapi&id=Record ID&xmlData=XML Data

Version 2.0:

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

Method: PUT

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
xmlData N/A - Input data has to be given in request body
id id has to be given in each JSONObject.
wfTrigger=true “trigger”:[“workflow”,”approval”,”blueprint”]
The above key has to be given within request body
newFormat N/A
version N/A
 

Sample API Request:

Request in Version 1.0 Request in Version 2.0
https://crm.zoho.com/crm/private/xml/Leads/insertRecords?authtoken=****&id=1386586000002577004&xmlData=<Leads><row no="1"><FL val="Last Name">test2</FL><FL val="Company">com2</FL></row></Leads> URL - https://www.zohoapis.com/crm/v2/Leads/1386586000002577004
Body:
  {
    "data": [
      {
        "Last_Name":"Jason",
        "Company":"Zylker Corp"
      }
    ],
“triggger”:[“workflow”,”approval”,”blueprint”]
}

Sample Responses:

+
Response in Version 1.0 Response in Version 2.0
<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/crm/private/xml/Leads/updateRecords">
<result>
<message>Record(s) updated successfully</message>
<recorddetail>
<FL val="Id">1386586000002577004</FL>
<FL val="Created Time">2018-03-2719:20:28</FL>
<FL val="Modified Time">2018-03-2810:56:54</FL>
<FL val="Created By"><![CDATA[Bruce Wills]]></FL>
<FL val="Modified By"><![CDATA[Bruce Wills]]></FL>
</recorddetail>
</result>
</response>
{
  "data": [
   {
    "code": "SUCCESS",
    "details": {
     "Modified_Time": "2018-03-27T19:20:28+05:30",
     "Modified_By": {
      "name": "Bruce Wills",
      "id": "1386586000000078001"
     },
     "Created_Time": "2018-03-27T19:20:28+05:30",
     "id": "1386586000002577004",
     "Created_By": {
      "name": "Bruce Wills",
      "id": "1386586000000078001"
     }
    },
    "message": "record updated",
    "status": "success",
   }   ]  }
 

Note:

The field, "id" in v1.0 APIs is equivalent to "id" in the first JSON object of the "data" JSON array.

To update multiple records:

URL:

https://www.zohoapis.com/crm/v2/Leads

Method: PUT

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

Header: Authorization=Zoho-oauthtoken {oauth_token}

Sample Input:

{
  "data": [
    {
      "Last_Name":"test2",
      "Company":"com2",
      “id”:”1386586000002577004”
    },
    {
      "Last_Name":"test3",
      "Company":"com3",
      “id”:”1386586000002577006”
    },
...
  ]
}

    • Related Articles

    • updateRecords Method

      Table of Contents Purpose  Request URL  Request Parameters  Additional Notes  Update owner of the record  Examples  Tasks with contact mapping  Events  Contacts  Quotes  SalesOrders  Products  Test Program  Usage of 'CDATA'  Multiple Record Updates  ...
    • 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 ...