• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Mailchimp Invalid Resource

New Here ,
Jan 04, 2017 Jan 04, 2017

Copy link to clipboard

Copied

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>

Views

4.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 05, 2017 Jan 05, 2017

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 05, 2017 Jan 05, 2017

Copy link to clipboard

Copied

LATEST

I figure it out! Thanks for your help.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation