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.

UpdateEmailCampaign 409 error

Highlighted
Real Estate

UpdateEmailCampaign 409 error

I'm at a loss here.  I'm trying to do a simple update  to an email campaign and I can not get past a 409 error.

Here is my sample code. 

 

Dim emailCampaign = Utility.GetEmailCampaignById(AuthenticationData, "1111762489670")

emailCampaign.Content  = HttpContext.Current.Server.HtmlEncode("<html><title></title><body>test</body></html>")

emailCampaign.TextContent = HttpContext.Current.Server.HtmlEncode("<html><title></title><body>test</body></html>")

ConstantContactUtility.Utility.UpdateEmailCampaign(AuthenticationData, emailCampaign)

 

Please help.

 

Thanks,

Alan

 

7 REPLIES 7
Highlighted
Moderator

Re: UpdateEmailCampaign 409 error

I'll have someone on our developer support team take a look at this ASAP.  My guess is that there is a content issue that is causing a 409 error.  While 409 generally means Conflict, we do have some known defects that can result in a 409 being returned due to the values of some of the fields being incorrect.  Will update if we find additional information to share with you or need any more information to get into this further.

Dave Berard
Senior Product Manager, Constant Contact
Highlighted
Real Estate

Re: UpdateEmailCampaign 409 error

Thanks Dave,

 

Hope you find something soon.  It seems like I have tried everthing to get this to work, but no luck.

Highlighted
Developer

Re: UpdateEmailCampaign 409 error

I'm finding that I get a 409 Conflict error when I PUT a campaign and do NOT change the campain NAME.  If I change the name of the campaign, the PUT succeeds.  If I don't, I get the 409 error.

Highlighted
Employee

Re: UpdateEmailCampaign 409 error

Hi,

 

I've tested this on my end to make sure I can update a campaign's content (without also changing the name of the campaign).  I modified your code a small amount since I wasn't using an html encoding library, and have a different campaign ID.  The below code worked to update campaign contents.

 

Dim basicAuth = New AuthenticationData(apiKey, Username, Password)

Dim emailCampaign = Utility.GetEmailCampaignById(basicAuth, "1111718684019")
emailCampaign.Content = "&lt;html&gt;&lt;title&gt;&lt;/title&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;"
emailCampaign.TextContent = "&lt;html&gt;&lt;title&gt;&lt;/title&gt;&lt;body&gt;test&lt;/body&gt;&lt;/html&gt;"
ConstantContactUtility.Utility.UpdateEmailCampaign(basicAuth, emailCampaign)

 

I have seen 409 errors occur when updating information in accounts due to encoding issues with usernames that contain special characters.  Do either of your usernames contain special characters, like an @ symbol?

 

Best Regards,

Shannon W.

API Support Specialist

Highlighted
Real Estate

Re: UpdateEmailCampaign 409 error

I tried to change the campaign name and still get the same error.  I changed the content to an encoded string, and that didn't help. 

 

My username is an email so it has an "@" symbol in it.  My password also has an "@" symbol in it.  Should I take out these special characters out and try it?

 

Thanks,

Alan

Highlighted
Employee

Re: UpdateEmailCampaign 409 error

Hi Alan,

 

Yes, I suspect when your credentials are handled, the @ symbols are getting encoded and not decoded again when making the calls to update properties in your account.  

 

Best Regards,

Shannon W.

API Support Specialist

Highlighted
Real Estate

Re: UpdateEmailCampaign 409 error

That worked.

 

Thank you,

Alan

 

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