update-member groups being deleted

74 views
Skip to first unread message

Miles Wells

unread,
Feb 24, 2014, 3:02:57 PM2/24/14
to mailchimp-...@googlegroups.com
I'm using the lists/update-member method to change the member's groups, but my API call wipes all groups and doesn't add the ones I want. I want it to replace the current groups, but I think my syntax may be wrong, though I do not get any error back. Here's the general shape of my JSON call: 
{
"apikey":"key",
"id":"listid",
"email":{
"email":"email_to_update"
},
"merge_vars": [{
"groupings":[{
"id":groupingid,
"name":"grouping_name",
"groups":["group_name"]
}]
}]
}

Any help would be appreciated!

MailChimp Support

unread,
Feb 24, 2014, 3:43:06 PM2/24/14
to mailchimp-...@googlegroups.com
Hello, Miles. You'll want to remove the brackets around the "merge_vars" section. It's not needed and can mess up the update, as demonstrated in the example subscribe call: http://apidocs.mailchimp.com/api/2.0/lists/subscribe.php

-- Anna

Miles Wells

unread,
Feb 24, 2014, 3:45:20 PM2/24/14
to mailchimp-...@googlegroups.com
Ah-hah! I thought it would be something that simple! Thanks!
Reply all
Reply to author
Forward
0 new messages