Skip to main content
Participating Frequently
January 4, 2017
Question

Mailchimp Invalid Resource

  • January 4, 2017
  • 1 reply
  • 4294 views

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">

</cfhttp>

    This topic has been closed for replies.

    1 reply

    Inspiring
    January 5, 2017

    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:

    InvalidResource

    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.

    cphamAuthor
    Participating Frequently
    January 5, 2017

    I figure it out! Thanks for your help.