hobby_developer
hobby_developer

Reputation: 1

MailChimp query string syntax

I'm using MailChimp to conduct a data export of the aggregate activity. The CSV files contain the web_id of the campaign, which I would like to use to obtain more detailed information about the campaign.

The MailChimp end-point I am using is search-campaigns and a mandatory parameter is query. However there's no instruction on how the query string is constructed. I have tried:

https://${dc}.api.mailchimp.com/3.0/search-members?&query=TRUE

And this works, but returns two records that aren't what I want. But when I try something like:

https://${dc}.api.mailchimp.com/3.0/search-members?&query=web_id=12345

where 12345 is the web_id I would like to query. The result returns zero records

https://${dc}.api.mailchimp.com/3.0/search-members?&query="web_id=12345"

returns zero records

https://${dc}.api.mailchimp.com/3.0/search-members?&query=["web_id":"12345"]

returns zero records

https://${dc}.api.mailchimp.com/3.0/search-members?&query="where web_id=12345"

returns zero records

Upvotes: 0

Views: 86

Answers (1)

Jeremy Crouch
Jeremy Crouch

Reputation: 67

The /search-members endpoint does not work off ids, it only fetches results by members First Name, Last Name, or email address

For example: https://${dc}.api.mailchimp.com/3.0/search-members?&query=RALPH

https://mailchimp.com/developer/marketing/api/search-members/search-members/

Upvotes: 0

Related Questions