I am working on the MailChimp API, primarily on the list api (http://developer.mailchimp.com/documentation/mailchimp/reference/lists/)
Problem is
In MailChimp API 2.0, the grouping could be easily added to as suggested in their sample code
However, in MailChimp API 3.0 (which is REST based), I can't pass GROUPINGS to merge_vars as I get error that merge_vars.GROUPINGS are not defined in the schema and the request json is of the form
{
....,
"merge_fields": {
"FNAME": "Hello",
"LNAME": "World"
},
"interests": {
"{ids of the interest group}": true,
.... : false
}
}
So, the new form requires me to pass the Id's of the interest. Now this is of course possible if I make separate call to other endpoint interest-categories, to get all the interests and then put true for whichever one interests the user and false otherwise. Also, the id is not for the interest category but for the interest itself, so I will have to make calls for each category...
However, that seems very clumsy and I am sure there would be an easier way to do this.
Will be thankful if someone could please point me in the right direction.