zuora-soap API provides ZOQL through query() and returns query results in that response itself.
I am looking for the same feature in zuora REST API. But it supports executing query through "export" or "batch-query" api. Those API allows me to fetch the query results through another request using either by exportId or batchJobId.
But I am interested to received the query results in single request similar to zuora-soap. Is there any feature available in zuora REST API
POST /v1/action/query
REST endpoint accepts ZOQL through queryString
in JSON body. Here is an example HTTP request representing select Id, Name from Account
ZOQL query
POST /v1/action/query HTTP/1.1
Host: rest.apisandbox.zuora.com
apiAccessKeyId: [email protected]
apiSecretAccessKey: ************
Accept: application/json
Content-Type: application/json
{
"queryString": "select Id, Name from Account"
}
which returns
{
"records": [
{
"Name": "DP test sync account 1",
"Id": "2c92c0f85fde706c015feef1b4ca6e11"
},
{
"Name": "001g000001nHTIoAAO",
"Id": "2c92c0f85fde706c015ffd8d488b5e46"
},
...
],
"queryLocator": "2c92c0f867067b440167087646951e86-2000",
"size": 2239,
"done": false
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With