API example with Coldfusion

Does anyone have a Coldfusion example they would be willing to share?

Dave Dave, 7 years ago

Unfortunately our older ColdFusion API wrapper has not been updated to include last year's API upgrade. You might want to get in touch with Ben Nadel, a Campaign Monitor customer and ColdFusion guru who may be able to point you in the right direction.

nateshow, 7 years ago

Through trial and error I have got the following code to work "SORT OF"

<cfhttp url="http://api.createsend.com/api/api.asmx/Subscriber.Add" method="POST" timeout="5" name="test" throwonerror="No">
<cfhttpparam type="FORMFIELD" name="ApiKey" value="myapikeyhere" encoded="no">
<cfhttpparam type="FORMFIELD" name="ListID" value="mylistidhere" encoded="no">
<cfhttpparam type="FORMFIELD" name="Email" value="george@whitehouse.net" encoded="no">
<cfhttpparam type="FORMFIELD" name="Name" value="George Washington" encoded="no">
</cfhttp>

<h2>Look at what we have here....</h2>

<cfoutput>
    #cfhttp.filecontent# <br>
       
    <cfdump var="#cfhttp#">
</cfoutput>

This DOES work to add the email to the correct list.  However, it also seems to return an error....

It returns "Connection Failure" and an error code of 200 which is not listed in the help.

Does anyone know what this means?

dunkirk, 7 years ago

Have you received any follow-up on this?  Or is anyone from CM working on a ColdFusion API wrapper?

mp/m

roshodgekiss roshodgekiss, 6 years ago

Apologies for resurrecting this thread, but a ColdFusion library has just been released for the Campaign Monitor API. Thanks to developer Jon Joyce for so keenly developing and documenting the components available for download.


Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
JonJoyce, 6 years ago

Pankaj,

The CM CFC wrapper does not require any dll's etc. Its standard ColdFusion and nothing fancy. Will work fine on shared hosts as long as they give you access to 'CreateObject' which most do.

Thanks,
Jon


Jonathon Joyce

http://www.jonathonjoyce.co.uk/projects/campaign-monitor-cfc/
http://campaignmonitorcfc.riaforge.org/
JonJoyce, 6 years ago

Campaign Monitor CFC has been updated (1.1) to include 6 more functions for dealing with Custom Fields for lists and subscribers, download it here: http://campaignmonitorcfc.riaforge.org/


Jonathon Joyce

http://www.jonathonjoyce.co.uk/projects/campaign-monitor-cfc/
http://campaignmonitorcfc.riaforge.org/

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098