Campaign.GetLists returning empty

Using the PHP wrapper. I am able to connect, do a Client.GetCampaigns to get all my Campaign IDs, but using any of those campaign IDs with Campaign.GetLists returns an empty array. All these campaigns have one list attached.

If I do a direct HTTP GET:

https://api.createsend.com/api/api.asmx/Campaign.GetLists?ApiKey=[my_api_key]&CampaignID=[campaign_id_returned_from_Client.GetCampaigns]

it also returns empty:

<?xml version="1.0" encoding="utf-8"?>
<anyType d1p1:type="ArrayOfList" xmlns:d1p1="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://api.createsend.com/api/" />

Am I missing something? Thanks in advance.

jamesd jamesd, 6 years ago

I'm pretty sure I've just contacted you via support and it would appear that the campaigns for which you are requesting lists using v2 of the API, are being sent to a segment of a list and not a list itself.

I'd suggest you use the current version of our API (v3), which clearly returns lists and segments for a campaign.

An example of what is returned (in JSON):

{
  "Lists": [
    {
      "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
      "Name": "My List 1"
    },
    {
      "ListID": "b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2",
      "Name": "My List 2"
    }
  ],
  "Segments": [
    {
      "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
      "SegmentID": "c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3c3",
      "Title": "My Segment 1"
    },
    {
      "ListID": "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1",
      "SegmentID": "d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4d4",
      "Title": "My Segment 2"
    }
  ]
}

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