250: OTYPE must be provided - Please enter a value

Apr 23, 2013 at 12:22 PM
Please help to spot the problem with the following code
List.Merges Member = new List.Merges();            
        Member.Add("EMAIL","name@email.com");
        Member.Add("FNAME","FirstName");
        Member.Add("LNAME","LastName");

        List<List.Merges> listmerges = new List<List.Merges>();
        listmerges.Add(Member);

        List.SubscribeOptions subopt = new List.SubscribeOptions();
        subopt.DoubleOptIn = false;
        subopt.EmailType = List.EmailType.Html;
        subopt.ReplaceInterests = false;
        subopt.SendWelcome = false;
        subopt.UpdateExisting = true;


        MailChimp.MCApi abc12 = new MCApi("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-us5", true);

        List.BatchSubscribe dab = abc12.ListBatchSubscribe("xxxxxxxxx", listmerges);
Throwing Error - 250: OTYPE must be provided - Please enter a value

Please help ;-(
Coordinator
Apr 23, 2013 at 12:41 PM


Apr 23, 2013 at 1:11 PM
As suggested changed code as follows
       List.Merges Member = new List.Merges();            
        Member.Add("EMAIL","born_to_code@hotmail.com");
        Member.Add("FNAME","Born");
        Member.Add("LNAME","Code");
        Member.Add("OTYPE", "4");
Now getting following error Message = "OID must be provided - Please enter a value"

Was with the impression OID will be a unique GUID which will be provided by MailChimp

Please let me know your thoughts and views.
Coordinator
Apr 23, 2013 at 1:19 PM
Nope. It's must be your own merge var. Just call ListMergeVars() to check all required merges.


Apr 23, 2013 at 1:34 PM
OTYPE and OID where required by default, unchecked and it is not throwing error.

Image