Hi ,
This is my xml to create new contact.
<entry xmlns="http://www.w3.org/2005/Atom">
<title type="text"> </title>
<updated>2011-07-26T14:21:06.407Z</updated>
<author> </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/">
<EmailAddress>tnichols001@aol.com</EmailAddress>
<FirstName>Tracy</FirstName>
<LastName>Roloff</LastName>
<EmailType>HTML</EmailType>
<OptInSource>ACTION_BY_CUSTOMER
</OptInSource>
<ContactLists>
<ContactList id="http://api.constantcontact.com/ws/customers/hudsonhorizons/lists/2"/>
</ContactLists>
</Contact>
</content>
</entry>
I am getting 400 bad request error. I can see one contact which is my account using "GetContactCollection".
Any help is greatly appreciated. I am posting to "https://api.constantcontact.com/ws/customers/hudsonhorizons/contacts" and using "POST" method. I am using trial version.
Thanks in advance,
Veena
Hi Veena,
Try moving the </OptInSource> closing tag up a line and see if it helps. Here is what it would look like:
<OptInSource>ACTION_BY_CUSTOMER</OptInSource>
Let us know if that fixes the issue.
Regards,