Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Search Members using MailChimp API 3.0 by Merge Field

Is is possible to search for members in a MailChimp list by merge field using the MailChimp API v3.0?

The documentation for the Search Members endpoint links to a separate page, Search for Campaigns and Contacts in Your Account, which details how to manually search using the GUI, but mentions that the keyword search can include merge fields in the format merge3:keyword, so it looks like it should be possible.

However, in both the GUI and using the MailChimp API php wrapper, I get no results - the GUI returns the error Invalid search request, try again, while the php API returns an empty array with nothing in getLastError() or getLastResponse().

Searching using a subscriber's name or email address does, however, work as expected.

like image 560
Armstrongest Avatar asked Feb 20 '18 22:02

Armstrongest


1 Answers

As mentioned by @Kalyan Sangartula it is not possible to search using other merge fields.

But I think an alternative, for now, to this could be using segments. You can create segments based on filters you want (api route "/lists/{list_id}/segments") and get members from those segments (api route "/lists/{list_id}/segments/{segment_id}/members").

like image 103
Haseeb Ahmad Avatar answered Nov 12 '22 17:11

Haseeb Ahmad