Retrieving an Individual List

webservices
Administrator

An individual list entry may be retrieved by issuing an HTTP GET to the entry's URI. The URI may be obtained from the Location header after creating a new entry or from the link element with rel="edit" attribute in an existing entry. A typical entry looks like this:

 

 

<entry xmlns="http://www.w3.org/2005/Atom">
  <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-16T18:39:35.710Z</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>
      <SortOrder>1</SortOrder>
    </ContactList>
  </content>
  <source>
    <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-16T18:39:35.717Z</updated>
  </source>
</entry> 

 

Note that the id, title, author and updated elements must be present in the XML in order to conform to the Atom specification, even though their values will be replaced by the server. The <id> element must have an acceptable format (<id>data:,<id> will work). The title and author elements may be empty. The id must contain a URI, but since the value is not used by the server, any URI will work. The server does not check for uniqueness. The updated element must contain a date or date/time value, but again the value is not used by the server.

If the new list is created successfully, the server will return an HTTP status of 201 Created. The HTTP Location header in the response will contain the URI of the newly created List, and the entity body returned will be the entry for the list, including server-generated values like ids and links:

 

 

<entry xmlns="http://www.w3.org/2005/Atom">
  <id>http://api.constantcontact.com/ws/customers/joesflowers/lists/15</id>
  <title type="text">A New List</title>
  <author />
  <updated>2008-04-16T15:28:09.757Z</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/15">
      <OptInDefault>false</OptInDefault>
      <Name>Test list 5</Name>
      <SortOrder>1</SortOrder>
      <ShortName>Test list 5</ShortName>
    </ContactList>
  </content>
  <link href="/ws/customers/joesflowers/lists/15" rel="edit" />
</entry>

 

Community Knowledge Base

Learning & Resources

We take questions asked by customers on the Community and expand on them to help you find answers fast, getting you back to using Constant Contact's suite of amazing tools in no time.

Read More

  • Avatar

    Support Tips

    Social Media

    "There's a multitude of ways to engage your audience through us using your social platforms - via ads, social post metrics, email links, and more! " - Will

    See Article
  • Avatar

    Support Tips

    Call-To-Action Links

    "Target your most engaged contacts by creating a segment. Create a special offer or show your appreciation!" - Caitlin

    See Article
  • Avatar

    Support Tips

    Welcome Your Audience

    "Greet new contacts with one or more automated Welcome Emails depending on their interests or your business goals." - Nick

    See Article