Upcoming changes to Client.GetCampaigns and List.GetStats

Hello All,

We're letting you know that 9am on Monday, 30 November (AEDT), we'll be making some changes to the Campaign Monitor API. As a developer, these changes may affect your projects. Read on to find out about changes to our methods and whether these will impact your code.

Changes to Client.GetCampaigns and List.GetStats

By popular demand, we've added the Name property to the Campaign object returned by Client.GetCampaigns:

  ...
  <Campaign>
    <CampaignID>string</CampaignID>
    <Subject>string</Subject>
    <Name>string</Name>
    <SentDate>string</SentDate>
    <TotalRecipients>int</TotalRecipients>
  </Campaign>
  ...

Not content with that, we've gone a bit further with List.GetStats and added in a whole pile of inactive subscriber statistics into the return type.

  ...
  <anyType xsi:type="ListStatistics">
    <TotalActiveSubscribers>int</TotalActiveSubscribers>
    <NewActiveSubscribersToday>int</NewActiveSubscribersToday>
    <NewActiveSubscribersYesterday>int</NewActiveSubscribersYesterday>
    <NewActiveSubscribersThisWeek>int</NewActiveSubscribersThisWeek>
    <NewActiveSubscribersThisMonth>int</NewActiveSubscribersThisMonth>
    <NewActiveSubscribersThisYear>int</NewActiveSubscribersThisYear>
    <TotalUnsubscribes>int</TotalUnsubscribes>
    <UnsubscribesToday>int</UnsubscribesToday>
    <UnsubscribesYesterday>int</UnsubscribesYesterday>
    <UnsubscribesThisWeek>int</UnsubscribesThisWeek>
    <UnsubscribesThisMonth>int</UnsubscribesThisMonth>
    <UnsubscribesThisYear>int</UnsubscribesThisYear>
    <TotalDeleted>int</TotalDeleted>
    <DeletedToday>int</DeletedToday>
    <DeletedYesterday>int</DeletedYesterday>
    <DeletedThisWeek>int</DeletedThisWeek>
    <DeletedThisMonth>int</DeletedThisMonth>
    <DeletedThisYear>int</DeletedThisYear>
    <TotalBounces>int</TotalBounces>
    <BouncesToday>int</BouncesToday>
    <BouncesYesterday>int</BouncesYesterday>
    <BouncesThisWeek>int</BouncesThisWeek>
    <BouncesThisMonth>int</BouncesThisMonth>
    <BouncesThisYear>int</BouncesThisYear>

</anyType>
...


How do I access this new data?

These fields are available immediately to anyone manually consuming the web service or using the PHP or new Python wrapper. We plan on revising the .NET and Java wrappers on Monday and updates to the Ruby wrapper should follow close behind.

Will my projects be affected?

If your code manually parses the XML in an order-dependant manner, then you will be affected. For example, if you use the method Client.GetCampaigns and your code expects the element <SentDate> to immediately follow <Subject> then your code will break. Thankfully, most parsers and wrappers are not order-dependant, so we anticipate that this will affect very few projects.

That's a wrap for now.

Thank you for using the API - these improvements are the result of your ongoing support and feedback. We're perpetually looking for ways to make it more efficient, flexible and easier to use, so if you have any questions or comments, please let us know via the developer forums.

Happy coding!

- The Campaign Monitor API development team

unclemantis, 7 years ago

Is there a way to test before Monday comes around? This is a holiday weekend.

I am using the Microsoft.XMLDOM and pulling information that way. I am accessing the campaign information as show below. From what I read in the post I should not be affected. Is this the case for me? Is there a way for me to test before the end of today?

Set xmlDOM = Server.CreateObject("Microsoft.XMLDOM")
xmlDOM.async = false
xmlDOM.LoadXml(xXML)

For each xmlNode22 in xmlDOM.getElementsByTagName("Campaign")
    campaignid = xmlNode22.selectSingleNode("CampaignID").text
    subject = xmlNode22.selectSingleNode("Subject").text
    sentdate = xmlNode22.selectSingleNode("SentDate").text
    totalrecipients = xmlNode22.selectSingleNode("TotalRecipients").text

Phil Phil, 7 years ago

Hi unclemantis,

Based on that code you'll be fine with no changes, and it'll be a simple matter to insert the extra lines to deal with the campaign name once the changes go live.

Unfortunately we don't yet have a nice sandbox environment for you, although i've added your voice to a feature request. We understand that makes testing next to impossible, but these posts are simply to make developers aware of what's coming, and in a very few rare cases perhaps even make changes in advance to prevent their code from breaking.

Join 200,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