I'm trying to post some simple JSON (to the Mailchimp API), but I get back and error that says what I'm sending is NULL. Here's the code:
I tried encoding the JSON as well, but that didn't work. Do I need to prepare the data in some other form?
Any help greatly appreciated.
Best,
Paul
Code:
<mvt:assign name="g.list_id" value="'d579b341b9'" /> <mvt:assign name="g.tag_url" value="'https://us2.api.mailchimp.com/3.0/lists/'$ g.list_id $'/segments/21/members'" /> <mvt:assign name="g.add_email" value="'{ \"email_address\": \"[email protected]\"}'" /> <mvt:assign name="g.headers" value="'Authorization: Basic xxxxxxxxxxxxxxxxxx' $ asciichar( 13 ) $ asciichar( 10 )" /> <mvt:call action="g.tag_url" method="'POST'" fields="g.add_email" content-type="'application/json'" headers="g.headers" > <mvt:eval expr="s.callvalue" /> Yields the error: "errors":[{"field":"","message":"Schema describes object, NULL found instead"}] </mvt:call>
Any help greatly appreciated.
Best,
Paul
Comment