MailChimp API 1.3 + Hominid 3 + Groupings

For some reason, I just can't get the latest version of Hominid working with groupings in MailChimp.

Here is a snippet of what I'm doing:

info[:GROUPINGS] = { 'name' => 'Locations', 'groups' => 'SomeLocation' } mailchimp = Hominid::API.new(MAILCHIMP_API_KEY) list_id = mailchimp.find_list_id_by_name MAILCHIMP_LIST_NAME mailchimp.list_update_member(list_id, email_value, info) 

I tried, it would seem, any combination of arrays and hashes to make groups work, but I keep getting variations of this error:

 <270> "V" is not a valid Interest Grouping id for the list: Test List 

Any help would be appreciated!

+4
source share
1 answer

It seems like he needs an array of hashes:

 info[:GROUPINGS] = [ { 'name' => 'Locations', 'groups' => 'SomeLocation' } ] 

Hope this helps someone!

+9
source

Source: https://habr.com/ru/post/1335187/


All Articles