Error 409: The request contains errors in the common Atom sections, which lie outside

Participant

Error 409: The request contains errors in the common Atom sections, which lie outside



when i am updating my campigan i getting this error

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


and my xml is

<?xml version="1.0" encoding="utf-8"?>
<entry xmlns="http://www.w3.org/2005/Atom">
<link href="/ws/customers/your_username/campaigns/1113241464035" rel="edit" />
<id>http://api.constantcontact.com/ws/customers/your_username/campaigns/1113241464035</id>
<title type="text">test12</title>
<updated>2013-04-30T08:22:12.682Z</updated>
<author>
<name>your_username</name>
</author>
<content type="application/vnd.ctct+xml">
<Campaign id="http://api.constantcontact.com/ws/customers/your_username/campaigns/1113241464035" xmlns="http://ws.constantcontact.com/ns/1.0/">
<Name>test12</Name>
<Status>Draft</Status>
<Date>2013-04-30T08:22:12.682Z</Date>
<Subject>dfghstrytrs</Subject>
<FromName>rakesh g</FromName>
<ViewAsWebpage>NO</ViewAsWebpage>
<ViewAsWebpageLinkText />
<ViewAsWebpageText />
<PermissionReminder>NO</PermissionReminder>
<PermissionReminderText />
<GreetingName>NONE</GreetingName>
<GreetingString />
<OrganizationName />
<OrganizationAddress1 />
<OrganizationAddress2 />
<OrganizationAddress3 />
<OrganizationCity />
<OrganizationState />
<OrganizationInternationalState />
<OrganizationCountry />
<OrganizationPostalCode />
<IncludeForwardEmail>NO</IncludeForwardEmail>
<ForwardEmailLinkText />
<IncludeSubscribeLink>NO</IncludeSubscribeLink>
<SubscribeLinkText />
<EmailContentFormat>HTML</EmailContentFormat>
<EmailContent>&lt;html&gt;&lt;body&gt;tshye567ireik68rtui&lt;/body&gt;&lt;/html&gt;</EmailContent>
<EmailTextContent>tshye567ireik68rtui</EmailTextContent>
<ContactLists>
<ContactList id="http://api.constantcontact.com/ws/customers/your_username/lists/37">
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/your_username/lists/37" rel="self" />
</ContactList>
</ContactLists>
<FromEmail>
<Email id="http://api.constantcontact.com/ws/customers/your_username/settings/emailaddresses/1">
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/your_username/settings/emailaddresses/1" rel="self" />
</Email>
<EmailAddress>your_username</EmailAddress>
</FromEmail>
<ReplyToEmail>
<Email id="http://api.constantcontact.com/ws/customers/your_username/settings/emailaddresses/1">
<link xmlns="http://www.w3.org/2005/Atom" href="/ws/customers/your_username/settings/emailaddresses/1" rel="self" />
</Email>
<EmailAddress>your_username</EmailAddress>
</ReplyToEmail>
</Campaign >
</content>
<source>
<id>http://api.constantcontact.com/ws/customers/your_username/campaigns/1113241464035</id>
<title type="text">test12</title>
<link href="campaigns" />
<link href="campaigns" rel="self" />
<author>
<name>your_username</name>
</author>
<updated>2013-04-30T08:22:12.682Z</updated>
</source>
</entry>

3 REPLIES 3
Employee

Hi,

 

Are you issuing a PUT request to the below url when you get the error?

 

https://api.constantcontact.com/ws/customers/ws/customers/your_username/campaigns/1113241464035

 

How is the XML changed from the XML you receive when you do a GET to the same URL?

 

Best Regards,

Shannon W.

API Support Specialist

 

thanks for the reply shannon

 

yes i using PUT request and i generating new xml and i not changed the date of that campaign

I would recommend doing a GET to the same URI so that you can compare the XML that you are attempting to PUT with the XML that you GET.  The problem can be found in the differences between the two (you should be able to PUT the exact same XML that you see in the response body of a GET).

 

Best Regards,

Shannon W.

API Support Specialist

Developer Portal

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

Visit Page