mailchimp-api icon indicating copy to clipboard operation
mailchimp-api copied to clipboard

Filtering by status

Open cAstraea opened this issue 4 years ago • 1 comments

Hello, Was something changed with the API ? I'm trying to filter on a list by status either subscribed or unsubscribed but it returns an empty array ... other filters seems to work though https://developer.mailchimp.com/documentation%2Fmailchimp%2Freference%2Flists%2Fmembers%2F%2F#%20

$MailChimp->get('/lists/******/members?since_last_changed=2020-08-01T00:00:00+00:00&status=unsubscribed')

returns an empty array even though there should be members

cAstraea avatar Aug 14 '20 08:08 cAstraea

you have to use an array as the 2nd argument for the params: $result = $MailChimp->get('lists/' . $listId . '/members', ['status' => 'subscribed']);

I was just facing the same problem :p

PieterBoghaert avatar Apr 21 '21 06:04 PieterBoghaert