Validation error: {"opts":"Please enter a struct\/associative array"}

1,283 views
Skip to first unread message

Keyinora Darkmoon

unread,
Feb 14, 2014, 3:47:11 PM2/14/14
to mailchimp-...@googlegroups.com
Hello,

When entering data to customs my return data, i get this error any time i try adding the Opts
Validation error: {"opts":"Please enter a struct\/associative array"}
my format is as followed
I can assume i just structured the Opts part of the query string incorrectly, so can you provide me with the proper structure, the documentation for that page
didn't provide me with enough information to the proper structure.

thank you

Shannon

unread,
Feb 14, 2014, 5:06:02 PM2/14/14
to mailchimp-...@googlegroups.com
Hey, Keyinora -

The opts variable is going to be a "Structure". To reference it within a URL, you can format it like this:


And also:


Thanks,
Shannon

Keyinora Darkmoon

unread,
Feb 17, 2014, 4:51:52 PM2/17/14
to mailchimp-...@googlegroups.com
Thanks Shannon,

I also had a question for /lists/batch-subscribe

can i uses this function to pass more then just email? like can i pass firstname, lastname, and any field name so they can be auto populated. or will i have to Manuel enter that kinda information?


--
You received this message because you are subscribed to the Google Groups "MailChimp API Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mailchimp-api-di...@googlegroups.com.
To post to this group, send email to mailchimp-...@googlegroups.com.
Visit this group at http://groups.google.com/group/mailchimp-api-discuss.
For more options, visit https://groups.google.com/groups/opt_out.

MailChimp Support

unread,
Feb 18, 2014, 8:17:39 AM2/18/14
to mailchimp-...@googlegroups.com
Hello, Keyinora. Take a look at the API documentation for lists/batch-subscribe: http://apidocs.mailchimp.com/api/2.0/lists/batch-subscribe.php
It includes a merge_vars parameter in the call for you to include field info, like fname, lname, etc.

-- Anna


On Monday, February 17, 2014 4:51:52 PM UTC-5, Keyinora Darkmoon wrote:
Thanks Shannon,

I also had a question for /lists/batch-subscribe

can i uses this function to pass more then just email? like can i pass firstname, lastname, and any field name so they can be auto populated. or will i have to Manuel enter that kinda information?
On Fri, Feb 14, 2014 at 5:06 PM, Shannon <skel...@rsglab.com> wrote:
Hey, Keyinora -

The opts variable is going to be a "Structure". To reference it within a URL, you can format it like this:


And also:


Thanks,
Shannon


On Friday, February 14, 2014 3:47:11 PM UTC-5, Keyinora Darkmoon wrote:
Hello,

When entering data to customs my return data, i get this error any time i try adding the Opts
Validation error: {"opts":"Please enter a struct\/associative array"}
my format is as followed
I can assume i just structured the Opts part of the query string incorrectly, so can you provide me with the proper structure, the documentation for that page
didn't provide me with enough information to the proper structure.

thank you

--
You received this message because you are subscribed to the Google Groups "MailChimp API Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mailchimp-api-discuss+unsub...@googlegroups.com.

Keyinora Darkmoon

unread,
Feb 18, 2014, 11:30:58 AM2/18/14
to mailchimp-...@googlegroups.com
Thanks,
My other question is for that Batch-Subscribe, 

how does it handle data that is already in my Mail Chimp list? will it override it completely?. Or leave as is? I'm wondering because I will be sending large amount of leads daily to keep each my mail chimp list, and my company DB sync.  


To unsubscribe from this group and stop receiving emails from it, send an email to mailchimp-api-di...@googlegroups.com.

MailChimp Support

unread,
Feb 18, 2014, 11:58:52 AM2/18/14
to mailchimp-...@googlegroups.com
You'll want to use the update_existing parameter in the documentation. true means you want us to update their information in your list. false means you want us to skip that email address since it's already on the list.

-- Anna
To unsubscribe from this group and stop receiving emails from it, send an email to mailchimp-api-discuss+unsubscri...@googlegroups.com.
To post to this group, send email to mailchimp-...@googlegroups.com.

Keyinora Darkmoon

unread,
Feb 18, 2014, 2:03:33 PM2/18/14
to mailchimp-...@googlegroups.com
does that leave alone anything i don't pass? like say only the first name changes from my db back to mail chimp, will i lose the rest of the data on the transfer back to mail chimp?


To unsubscribe from this group and stop receiving emails from it, send an email to mailchimp-api-di...@googlegroups.com.

MailChimp Support

unread,
Feb 18, 2014, 3:21:52 PM2/18/14
to mailchimp-...@googlegroups.com
Your best resource is going to be testing the calls directly, and so I recommend going ahead and testing the calls to learn about their expected behaviors before putting it into production.
Just like an auto-update import within the MailChimp app, an update-existing subscription only updates the list fields you've specified in the call.

-- Anna
Reply all
Reply to author
Forward
0 new messages