2 Replies Latest reply on Jan 5, 2017 7:28 AM by cpham

    Mailchimp Invalid Resource


      I'm getting this error when trying to add a new subscriber to Mailchimp list. What am I doing wrong?


      {"type":"http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/","title":"Invalid Resource","status":400,"detail":"The resource submitted could not be validated. For field-specific details, see the 'errors' array.","instance":"","errors":[{"field":"","message":"Schema describes object, NULL found instead"}]}


      <cfhttp url="https://us9.api.mailchimp.com/3.0/lists/{list_id}/members" method="POST" username="xxxxxx" password="xxxxxxxxxxxxxxx-us9">

                  <cfhttpparam name="output" value="json" type="url">

                  <cfhttpparam name="method" value="listSubscribe" type="URL">

                  <cfhttpparam name="email_address" value="test@mail.com" type="url">

                  <cfhttpparam name="status" value="pending" type="url">

                  <cfhttpparam name="email_type" value="html" type="url">

                  <cfhttpparam name="double_optin" value="FALSE" type="url">

                  <cfhttpparam name="merge_vars[fname]" value="Test" type="url">

                  <cfhttpparam name="merge_vars[lname]" value="NewSub" type="url">


        • 1. Re: Mailchimp Invalid Resource
          haxtbh Level 4

          Are you not supposed to post the data as a json string using a data field?


          As per this documentation - Developer | MailChimp


          Also the error page that it gives you tells you this same kind of things:



          The resource submitted could not be validated.

          For field-specific details, see field_warnings or field_errors objects. This error means that the object submitted to a POST or PATCH request failed to validate against JSON schema, and could relate to campaign, interest group, merge field, or any other available object.

          Also I assume you have replaced the {list_id} in the url too.

          • 2. Re: Mailchimp Invalid Resource
            cpham Level 1

            I figure it out! Thanks for your help.