How can I retrieve list members using given a unique_email_id on Mailchimp API v3?
Asked Answered
H

2

7

Given a unique_email_id, how can I retrieve all list members matching that ID?

I am attempting to use the search-members endpoint, ala what I do for searching email-addresses:

https://us9.api.mailchimp.com/3.0/[email protected]

but instead (given a unique_email_id of 4dce5

https://us9.api.mailchimp.com/3.0/search-members?query=4dce5

and I'm getting no results.

Is there another endpoint I'm missing?

Horowitz answered 19/7, 2017 at 13:41 Comment(2)
Have you solved this problem? I'm having the same issue at the moment.Leanoraleant
So far I have not. Mailchimp for whatever reason does not really support easily searching across lists.Horowitz
C
6

However using the query string ?unique_email_id=X attached to the end of GET lists/list_id/members will pull up anyone with that specific EUID.

Indeed this works very well. Example :

GET /3.0/lists/dfc3cf4b38/members?unique_email_id=f4b75a9d78&fields=members.email_address

will return :

{"members":[{"email_address":"[email protected]"}]}
Chic answered 23/3, 2018 at 14:46 Comment(0)
L
3

I've had a chat with the mailchimp support about this issue. This was there response (part of it because not everything discussed in that chat is relevant to this question):

(09:00:04 AM) Mailchimp support: Thanks for hanging in there, Me. It looks like the email_unique_id can't be searched via API endpoint like it can be within the app. Another option to get to your goal is GET to lists/list_id/members with the query string ?fields=members.email_address,members.unique_email_id which should pull up all their subscribers' emails and unique ids. At that point, you can filter through those results for the unique id

(09:00:52 AM) Me: Same goes for the user ID I guess?

(09:02:05 AM) Me: Why can't it be searched? When I list ids as well I might miss information. I don't need the unique_email_id in my response, I need to search for it to retrieve user information without getting duplicates in my result

(09:07:11 AM) Mailchimp support: Ok I understand, one moment while we test this out for you. Thanks again for your patience!

(09:16:22 AM) Mailchimp support: Hey Me, thanks for waiting. I tested the endpoint lists/list_id/members?unique_email_id=e8da8fa60a and  I was able to return just the one subscriber with that field. Search-Members only functions the way it does in app where you can only search specific strings like names, email addresses, but not ids as those aren't visible in app. However using the query string ?unique_email_id=X attached to the end of GET lists/list_id/members will pull up anyone with that specific EUID.

Leanoraleant answered 24/8, 2017 at 11:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.