JSON payload cannot be empty

CharlesC0747
Regular Participant

JSON payload cannot be empty

Hi,

 

Trying to issue a delete request with PUT like this:

https://api.constantcontact.com/v2/contacts/ACCOUNTID?api_key=MYAPIKEY

 

and get the following response:

error_message = JSON payload cannot be empty.

error_key = json.payload.empty

 

The function works from the IO docs but not over the api

The IO docs do not show any request body.  When I add anything to the request body I get missing.X info.

 

I am successfully able to add and update contacts, but can not delete a contact.

 

This page does not appear to be accurate:

https://community.constantcontact.com/t5/Developer-Support-ask-questions/How-to-delete-the-contact-e...

 

this one doesn't exist.

http://developer.constantcontact.com/doc/manageSubscriptions/#remove_contact

 

Thanks for any help.

2 REPLIES 2
CharlesC0747
Regular Participant

Solved the problem.

 

A delete request used DELETE not PUT

 

made that change and can now unsubscribe a user.

In case anyone else runs into this problem, you can find additional information about how to unsubscribe a Contact here in our documentation: http://developer.constantcontact.com/docs/contacts-api/contacts-resource.html?method=DELETE

Dave Berard
Senior Product Manager, Constant Contact
Developer Portal

View API documentation, code samples, get your API key.

Visit Page