Highlighted

Mailchimp Invalid Resource

New Here ,
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

2.7K

Likes

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

Mailchimp Invalid Resource

New Here ,
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

2.7K

Likes

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
Jan 04, 2017 0
Advocate ,
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.

Likes

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
Reply
Loading...
Jan 05, 2017 0
cpham LATEST
New Here ,
Jan 05, 2017

Copy link to clipboard

Copied

I figure it out! Thanks for your help.

Likes

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
Reply
Loading...
Jan 05, 2017 0