The Community is hosting an End of Summer sweepstakes! Participants must complete tasks to earn tickets that will enter them with a chance to win a free year of Constant Contact and other great prizes!*
*No Purchase Necessary. For Official Rules, visit here. Constant Contact’s End of Summer 2020 Sweepstakes ends on October, 20, 2020 at 11:50 PM EST.

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

Highlighted
Member

"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
Highlighted
Member

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

Highlighted
Honored Contributor

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

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

Constant Contact 2020 End of Summer Community Sweepstakes!

The Constant Contact User Community is hosting a sweepstakes. The more you participate, the more chances you have to win! Read on to learn more...

Read More
Featured