uploadFile

uploadFile Method - Comparison

Purpose

To attach a file to a record.

Request URL

Version 1.0:

https://crm.zoho.com/crm/private/xml/Leads/uploadFile?authtoken=AuthToken&scope=crmapi&id=Record Id&content=File Input Stream

Version 2.0:

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

Method: POST

In multipart/form-data request, provide file parameter with file stream.

Header: Authorization=Zoho-oauthtoken {oauth_token}

Request Parameters

Version 1.0Version 2.0
authtoken=****Authorization=Zoho-oauthtoken ***** - as a Header.
scope=crmapiN/A
newFormatN/A
versionN/A
typeSame as in V1

Sample Responses:

+
Response in Version 1.0Response in Version 2.0
<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/crm/private/xml/Leads/uploadFile">
<result>
<message>File has been attached successfully</message>
<recorddetail>
<FL val="Id">1386586000002579046</FL>
<FL val="Created Time">2018-03-28 14:37:22</FL>
<FL val="Modified Time">2018-03-28 14:37:22</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-28T14:35:04+05:30",
      "Modified_By": {
       "name": "Bruce Wills",
       "id": "1386586000000078001"
      },
      "Created_Time": "2018-03-28T14:35:04+05:30",
      "id": "1386586000002588005"
      "Created_By": {
       "name": "Bruce Wills",
       "id": "1386586000000078001"
      }
     },
     "message": "attachment uploaded successfully",
     "status": "success",
   }
  ]
 }

Share this post : FacebookTwitter

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

Write to us: support@zohocrm.com