Got a backend application that would attempt adding users to contact lists.
I've got a solution using cc_class.php
And the following XML document returns an error "An Error Occured"
<?xml version="1.0" encoding="UTF-8"?> <entry xmlns="http://www.w3.org/2005/Atom"><title>TitleNode</title><updated>2011-05-10T17:19:53+01:00</updated><author><name>[Value Passed in Realtime]</name></author><id>http://api.constantcontact.com/ws/customers/[Value Passed in Realtime]/contacts</id><summary type="text">Customer document</summary><content type="application/vnd.ctct+xml"><Contact xmlns="http://ws.constantcontact.com/ns/1.0/">Customer document<EmailAddress>firstname.lastname@example.org</EmailAddress><FirstName>Karen</FirstName><LastName>Althouse</LastName><OptInSource>ACTION_BY_CUSTOMER</OptInSource><ContactLists><ContactList id=">[Value Passed in Realtime]"/></ContactLists></Contact></content></entry>
What am I doing wrong? and how do I go about getting a List ID ? all I see is the name of the List.
All I want to do is, uisng the First, Last name and Email Address that's available to the application in realtime, initialte the add to contact process.
Thanks in advance
AIM @ iiyohan
I can definitely help you with the issue that you are having with your XML. I took a look at it and I see that the only issue is that you need to have at least one contact list already added when you add the contact. The best way to get the contact list ID is to pull the list of contact lists in the API. You can do this by using the getLists function in the cc_class file.
If you have any questions please let me know.