Overview

Skill Level: Intermediate

Prerequisites

A response element with Type 10 appears in your list if your LIST_TYPE input was 5, 6, or 13 and you had at least one folder. If you include LIST_TYPE 10 in request, it would return ALL Seeds, Suppression, and Test Lists based on whatever VISIBILITY was specified.

Step-by-step

  1. Syntax of the request and response XML for GetLists

    Operation <GetLists>
    Elements VISIBILITY Required. Defines the visibility of the databases to return.

    • 0 – Private
    • 1 – Shared
      LIST_TYPE Defines the type of entity to return. Supported values are:

    • 0 – Databases
    • 1 – Queries
    • 2 – Databases, Contact Lists and Queries
    • 5 – Test Lists
    • 6 – Seed Lists
    • 13 – Suppression Lists
    • 15 – Relational Tables
    • 18 – Contact Lists
      FOLDER_ID Optional parameter to specify a particular folder from which to return databases.
      INCLUDE_ALL_LISTS Optional parameter to specify that the Acoustic Campaign return all databases within subfolders. Valid values are True and False.

    Note: The Acoustic Campaign ignores the FOLDER_ID element if set to True.
      INCLUDE_TAGS Optional parameter to return all tags that are associated with the database.
    Example
    <Envelope>
      <Body>
        <GetLists>
          <VISIBILITY>0</VISIBILITY>
          <LIST_TYPE>2</LIST_TYPE>
        </GetLists>
      </Body>
    </Envelope>
    
    Response <RESULT>
    Elements SUCCESS True if successful.
      LIST XML nodes that define each database.
      Child Element ID Returns the unique ID of the entity.
        NAME Returns the name of the entity.
        TYPE Returns the type. Possible values are:

    • 0 - Databases
    • 1 - Queries
    • 2 - Both databases and Queries
    • 5 - Test Lists
    • 6 - Seed Lists
    • 13 - Suppression Lists
    • 15 - Relational Tables
        SIZE Returns the number of contacts in the database.
        NUM_OPT_OUTS Returns the number of opted-out contacts in the
    database.
        NUM_UNDELIVERABLE Returns the number of undeliverable contacts in the database.
        LAST_MODIFIED Returns the date and time when the database was last modified.
        VISIBILITY Returns the visibility of the database (for example, Shared or Private).
        PARENT_NAME Returns the name of the associated parent database.
        USER_ID Returns the User ID for the database owner.
        PARENT_FOLDER_ID Returns the ID of the folder within which the database resides.
        IS_FOLDER Returns True if the entity is a folder rather than a database, query, or relational table.
        FLAGGED_FOR_BACKUP Indicates whether the database is flagged to be exported by using the Automated backup functions.
        SUPPRESSION_LIST The ID of the associated Suppression List. The element is 0 if no Suppression list is associated.
        Tags If INCLUDE_TAGS is specified in the request, will return any tags that are associated with the database.
          Tag XML nodes that contain the tags that are associated with the database.
    Example
    <Envelope>
      <Body>
        <RESULT>
          <SUCCESS>TRUE</SUCCESS>
          <LIST>
            <ID>365333</ID>
            <NAME>Folder One</NAME>
            <TYPE>0</TYPE>
            <SIZE>0</SIZE>
            <NUM_OPT_OUTS>0</NUM_OPT_OUTS>
            <NUM_UNDELIVERABLE>0</NUM_UNDELIVERABLE>
            <LAST_MODIFIED>08/23/07 04:18 PM</LAST_MODIFIED>
            <VISIBILITY>0</VISIBILITY>
            <PARENT_NAME/>
            <USER_ID>8c3747-111fae2b32c21fbca0cb8d6</USER_ID>
            <PARENT_FOLDER_ID>285607</PARENT_FOLDER_ID>
            <IS_FOLDER>true</IS_FOLDER>
          </LIST>
          <LIST>
            <ID>323543</ID>
            <NAME>List One</NAME>
            <TYPE>0</TYPE>
            <SIZE>1</SIZE>
            <NUM_OPT_OUTS>0</NUM_OPT_OUTS>
            <NUM_UNDELIVERABLE>0</NUM_UNDELIVERABLE>
            <LAST_MODIFIED>09/26/07 10:31 AM</LAST_MODIFIED>
            <VISIBILITY>0</VISIBILITY>
            <PARENT_NAME/>
            <USER_ID>8c3747-111fae23972-f520cb8d6</USER_ID>
            <PARENT_FOLDER_ID>285607</PARENT_FOLDER_ID>
            <IS_FOLDER>false</IS_FOLDER>
          </LIST>
          <LIST>
            <ID>390254</ID>
            <NAME>List two</NAME>
            <TYPE>0</TYPE>
            <SIZE>65</SIZE>
            <NUM_OPT_OUTS>0</NUM_OPT_OUTS>
            <NUM_UNDELIVERABLE>0</NUM_UNDELIVERABLE>
            <LAST_MODIFIED>09/26/07 10:31 AM</LAST_MODIFIED>
            <VISIBILITY>0</VISIBILITY>
            <PARENT_NAME/>
            <USER_ID>8c3747-111ae23d624dbca0cb8d6</USER_ID>
            <PARENT_FOLDER_ID>285607</PARENT_FOLDER_ID>
            <IS_FOLDER>false</IS_FOLDER>
          </LIST>
        </RESULT>
      </Body>
    </Envelope>
    

1 comment on"Get a list of databases"

  1. Hi,
    When I try the interface “GetLists” I receive the following message “<! [CDATA [Session has expired or is invalid]]". I have tried the "Login" interface with the same credentials, the answer is satisfactory and the jsessionid generates me. What can be the error? We use the Postman Collection for the XML API.
    Regards

Join The Discussion

Your email address will not be published. Required fields are marked *