400 error when adding new contact

Participant

400 error when adding new contact

I keep getting an error 400, but can't find why it wouldn't be formatted correctly. Second pair of eyes?

 

http://pastebin.com/hFhdLj4k

3 REPLIES 3
Employee

Hi,

 

I didn't have time to do a full review of your XML, but the ID node contents are an issue.  You want to change the id node to something like below:

 

<id>http://api.constantcontact.com/ws/customers/joesflowers/contacts/101 </id>

 

I hope that helps.  Let me know if you still get the error and we will do a full review of the XML.

 

Best Regards,

Shannon W.

API Support Specialist

This is on a brand new contact being added. What would you suggest as the ID in that case?

Hi,

 

For a new contact, the URI ending (after contacts/) doesn't matter, so most people use something like:

 

https://api.constantcontact.com/ws/customers/username/contacts/000

 

Best Regards,

Shannon W.

API Support Specialist

Developer Portal

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

Visit Page