UpdateRecords

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.0Version 2.0
authtoken=****Authorization=Zoho-oauthtoken ***** - as a Header.
scope=crmapiN/A
xmlDataN/A - Input data has to be given in request body
idid has to be given in each JSONObject.
wfTrigger=true“trigger”:[“workflow”,”approval”,”blueprint”]
The above key has to be given within request body
newFormatN/A
versionN/A
 

Sample API Request:

Request in Version 1.0Request 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.0Response 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”
    },
...
  ]
}

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohocrm.com