I'm having trouble successfully POSTing to the listsubscribe endpoint.
The error I get back is:
- {"code":"2001","message":"Please enter correct XML(or)JSON format","version":"1","uri":"/api/xml/listsubscribe","status":"error"}
Here are some of the different string I have tried posting for the contactinfo field:
- {"firstname":"William","lastname":"Last","contact_email":"myemail@gmail.com"}
- {"First Name":"William","Last Name":"Last","Contact Email":"myemail@gmail.com"}
The main potential issues I see are:
- The API doesn't see to explain the contactinfo field format anywhere. What fields are available? Do I use the Field name? Display Name? Field ID? Something else?
- The sample provided in the API docs uses the Field Name but no quotes around the fields. Are quotes not allowed in the JSON? I would be very surprised because that's not valid JSON and my JSON library won't even let me do that.
- I'm screwing something else up and not noticing it.
Any input would be appreciated.