cancel
Showing results for 
Search instead for 
Did you mean: 
Tonight (8/23) from 11:00 PM - 12:00AM ET we need to make a few updates to our site. During this time, no emails will be sent and some customers will not be able to access their contacts. We recommend finishing up your work before 11:00 PM and logging in after 12:00 AM ET. Thank you for your patience while we make these updates.

Retrieving a Contact List Collection

Administrator

To retrieve the collection of contact lists for the UserName joesflowers, you perform an HTTP GET on the collection URI, https://api.constantcontact.com/ws/customers/joesflowers/lists in this example, which returns the following XML document:

 

 

<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://api.constantcontact.com/ws/customers/joesflowers/lists</id>
  <title type="text">Contact Lists</title>
  <link href="" />
  <link href="" rel="self" />
  <author>
    <name>Constant Contact Web Services</name>
  </author>
  <updated>2008-04-16T13:07:13.453Z</updated>
  <link href="lists?next=6" rel="next" />
  <link href="lists" rel="first" />
  <link href="lists" rel="current" />
  <entry>
    <link href="/ws/customers/joesflowers/lists/1" rel="edit" />
    <id>http://api.constantcontact.com/ws/customers/joesflowers/lists/1</id>
    <title type="text">General Interest</title>
    <updated>2008-04-16T13:07:14.057Z</updated>
    <content type="application/vnd.ctct+xml">
      <ContactList xmlns="http://ws.constantcontact.com/ns/1.0/"
          id="http://api.constantcontact.com/ws/customers/joesflowers/lists/1">
        <OptInDefault>false</OptInDefault>
        <Name>General Interest</Name>
        <ShortName>General Interest</ShortName>
        <DisplayOnSignup>Yes</DisplayOnsignup>
        <SortOrder>1</SortOrder>
        <Members id="http://api.constantcontact.com/ws/customers/joesflowers/lists/1/members"></Members>
      <ContactCount>42</ContactCount>
      </ContactList>
    </content>
  </entry>
  <entry>
    <link href="/ws/customers/joesflowers/lists/2" rel="edit" />
    <id>http://api.constantcontact.com/ws/customers/joesflowers/lists/2</id>
    <title type="text">Recent Signups</title>
    <updated>2008-04-16T13:07:14.061Z</updated>
    <content type="application/vnd.ctct+xml">
      <ContactList xmlns="http://ws.constantcontact.com/ns/1.0/"
          ?id="http://api.constantcontact.com/ws/customers/joesflowers/lists/2">
        <OptInDefault>false</OptInDefault>
        <Name>Recent Signups</Name>
        <ShortName>Recent Signups</ShortName>
        <DisplayOnSignup>No</DisplayOnsignup>
        <SortOrder>2</SortOrder>
        <Members id="http://api.constantcontact.com/ws/customers/joesflowers/lists/2/members"></Members>
        <ContactCount>712</ContactCount>
      </ContactList>
    </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 ContactList element which describes the attributes of a particular contact list. The structure of the Atom elements is described in detail by RFC 4287.  The user contact lists are ones created by the user, including "General Interests" list, which is created by default.  The system contact lists include "Active", "Removed" and "Do-Not-Mail".  You cannot manipulate the system contact lists directly as they simply indicate the status of each contact, but we provide them in the contact list collection to give you an ability to query all active, removed or opted-out contacts.

webservices