I'm using MailChimp API for adding subscriber to list. I have created three type of group. I wanted to add the user to particular group. How can I do that? Here is my code:
$MailChimp = new \Drewm\MailChimp(MAILCHIMP_KEY);
$result = $MailChimp->call('lists/subscribe', array(
'id'=> MAILCHIMP_LIST,
'email' => array('email'=>$data['email']),
'merge_vars' => array('FNAME'=>$data['first_name'],
'LNAME'=>$data['last_name'],
'TITLE'=>$data['title'],
'COMPANY'=>$data['company'],
'PROFESSION'=>$profession,
'ADDRESS'=>'',
'groupings' => array(array('id' => 'id1234')),
),
'double_optin' => false,
'update_existing' => true,
'replace_interests' => false,
'send_welcome' => false,
));