Happy Business Starts Here

Re: Empty Response from REST API

Savvy Scholar

Empty Response from REST API



I'm trying to query Account object using following query:



curl -i -X POST \
https://rest.zuora.com/v1/action/query \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic secret' \
-d '{ "queryString": "SELECT Id,Name FROM Account WHERE Id='\''account-id'\''" }'

I don't get any error but just an empty response with HTTP status 200:


HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Security-Policy-Report-Only: **snip**
Server: Zuora App
zuora-request-id: ***
X-Kong-Upstream-Latency: 34
X-Kong-Proxy-Latency: 24
Expires: Thu, 10 Jan 2019 14:49:17 GMT
Cache-Control: max-age=0, no-cache, no-store
Pragma: no-cache
Date: Thu, 10 Jan 2019 14:49:17 GMT
Content-Length: 0
Connection: keep-alive


But If I query without the Name I see the JSON response. I don't have access to the UI, so I can't check what the Account name is. I tried with different HTTP Accept headers, but no luck.


Any idea what could be the issue?




Zuora Documentation

Re: Empty Response from REST API

Hi Hassan,


This looks a little strange to me because I tested this call and got the right response as expected. I am assuming there is some illegal data in this account or the misconfiguration for your tenant.

In this case, I suggest you submit a ticket at Zuora Global Support and our support agents could help you further troubleshoot this problem. Thanks!