Following is my xml being generated for create contact (ACTION_BY_CUSTOMER) API call (v1)
<?xml version='1.0' encoding='UTF-8'?> <entry xmlns="http://www.w3.org/2005/Atom"> <title type="text">test</title> <updated>2014-10-13T09:01:06Z</updated> <author>test</author> <id>data:,none</id> <summary type="text">Contact</summary> <content type="application/vnd.ctct+xml"> <Contact xmlns="http://ws.constantcontact.com/ns/1.0/">
<ContactList id="https://email@example.com/lists/28" /> </ContactLists> </Contact> </content> </entry>
The curl is returning following error
"erorr: The requested URL returned error: 400"
I have gone through the forum, and forum and error_code documentation, and from that I undertand that this is related with xml malformed. But I can't figure out what's wrong with my xml. Could antone please help me?
After reviewing this XML, I find that it is most likely that the problem here is specifically that you are attempting to add contacts to a list that no longer exists. In this XML the contact is specifically being added to a list with the ID of 28, which is failing. In order to view the list IDs for all of the lists currently in your account, you can make a GET API request to https://api.constantcontact.com/ws/customers/USERNAME/lists
If you have any questions or any issues with updating the list ID, please let us know!