Search code examples
mailchimpmailchimp-api-v3.0

Mailchimp Batch the resource submitted could not be validated array Schema describes object, NULL found instead


Posting a batch operation to Mailchimp I keep getting "schema describes object, NULL found instead" error. I get the error in them mailchimp playground https://us10.api.mailchimp.com/playground/. This was working fine for a year up to a few weeks ago and then stopped.

Response Body:

{"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":"70a5c431-1cc4-4933-a5c9-2ab84ed06263","errors":[{"field":"","message":"Schema describes object, NULL found instead"}]}

I've tried removing whitespace ,merged fields, and checking to be sure the merge fields natch the mailchimp list and verified the listID matching the correct list.

Any other suggestions would help?

Thanks

{"operations": [{
      "method": "POST",
      "path": "lists/436db7f77acd/members",
      "body": "{\"email_address\":\"[email protected]\", \"status\":\"subscribed\"
,\"tags\":[\"Green Standard\", \"Customer Care\",\"96959N\"]
,\"merge_fields\": {
                \"BADGE\": \"\",
                \"CPATH\": \"https://secu/Certificate/96959N_0978317_Certificate.pdf\",
                \"FNAME\": \"Charles\",
                \"FRAME\": \"Coupon Code: 1CZ3d17 Expires: 12/31/2019\",
                \"FRAMEHEAD\": \"Certificate\",
                \"LNAME\": \"Gren\",
                \"MKAL\": \"17MA19\",
                \"MKAMT\": \"$250\",
                \"MMERGE3\": \"Global Production\",
                \"MMERGE4\": \"96959N\"
                \"MMERGE5\": \"13d215\",
                \"MMERGE6\": \"ABC, Inc.\"
  }

}"

    }]}

Solution

  • After removing all unnecessary spaces, tabs and whitespace, it's working now. https://jsonlint.com was helpful