Mad Mimi

Get Audience list members

GET /audience_lists/{list_name OR list_id}/members.{format}

Returns audience members paged in the desired format. list_name should be correctly URI encoded. format is one of xml, json or csv

Optional Parameters

per_page to set the number of audience members returned per page. Must be between 1 and 100
page to set the current page to fetch
order to set the ordering. Must be one of: email, first_name, last_name, created_at, or membership_created_at
order_dir to set the order direction. Must be either asc or desc
suppressed_only to return only those audience members that are explicitly suppressed from the list
raw, when set, will include suppressed audience members in results. Valid values: true or 1, false or 0.

Sample Output

XML

<?xml version="1.0" encoding="UTF-8"?>
<audience count="2" total_pages="1" page="1" per_page="100">
<member suppressed="false">
  <first_name>Test</first_name>
  <last_name>One</last_name>
  <email>test.1@example.com</email>
  <created_at>Tue Nov 29 03:14:45 UTC 2011</created_at>
  <city></city>
  <phone></phone>
  <company></company>
  <title></title>
  <address></address>
  <state></state>
  <zip></zip>
  <country></country>
  <lists>
    <list>test</list>
  </lists>
</member>
<member suppressed="false">
  <first_name>Test</first_name>
  <last_name>Two</last_name>
  <email>test.2@example.com</email>
  <created_at>Fri Oct 14 04:03:24 UTC 2011</created_at>
  <city></city>
  <phone></phone>
  <company></company>
  <title></title>
  <address></address>
  <state></state>
  <zip></zip>
  <country></country>
  <lists>
    <list>test</list>
  </lists>
</member>
</audience>

JSON

{
    "count": 2,
    "page": "1",
    "total_pages": 1,
    "per_page": 100,
    "audience": [{
        "columns": {
            "created_at": {
                "data": "Tue Nov 29 03:14:45 UTC 2011",
                "json_class": "Time"
            },
            "company": "",
            "email": "test.1@example.com",
            "phone": "",
            "zip": "",
            "city": "",
            "last_name": "One",
            "country": "",
            "first_name": "Test",
            "address": "",
            "state": ""
        },
        "lists": ["test"]
    }, {
        "columns": {
            "created_at": {
                "data": "Fri Oct 14 04:03:24 UTC 2011",
                "json_class": "Time"
            },
            "company": "",
            "email": "test.2@example.com",
            "phone": "",
            "zip": "",
            "city": "",
            "last_name": "Two",
            "country": "",
            "first_name": "Test",
            "address": "",
            "state": ""
        },
        "lists": ["test"]
    }]
}

CSV

The CSV format is really a plain text list of email addresses at this time.

test.1@example.com
test.2@example.com