I have built api's for CRM successfully, but I am having difficulties within the campaign.
I am receiveing the following error:
<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/xml/listsubscribe" version="1">
<code>2001</code>
<status>error</status><message>Please enter correct XML(or)JSON format</message></response>
my code to build the api looks like:
public static string zohocrmurl = "https://campaigns.zoho.com/api/xml/listsubscribe?"
string postContent = "authtoken=[authtoken number]";
postContent = postContent + "&scope=CampaignsAPI&version=1&resfmt=XML";
postContent = postContent + "&listkey=[Key number]&contactinfo=";
string sXMLData = "<xml><fl val='Contact Email'><![CDATA[" + sEmail + "]]></fl></xml>";
postContent = postContent + "xmlData=" + HttpUtility.UrlEncode(sXMLData);
postContent = postContent.Replace("+", "%20");
I used the formatting similar to CRM, but I am not having any luck.
I would appreciate any advise on my xml code.
Thank you
Cathy