Get a contact list's listid in Interspire Email Marketer
Posted May 8th, 2009 in Interspire Email Marketer
When making calls to the Interspire Email Marketer's API you will often need to know the list id for a contact list but there doesn't seem to be an easy way to get a list of list ids from the admin interface. This post looks at two ways to get the list id for a contact list.
Using a SQL query
The first method is to query the database directly using the following query:
SELECT listid, name FROM email_lists
Note that the exact table name will vary depending what prefix you assigned when you created the database. The prefix I used in my Interspire Email Marketer database was email_ so the table queried is email_lists. If you prefixed the tables with e.g. iem_ then the table in the above query would be iem_lists.
The resulting data from the above query would look something like this:
+--------+--------------------------+ | listid | name | +--------+--------------------------+ | 3 | Apples | | 4 | Oranges | | 5 | Bananas | +--------+--------------------------+ 3 rows in set (0.00 sec)
We can see from the above data that if we wanted to add someone to the "Apples" contact list then we would use listid 3.
Using the admin interface
After you've logged into the Interspire Email Marketer administration interface select "Contact Lists" and then "View Contact Lists"; these two options are highlighted with the first two red arrows to the left in the screenshot below. The third arrow pointing down to the right indicates the "Edit" link for a contact list.

Either move your mouse over the "Edit" link for the contact list that you want the listid for or click it. If you mouse over it, look at the browser's status bar as shown in the screenshot below and look for the id=X value at the end of the URL. This is highlighted with the red box below, and the number is the number of the listid.
If you click the edit link then look at the browser address bar. This is shown in the screenshot below again with the id highlighted with a red box.
Making API calls
Now when you need to add a user to a contact list or query if they are already on a list, you know what the listid is. In my next Interspire Email Marketer post (on Tuesday) I will show how easy it is to query the API to find out if a user is on a list, and the following week a class for making API calls really simple.
You can read more about the Interspire Email Marketer product by visiting the Interspire website for more information.
Related posts:
- Interspire Email Marketer XML API Settings Version 6 (Monday, December 6th 2010)

Comments
blog comments powered by Disqus