You can use this method to attach files to records.
XML Format:
https://crm.zoho.com/crm/private/xml/Leads/uploadFile?authtoken=Auth Token&scope=crmapi&id=Record Id&content=File Input Stream
JSON Format:
https://crm.zoho.com/crm/private/json/Leads/uploadFile?authtoken=Auth Token&scope=crmapi&id=Record Id&content=File Input Stream
Parameter | Data Type | Description |
authtoken* | String | Encrypted alphanumeric string to authenticate your Zoho credentials. |
scope* | String | Specify the value as crmapi |
id* | String | Specify unique ID of the "record" or "note" to which the file has to be attached. |
content | FileInputStream | Pass the File Input Stream of the file |
attachmentUrl | String | Attach a URL to a record. |
* - Mandatory parameter
Important Note:
You can run this program in your Java Environment to upload a file to a record.
import java.io.*;
import org.apache.commons.httpclient.*;
import org.apache.commons.httpclient.methods.*;
import org.apache.commons.httpclient.methods.multipart.Part;
import org.apache.commons.httpclient.methods.multipart.FilePart;
import org.apache.commons.httpclient.methods.multipart.StringPart;
import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
import org.apache.commons.httpclient.methods.multipart.PartSource;
import org.apache.commons.httpclient.methods.multipart.ByteArrayPartSource;
<?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">335751000000578001</FL>
<FL val="Created Time">2012-06-20 14:57:34</FL>
<FL val="Modified Time">2012-06-20 14:57:34</FL>
<FL val="Created By"><![CDATA[krrish]]></FL>
<FL val="Modified By"><![CDATA[krrish]]></FL>
</recorddetail>
</result>
</response>
The default free storage available in the Free Edition is 1 GB per Org account. In addition to this free 1 GB, the following are the Data Storage limits in each paid edition, applicable per user.