"Errors in the common Atom sections" trying to update a contact

CityBlastM
Participant

"Errors in the common Atom sections" trying to update a contact

I'm trying to update a contact via the API, but keep getting this cryptic error:

 The request contains errors in the common Atom sections, which lie outside <entry> or <Content>, such as <feed>, <id>, <author> or <updated>

I've tried many different permutations but always get this error updating a contact. Below is the XML. Can someone tell me what's wrong with this XML? From my googling, I understand that this error can be caused by several things. It's not a mismatched email address, I've checked that.

 

This XML was generated by the CTCT PHP library.

 

<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns="http://www.w3.org/2005/Atom"> <title /> <updated>2008-07-23T14:21:06.407Z</updated> <author> <name>CTCT Samples</name> </author> <id>https://api.constantcontact.com/ws/customers/info%40example.com/contacts/4</id> <summary type="text" /> <content type="application/vnd.ctct+xml"> <Contact xmlns="http://ws.constantcontact.com/ns/1.0/"> <EmailAddress>email@example.com</EmailAddress> <FirstName>First</FirstName> <LastName>Last</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>Unpaid</CustomField1> <CustomField2>free</CustomField2> <CustomField3>free</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/info%40cityblast.com/lists/3" /> </ContactLists> </Contact> </content> </entry>

 

2 REPLIES 2
CityBlastM
Participant

Hello,

 

I have done some research and I have found the source of your issue. What is happening is that the ID field submitted in the XML contains an HTTPS URI instead of HTTP. I have included the working and non-working XMl below:

Non-working
<id>https://api.constantcontact.com/ws/customers/info%40example.com/contacts/4</id>

VS.

Working
<id>http://api.constantcontact.com/ws/customers/info%40example.com/contacts/4</id>

 

If you do have any more questions or any issues, you can reply to this post and I will be happy to assist you!

 

Sincerely,

Elijah G.

Tier 2 Support

Elijah G.
API Support Engineer
Developer Portal

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

Visit Page