Happy Business Starts Here

Error on Order MRR table using action/query via REST API call.

Zuora Support

Error on Order MRR table using action/query via REST API call.

I am trying to use https://rest.zuora.com/v1/action/query (https://rest.zuora.com/v1/action/query) I have the following body (trying to get the records from table order mrr. Can you help me fix this issue?

 

{"queryString":"select ID from 'order mrr'"}

 

It returns

 

{

"faultcode": "fns:MALFORMED_QUERY",

"faultstring": "You have an error in your ZOQL syntax",

"detail": {

"MalformedQueryFault": {

"FaultCode": "MALFORMED_QUERY",

"FaultMessage": "You have an error in your ZOQL syntax"

}

}

}

Tags (1)
1 REPLY 1
Zuora Support

Re: Error on Order MRR table using action/query via REST API call.

At present Orders objects are not available via API. This can be achieved by using Data Source export via API call. “Orders” T9 feature should be enabled in the tenant you are trying the below method.

 

Step 1:  Create the export, using the POST method, and URL request as https://rest.apisandbox.zuora.com/v1/object/export/

{

"Format": "csv",

"Name": "As per your requirement",

"Query": "select fields from table name where Column = 'Condition' ",

"Status": "Processing",

"Zip": true

}

1.JPG

 

Step 2: Use the result ID to get the "FileId"

Get Method: https://rest.apisandbox.zuora.com/v1/object/export/id

 

2.JPG

 

Step 3: Use the FileID from the results and download the file. https://apisandbox.zuora.com/apps/api/file/FileID

 

3.JPG