We all started somewhere! Share your experience on the Get Advice: Let's Get Started Sweepstakes thread and be entered to win a $100 credit on your Constant Contact account.

400 error when creating contact

BobA8
Participant

400 error when creating contact

Im trying to create a contact and add it to a list  but Im not sure what Im missing... here is the xml

 

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<title>TitleNode</title>
<updated>2011-06-20T13:40:03+01:00</updated>
<author><name>CTCT Samples</name></author>
<id>www.fora.tv</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>mike.m@yahoo.com</EmailAddress>
<FirstName>new</FirstName>

<LastName></LastName><MiddleName></MiddleName><CompanyName></CompanyName><JobTitle></JobTitle><OptInSource>ACTION_BY_CUSTOMER</OptInSource><HomePhone></HomePhone><WorkPhone></WorkPhone><Addr1></Addr1><Addr2></Addr2><Addr3></Addr3><City></City><StateCode></StateCode><StateName></StateName><CountryCode></CountryCode><PostalCode></PostalCode><SubPostalCode></SubPostalCode><Note></Note><EmailType></EmailType><CustomField1></CustomField1><CustomField2></CustomField2><CustomField3></CustomField3><CustomField4></CustomField4><CustomField5></CustomField5><CustomField6></CustomField6><CustomField7></CustomField7><CustomField8></CustomField8><CustomField9></CustomField9><CustomField10></CustomField10><CustomField11></CustomField11><CustomField12></CustomField12><CustomField13></CustomField13><CustomField14></CustomField14><CustomField15></CustomField15>

<ContactLists><ContactList id="http://api.constantcontact.com/ws/customers/fora.tv/lists/2"/></ContactLists>

</Contact>
</content></entry>

1 REPLY 1
bsoder
Employee

Hello,

 

I took a look at your XML and I believe that the issue is the ID node.  I changed your ID node to the one that is in the documentation and it did post successfully on my end.  The ID node that I used was:

 

 <id>data:,none</id>

If you have any questions please let me know.

Benjamin Soder
NOC Analyst
Constant Contact
Developer Portal

View API documentation, code samples, get your API key.

Visit Page