2

I am starting the migration from Mailchimp API 2.0 - 3.0, and am essentially trying to replicate the methods I used before.

One task is to retrieve all of the members email addresses on a particular list

currently I have

$result = $MailChimp->get('/lists/'.$list_id.'/members/');

which returns a members array, but I can't figure out how to add the fields parameter to the url so I only retrieve the fields I want, (eg fname, email address)

Craig Rushforth
  • 233
  • 4
  • 13

1 Answers1

2

worked it out, its on the first page

http://developer.mailchimp.com/documentation/mailchimp/guides/get-started-with-mailchimp-api-3/

eg, to get the id, email address and merge fields only,...

$result = $MailChimp->get('/lists/'.$list_id.'/members?fields=members.id,members.email_address,members.merge_fields');
Craig Rushforth
  • 233
  • 4
  • 13