cancel
Showing results for 
Search instead for 
Did you mean: 

Getting json payload cannot be empty when adding a list via api

SOLVED
Highlighted
Visitor

Getting json payload cannot be empty when adding a list via api

Hi all, I'm trying to add a list identifier via the API and I'm getting a "json payload cannot be empty error. This is the content of my log file from my application which shows the actual request and reply sent on the wire:

Ver: 4.73c 2018-08-06 16:08:59.984 T420S-A CContactClient:Send sending on socket 852:
GET https://api.constantcontact.com/v2/lists?api_key=<api_key> HTTP/1.0
Authorization: Bearer <token>
Content-Type: application/json


Ver: 4.73c 2018-08-06 16:09:00.780 T420S-A CContactClient sees Status=GetLists, cResponse:
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Date: Mon, 06 Aug 2018 20:09:05 GMT
Server: Apache
X-Mashery-Responder: prod-j-worker-tlsv1-us-east-1b-03.mashery.com
Connection: Close

[{"id":"1504453048","name":"General Interest","status":"ACTIVE","created_date":"2018-07-25T19:53:50.000Z","modified_date":"2018-07-25T19:53:50.000Z","contact_count":2}]


Ver: 4.73c 2018-08-06 16:09:01.357 T420S-A CContactClient:Send sending on socket 856:
POST https://api.constantcontact.com/v2/lists?api_key=<api_key> HTTP/1.0
Authorization: Bearer <token>
Content-Type: application/json

{
   "name": "Winner Entrants",
   "status": "ACTIVE"
}


Ver: 4.73c 2018-08-06 16:09:02.153 T420S-A CContactClient sees Status=AddList, cResponse:
HTTP/1.1 400 Bad Request
Content-Type: application/json
Date: Mon, 06 Aug 2018 20:09:07 GMT
Server: Apache
X-Mashery-Responder: prod-j-worker-tlsv1-us-east-1b-01.mashery.com
Content-Length: 84
Connection: Close

The <api_key> and <token> values are obviously correct since the server returns the current list details as requested. Any suggestions as to what might be wrong?

 

Tags (4)
1 REPLY
Moderator

Re: Getting json payload cannot be empty when adding a list via api

Hi @RonC376,

 

You emailed us directly and we are working on this issue from that case.


Regards,
Jimmy D.
Tier II API Support Engineer
Still need help?
You can post a new message in the Community or find us on Twitter Mon-Fri 8am - 8pm ET. We've got real people waiting to help you out. Click below to start a conversation!