Between 8:00 - 9:00 am ET on 10/25 we need to take our site down to make updates. We recommend logging out before 8:00am ET and not using your account during this time. Thank you for your patience while we make these important updates.

UpdateEmailCampaign 409 error

Home & Building Services

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
Moderator

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
Home & Building Services

Thanks Dave,

 

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

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.

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

Home & Building Services

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

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

Home & Building Services

That worked.

 

Thank you,

Alan

 

Developer Portal

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

Visit Page