I submitted this in the ticket section a while ago and have not heard anything back. I have an online ordering system on my website and want to use customer data to the CRM. The below script seems to follow the API guideline, but I am still geting the 4600 error. Please let me know how to solve this.
<?php
$api_key = "HIDDEN";
$zoho_url = "https://crm.zoho.com/crm/private/xml/";
$xml ="<?xml version='1.0' encoding='UTF-8'?><Leads><row no='1'><FL val='First name'>".$fname."</FL><FL val='Last name'>".$lname."</FL><FL val='Phone number'>".$phonenum."</FL><FL val='Your email'>".$email."</FL><FL val='Type of paper needed '>".$papertype."</FL><FL val='Paper format'>".$paperformat."</FL><FL val='Subject or Topic category'>".$cat."</FL><FL val='Topic'>".$topic."</FL><FL val='Attach file'>".$file."</FL><FL val='Number Of Sources required'>".$numsource."</FL><FL val='Paper instructions'>".$paperinst."</FL><FL val='Pages'>".$pages."</FL><FL val='Final submission deadline date'>".$finalsub."</FL><FL val='Total Price'>".$getfinalprice."</FL></row></Leads>";
$ticket='2cd54b9e5426a10a4c35e6de29498b0f';
$header[] = "Host: ".$zoho_url."Leads/insertRecords";
$header[] = "Content-type: text/xml";
$header[] = "Content-length: ".strlen($xml) . "\r\n";
$header[] = $xml;
$url= $zoho_url."Leads/insertRecords?newFormat=1&apikey=".$api_key."&ticket=".$ticket."&xmldata=".$xml;
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//make the request
$result = curl_exec($ch);
?>
Here is the error we get:
<response><error><code>4600</code><message>Unable to process your request. Please verify if the name and value is appropriate for the "xmlData" parameter.</message></error></response>