type xml is only supported for type POST and PUT

I have had a sudden change occur in the use of the API that we have been hitting for 12+ months.

We run a simple script to keep our lists in synch with CM, but 3 days ago it started failing with the error:

"Error: type xml is only supported for type post and put"

I am calling lists.list_details() and asking /lists/123456789.xml

The function documentation details using xml|json as valid options.

https://www.campaignmonitor.com/api/lists/#list_details

Has something changed, but the docs have not caught up?

What else could be causing this issue?

sixfive, 1 year ago

Can anyone help please with this? The documentation does state that a GET on xml is ok.

Phil Phil, 1 year ago

Hi sixfive,

That error isn't one which is produced by our API. In addition to that, all of our client libraries use the json endpoints behind the scenes, so i know that the calling code is also not ours.

So i'd say the error is due to a change on your end. It's hard for me to know what that might be, it could be some other component used by your system which has changed behind the scenes without you knowing. Perhaps an upgrade or a patch.

Hopefully this will help you to know where to start looking.

sixfive, 1 year ago

Thanks Phil,

Well you see this is whats weird, as far as I know nothing code wise has changed, and nothing on the server has changed.

Since I posted this originally, we moved servers from ColdFusion 8 to Rail / Tomcat and the error is the same.

I am in the process of assessing the rewrite to give us a switch between json and xml, so it looks like we may just go down that route anyway.

I am using the http://campaignmonitorapi.riaforge.org/ so will make mods and work with the author.

Cheers

Join 150,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098