Hi, i am receiving Error 400 from the server while posting a new contact (The remote server returned an error: (400) Bad Request.)
The XML is:
<title type="text" />
<CustomField1>District of Delaware</CustomField1>
<ContactList id="http://api.constantcontact.com/ws/customers/claimsrecovery/lists/General Interest" />
Also, i would like to send a batch of more than one contacts (either new or updates) instead of sending them one by one. Is this possible?
I have looked over your XML and I believe you are getting the 400 error because of the way you have the List node. The list URI has to lead to the lists actual LIST ID, not the name of the list.
Usually, your General Interest list is list 1, so instead of what you have, the list would be http://api.constantcontact.com/ws/customers/(USERNAME)/lists/1.
If you have any questions please let me know.
How do you know what the List ID is? Is it the same as Order? (i.e. if I change the order of the lists, am I changing the list's ID too?)
You can get the list-id by doing a get to your list collections. You can find out more about this here.
Please let me know if this helps.
Thank you for your prompt answer!
OK I used RestClient to get the information so it was relatively painless. :-)
Thanks for the help! Got the correct ID now. But if you just display the ID on the website, that would probably be a handy thing to be able to see.