The Contact List Members collection is used to list Contacts within a specific list. Like all the collections in this API, the response is paged. Use the links in the response (rel="next") to retrieve additional pages of list members.
Retrieving a Contacts Collection from a Specific List
To retrieve the collection of contacts within a list with listid of 1 for the UserName joesflowers, you perform an HTTP GET on the collection URI:
https://api.constantcontact.com/ws/customers/joesflowers/lists/1/members
which returns the following XML document:
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>http://api.constantcontact.com/ws/customers/joesflowers/lists/1/members</id>
<title type="text">Contacts for Customer: joesflowers</title>
<link href="http://api.constantcontact.com/ws/customers/joesflowers/lists/1/members" />
<link href="http://api.constantcontact.com/ws/customers/joesflowers/lists/1/members" rel="self" />
<author>
<name>joesflowers</name>
</author>
<updated>2009-05-14T18:23:24.271Z</updated>
<link href="/ws/customers/joesflowers/lists/1/members" rel="first" />
<link href="/ws/customers/joesflowers/lists/1/members" rel="current" />
<entry>
<link href="/ws/customers/joesflowers/lists/1/members/26" rel="edit" />
<id>http://api.constantcontact.com/ws/customers/joesflowers/contacts/26</id>
<title type="text">Contact: ssg@sg.cc</title>
<updated>2009-05-14T18:23:26.692Z</updated>
<author>
<name>Constant Contact</name>
</author>
<content type="application/vnd.ctct+xml">
<ContactListMember xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/joesflowers/contacts/26">
<EmailAddress>ssg@sg.cc</EmailAddress>
<Name></Name>
</ContactListMember>
</content>
</entry>
<entry>
<link href="/ws/customers/joesflowers/lists/1/members/25" rel="edit" />
<id>http://api.constantcontact.com/ws/customers/joesflowers/contacts/25</id>
<title type="text">Contact: sg23@sg.cc</title>
<updated>2009-05-14T18:23:26.693Z</updated>
<author>
<name>Constant Contact</name>
</author>
<content type="application/vnd.ctct+xml">
<ContactListMember xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/joesflowers/contacts/25">
<EmailAddress>sg23@sg.cc</EmailAddress>
<Name>ss</Name>
</ContactListMember>
</content>
</entry>
<entry>
<link href="/ws/customers/joesflowers/lists/1/members/24" rel="edit" />
<id>http://api.constantcontact.com/ws/customers/joesflowers/contacts/24</id>
<title type="text">Contact: sgddd@sg.cc</title>
<updated>2009-05-14T18:23:26.694Z</updated>
<author>
<name>Constant Contact</name>
</author>
<content type="application/vnd.ctct+xml">
<ContactListMember xmlns="http://ws.constantcontact.com/ns/1.0/" id="http://api.constantcontact.com/ws/customers/joesflowers/contacts/24">
<EmailAddress>sgddd@sg.cc</EmailAddress>
<Name>MAss</Name>
</ContactListMember>
</content>
</entry>
</feed>
The response is made up of a feed
element which contains some metadata about the feed followed by a series of entry
elements. Each entry
is made up of some metadata followed by a content
element. Inside the content
element is a ContactListMember
element which describes some of the important attributes of a particular contact.
Note that in order to get all the data about a particular contact, you must get the individual contact entry, which contains the complete contact data.
To view an example of how to use Contact List Members collection in Java, click here.
The structure of the Atom elements is described in detail by RFC 4287. The structure of the ContactListMember
element is describe below.
ContactListMember Data Format