gcdev
gcdev

Reputation: 1526

Checking multiple lists for one email address in MailChimp API 3.0

In MailChimp API 2.0 there was a single command, helper/lists-for-email, that would return all of my lists that a particular email address was subscribed to. https://apidocs.mailchimp.com/api/2.0/helper/lists-for-email.php

I'm having trouble finding anything similar in MailChimp API 3.0. http://developer.mailchimp.com/documentation/mailchimp/reference/overview/

We have our own page on our website for managing newsletter preferences, and we need to be able to have some of our list options pre-checked when a logged-in user looks at the list, based on which lists he is subscribed to. All I have been able to figure to do is to check the API for each list individually (10 different API calls) to see if a specific email address is subscribed, but this takes a very long time and I am concerned it may time out for some users depending on network traffic. Either way, it's so long that it's an awful user experience.

Is there one API 3.0 call I can make to find out which of my lists a user is subscribed to, like there was in 2.0?

Upvotes: 2

Views: 530

Answers (1)

gcdev
gcdev

Reputation: 1526

There is now a solution using the following API: http://developer.mailchimp.com/documentation/mailchimp/reference/lists/#read-get_lists

You can include the "email" field to filter by a user's email.

Upvotes: 3

Related Questions