I am trying to execute some ZOQL via Zuora REST API.
I've referred this doc and I am using REST endpoint v1/action/query to execute ZOQL.
First I tried with very simple request and got the result back
"queryString": "select AccountId, FirstName, LastName from contact"
"queryString": "select * from contact"
"faultstring": "You have an error in your ZOQL syntax",
"FaultMessage": "You have an error in your ZOQL syntax"
SELECT Subscription.Name, Account.Name FROM Subscription WHERE Subscription.Status='Active' AND DefaultPaymentMethod.CreditCardType='Visa'
Queries With Asterix In ZOQL:
In short: You just can't use asterix.
From Zuora KnowledgeCenter:
No Wild Card Support
You cannot use the asterisk wild card (*) for field names with a query() call. You must explicitly specify a field name.
Zuora Export ZOQL (Zuora Object Query Language) is the query language used to create Exports with the Export object in the Zuora SOAP API. Zuora Export ZOQL is similar to our general ZOQL, with a few differences. The biggest difference is that with Exports, you query a Zuora data source, not a SOAP API object.
Hope this helps you.