I'm trying to create an event using the API and it works using the XML specified in the "creating and event" doc found here:
However, when I try to add additional nodes, "Description" for example, it throws the following error:
400 Invalid content was found starting with element 'Description'. Ensure all element names are spelled properly and the same element is not included in the input too many times.
The spelling is correct and there are no dups. Can you not submit an event with additional parameters through the API other than those specified from the link above?
Are you including any HTML tags/code in your description? If so, these aren't allowed within the description element, and our system would have no way to distinquish them from the XML tags, so would likely error when it came across a tag that was not valid for the XML.
Can you capture your XML, and post it here (after removing any account credentials or unique identifyers you don't want to share), or email it with a link to this topic to firstname.lastname@example.org? We'd be happy to take a look at it and do some trial and error troubleshooting to see if we can help you find the source of the problem.
Thanks for the help! I tried it empty and with just text (no HTML) and both give the same error.
This is the XML I'm trying to pass:
<Name>2015 Run For Dimes 5K</Name>
<Title>2015 Run For Dimes 5K</Title>
<Description>This is a desritpion</Description>
If I remove the "<Description>This is a desritpion</Description>" line, the event is created. However, adding it back in, gives me the 400 error.
I'm in a trial period so I'm not sure if there are some restrictions with that.
Please let me know if you need additional info. Thanks again for the help!
Thank you for sending that XML so we can take a look at that. The issue you are running into is due to the fact that the Event Creation through the API does not currently support a Description field. This is something that you would only be able to add and edit by logging into your Constant Contact account.
The response contains the Description field as that is information that does exist in the Event and would also show it in a GET, however it can't be edited with the API. Also if you try to do a PUT to do an update to the event you will receive a 404 error as editing the event is very limited.
Thanks for the update.
Is this something that will change in the near future? Are my only options those in the example? I'm trying to get around the lack of multi-user support/privelages with Constant Contact. We have store locations in different states so we need a way for those stores to add events without giving them admin access to the backend. I really like Constant Contact and want to use it as our event management but I need a way to allow multiple users to add events without giving them complete control over the system.
Are there any other options around this?
Our accounts are intended to service one brand/location per account, as you are aware, but the short answer to your question is that you can work around this by controlling access to different functions of your integration on your end. Because all of the calls to the functions to create campaigns is handled in your application/integration, if you control access to these functions for your users at your integration, and store your authentication credentials on your side, for use in making the actual calls, there is no reason you couldn't effectively work around the single user/brand account limitation. It would just require the appropriate development on your part to implement access controls for your users.
Yes, I'm aware of the single user account and forgive me if I misunderstood your response but that's what I was trying to do with the API. I'm trying to control access by creating a form that our stores can use to add events. However, the fields that are allowed though the API are very limited so it would require one person to go back in and add all the descriptions, location info, etc, to each event, which defeats the purpose.
If those few fields are the only ones allowed when creating an event through the API, it doesn't matter the development, it can't be done. Or am I missing something? Are there different levels of authentication?
Thank you for the feedback. I see the problem for your application given our current event API functionality. Our Events API is one of the newer additions to our API services, and additional updates to it's capabilities may be added in future updates. Our developers pay attention to feature requests we submit on customer behalf and which are posted on this forum.
Thanks for the update! I guess I'll continue my search for event management but will circle back to check on any new developments that may change to the event API.