groups?

146 views
Skip to first unread message

curylo

unread,
Jun 17, 2010, 8:45:53 PM6/17/10
to MailChimp API Discuss
Hey,
I am using this

[self get:@"/" method:@"listSubscribe" id:listId merge_vars:@""
email_address:email send_welcome:welcome];


Is there a way to get it to subscribe to certain groups and subgroups
easily?

curylo

unread,
Jun 17, 2010, 8:49:56 PM6/17/10
to MailChimp API Discuss
actualy I think I can use

INTERESTS
Set Interest Groups by passing a field named "INTERESTS" that contains
a comma delimited list of Interest Groups to add. Commas in Interest
Group names should be escaped with a backslash. ie, "," => "\,"


SO I just add the interest group to the call?

[self get:@"/" method:@"listSubscribe" id:listId merge_vars:@""
email_address:email interests:@"INTEREST GROUP NAME?"
send_welcome:welcome];

jesse

unread,
Jun 18, 2010, 12:32:18 PM6/18/10
to MailChimp API Discuss
As I mentioned yesterday, please read the documentation more
carefully:
http://groups.google.com/group/mailchimp-api-discuss/msg/f363b73807f5b2cd

Specifically, the GROUPINGS parameter you should be using instead of
INTERESTS is part of the merge_vars parameter, not a separate
parameter. I still have not looked at the Iphone/Objective-C wrapper,
so can't guess at what the syntax would be there.


jesse
Message has been deleted

curylo

unread,
Jun 19, 2010, 8:57:50 AM6/19/10
to MailChimp API Discuss
yes, i am trying to understand the docs... i guess i dont get them
still
i am trying to go through examples and all that.

On Jun 18, 12:32 pm, jesse <je...@mailchimp.com> wrote:
> As I mentioned yesterday, please read the documentation more
> carefully:http://groups.google.com/group/mailchimp-api-discuss/msg/f363b73807f5...

Will

unread,
Jun 19, 2010, 9:28:50 AM6/19/10
to MailChimp API Discuss
Hello,

This is a PHP example of the listSubscribe() call. Translate it to
Objective C and you should be done (be carefulll with the first
parameter, which may be diferent between both languages -it may be
$api_key in Objective C which is not in PHP):

$api->listSubscribe(
$list_id,
$email_address,
array(
'OPTINIP' => $_SERVER['REMOTE_ADDR'],
'GROUPINGS' => array(
array(
'name' => 'Interests',
'groups' => 'Auctions,Blog'
)
)
),
$email_type,
$double_optin,
$update_existing,
$replace_interests,
$send_welcome
);

I hope it helps,
Will

Will

unread,
Jun 19, 2010, 9:33:41 AM6/19/10
to MailChimp API Discuss
Although, perhaps, the best example you can get is to update (in the
Web App) all MERGE VARS of a member, including the groups they belongs
to.

And them, in Objective C, read his record with listMemberInfo() and
dump its result. What you get in the $merge_vars field (as a
structure, obviously) is what you need to pass to the listSubscribe()
call.

All best,
Will

curylo

unread,
Jun 19, 2010, 10:07:13 AM6/19/10
to MailChimp API Discuss
ok that helps....

so groupings and interest groups... they are different i am starting
to understand...

groupings are from managing lists? and interest groups are from a
questionairre ....

So I can translate that into objective C no problem and pass a comma
delimated array into merge vars.

Im trying it now....

jesse

unread,
Jun 19, 2010, 12:36:26 PM6/19/10
to MailChimp API Discuss
Groupings are groups of interest groups. The other thing I had
mentioned that will help is to get comfortable with the web app before
diving into the API. It definitely helps to visualize the various
things you are seeing via the API.


jesse

curylo

unread,
Jun 21, 2010, 11:41:44 AM6/21/10
to MailChimp API Discuss
Where is the web app? Anyone know?

The Digital Orchard

unread,
Jun 21, 2010, 11:44:57 AM6/21/10
to mailchimp-...@googlegroups.com

He's probably just referring to the MailChimp web interface for setting up and managing campaigns. If you don't get familiar with that, much of the concepts and terminology may not make sense.

I fall into this camp.... I'm implementing the API for my clients, but I haven't yet used MailChimp myself, so there's a disconnection between my knowledge of MailChimp and my clients.

~Ted

> --
> You received this message because you are subscribed to the Google Groups "MailChimp API Discuss" group.
> To post to this group, send email to mailchimp-...@googlegroups.com.
> To unsubscribe from this group, send email to mailchimp-api-di...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mailchimp-api-discuss?hl=en.
>

jesse

unread,
Jun 21, 2010, 12:06:21 PM6/21/10
to MailChimp API Discuss
Right, that is exactly what I was referring to. An hour or two spent
in it and possibly with some of our getting started videos should be
invaluable in understanding how to relate things you'll run across in
the API.


jesse

