This is my first foray into the CC API. I have implemented the cc_class in PHP and build a signup form based on add_contact.php. I obtained an API key. I have sucessfully tested authentication via RESTclient. GET works fine for contacts and lists. POST simply doesn't work for adding a new contact from RESTclient, my app or anywhere else.
I have used the cc_class member createContactXML to generate the XML and have written test XML by hand using your API documentation. All POST requests return the following 400 error regardless of the XML source:
Error 400: The request contains errors in the common Atom sections, which lie outside <entry> or <Content>, such as <feed>, <id>, <author> or <updated>.
This suggests to me that your server-side app is broken. Pleas fix it immediatley. I am on a deadline.
Bruce G. Mills
I have done some testing with our API and I was successfully able to perform an http GET, POST, and PUT, and our servers appear to be functoning properly.
The error messaging that you are recieving is indicating an error in the strcture of your XML, but I am not able to give you more information without seeing the XML that you are posting. If you could please reply to this post with your XML, or send it in to our webservices support team and I will be happy to review it and give you feedback.
I have replied to your email regarding creating a new contact. Please feel free to reply to that email, or post on these forums with any other questions or concerns regarding this. Thanks.
I implemented this XML string in may app. It does indeed insert a new record in the customer contact database. However, while I specified list number '2' it was inserted into list #1 (the default list). Not the expected outcome. We created a second list for the purpose of capturing contacts from a new promotion separate from the default list.What is the correct logic/syntax for targeting a specific list? Are lists identified by an integer or a string? Do I need to insert new contacts into the default list and then add the second list to their record?
None of this information appears to be in the online documentation. Some sample code would make this a whole lot easier.
OK. By relentless guesswork and trial-and-error I have gotten this simple function to work. Why so difficult? How about hiring some documentation professionals. Your site/apps would be more widely adopted and your support costs would plummet. Hire me, I'll give you a discount.
Bruce G. Mills