JEWebDes has asked for the wisdom of the Perl Monks concerning the following question:
I'm far from being a true Perl monk, and here's proof. I've been trying to add a member to a MailChimp list, but keep getting a 400 Bad Request - 'This value should of type object' error. The thing is I don't know how to build the Perl object required. Here's what I've tried:
my $mailchimp = Mail::Chimp3->new( api_key => 'mykey' ); my %merge_fields = ( 'FNAME' => 'My', 'LNAME' => 'Name', 'PHONE' => '760-720-0000' ); my $response = $mailchimp->add_member ( list_id => '49ef108521', email_address => 'test@jmydomain.com', status => 'subscribed', merge_fields => %merge_fields );
Obviously I haven't built the merge_field Perl object correctly. How should it be coded?
Thanks for the help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mail::Chimp3 Add Member
by Fletch (Bishop) on Jan 27, 2020 at 19:11 UTC | |
by JEWebDes (Novice) on Jan 27, 2020 at 22:28 UTC | |
|
Re: Mail::Chimp3 Add Member
by 1nickt (Canon) on Jan 27, 2020 at 20:25 UTC |