On Jun 21, 11:44 am, The Digital Orchard <fee...@thedigitalorchard.ca>
wrote:

curylo

unread,
Jun 21, 2010, 2:02:39 PM6/21/10
to MailChimp API Discuss
yeah if that is the web app, then it doesn't really go into Interest
groups and groups very much...

nor do the videos...

i don;t think at all...

I see how the interface works. I just don't seem to understand the
syntax required.

I am trying like the above post
'GROUPINGS' => array( array( 'name' => 'Interests', 'groups'
=> 'Auctions,Blog' )

That Groupings line... created an array named Interests , with groups
Auctions and Blog?

So that equates to a list "group" named "Interests" with groups
"Auctions" and groups "Blog" inside of the group Interests?

I guess I am having a hard time relating between the PHP POST commands
needed and the way things are named in Mailchimp. I have read the
documentation, I have played with the web app and watched tutorials
and still feel I am trial/error on using listSubscribe for a group.

I know how to just call listSubscribe and it works,

No one else here works with the Objective C wrapper? and has needed to
post to groups?

curylo

unread,
Jun 22, 2010, 1:11:22 PM6/22/10
to MailChimp API Discuss
Ok
Here is what I am doing...

I am going to
http://www.hurl.it/
And putting in the string and trying to figure out if I can get a good
response back...

https://api.mailchimp.com/1.2/?merge_vars=GROUPINGS[]=NEWTITLES&output=json&method=listSubscribe&send_welcome=&apikey=mykey-us1&email_address=mic...@curylo.com&id=listID&

I keep getting errors like
"error": "\"'\" is not a valid Interest Group for the list:
booksinaudio"

But I think I will figure it out soon enough what string to put in to
make a list subscribe work to a group... will update you all if i
figure it out.

curylo

unread,
Jun 22, 2010, 2:56:05 PM6/22/10
to MailChimp API Discuss
It looks like this is working

https://api.mailchimp.com/1.2/?merge_vars=GROUPINGS[]=
name[]=test,groups[]=a,b&output=json&method=listSubscribe&send_welcome=&apikey=KEY#-
us1&email_address=mic...@curylo.com&id=LIST#&

and so is

https://api.mailchimp.com/1.2/?merge_vars=GROUPINGS[]=
name[]=interests,groups[]=a,b&output=json&method=listSubscribe&send_welcome=&apikey=KEY#-
us1&email_address=mic...@curylo.com&id=LIST#&



On Jun 22, 1:11 pm, curylo <michael.cur...@gmail.com> wrote:
> Ok
> Here is what I am doing...
>
> I am going tohttp://www.hurl.it/
> And putting in the string and trying to figure out if I can get a good
> response back...
>
> https://api.mailchimp.com/1.2/?merge_vars=GROUPINGS[]=NEWTITLES&output=json&method=listSubscribe&send_welcome=&apikey=mykey-us 1&email_address=mich...@curylo.com&id=listID&

curylo

unread,
Jun 23, 2010, 11:31:41 AM6/23/10
to MailChimp API Discuss
actually it doesn't work.

I don't know why I can't get it to subscribe to interest groups, but
whatever, I don't care anymore.

On Jun 22, 2:56 pm, curylo <michael.cur...@gmail.com> wrote:
> It looks like this is working
>
> https://api.mailchimp.com/1.2/?merge_vars=GROUPINGS[]=
> name[]=test,groups[]=a,b&output=json&method=listSubscribe&send_welcome=&api key=KEY#-
> us1&email_address=mich...@curylo.com&id=LIST#&
>
> and so is
>
> https://api.mailchimp.com/1.2/?merge_vars=GROUPINGS[]=
> name[]=interests,groups[]=a,b&output=json&method=listSubscribe&send_welcome =&apikey=KEY#-
> us1&email_address=mich...@curylo.com&id=LIST#&

jesse

unread,
Jun 24, 2010, 11:24:29 AM6/24/10
to MailChimp API Discuss
Just noticed that I missed all of this. In case someone else finds
this and cares, you can extrapolate out what the serialized version
should be by building on our examples here:
http://www.mailchimp.com/api/examples/#4

Doing that, the proper URL formatting (line breaks added for
readability) for these examples would be:
https://api.mailchimp.com/1.2/?&apikey=API_KEY&id=LIST_ID&output=json&method=listSubscribe&email_address=m...@example.com
&merge_vars[GROUPINGS][0][name]=GROUPING_NAME_1
&merge_vars[GROUPINGS][0][groups]=Group_A,Group_b

From that you should also be able to see that a second grouping
selection could be added using:
&merge_vars[GROUPINGS][1][name]=GROUPING_NAME_1
&merge_vars[GROUPINGS][1][groups]=Group_A,Group_b

The 0 and 1 there don't matter at all. They simply need to be unique
keys so that they hold are properly grouped together.


jesse
Reply all
Reply to author
Forward
0 new messages