At http://community.constantcontact.com/t5/Documentation/Creating-a-Campaign/ba-p/25047 we are provided a code sample that can be used for creating a new campaign. However, when I copy and paste that code sample so that it can be posted to https://api.constantcontact.com/ws/cusotmers/{username}/campaigns (along with a Content-type parameter set to application/atom+xml) I get the following error in response:
Error 400: ...Element "Email cannot have character [children], because the type's content type is element-only. Error: ...Element 'FromEmail' cannot have character [children], because the type's content type is element-only.... Element "ReplyToEmail' cannot have character [children], because the type's content type is element-only.
How can this be fixed?
Thanks for pointing out the error. It was caused by a formatting issue in line returns. I updated the XML and the documentation to remove the line returns that caused the problem, the example works correctly now. I have noticed subtle differences in copy/paste of the sample depending on which browser I used but that shouldn't cause you any problems.
The holidays have come and gone. For many seasonal businesses, this means the rush of shoppers has decreased as well. Instead of turning off the lights and waiting for spring, make your email marketi...
See Article