- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-12-2020
10:51 AM
04-12-2020
10:51 AM
Is the /action/query endpoint broken?
Running any example described on this page (whether on production or in the sandbox environment) fails with a 500 status response:
https://knowledgecenter.zuora.com/Central_Platform/Query/ZOQL
curl --request GET \ --url https://rest.apisandbox.zuora.com/v1/action/query \ --header 'authorization: Bearer XXXX' \ --header 'content-type: application/json' \ --data '{ "queryString": "select AccountId from Account" }'
What I'm trying to do is to get the payment methods linked to a given account. A query for which there is no dedicated endpoint, other than using ZOQL query:
curl --request GET \ --url https://rest.apisandbox.zuora.com/v1/action/query \ --header 'authorization: Bearer XXXX' \ --header 'content-type: application/json' \ --data '{ "queryString": "select Id from PaymentMethod where AccountId = '\''XXX'\''" }'
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-13-2020
04:59 AM
04-13-2020
04:59 AM
Turns out, the method ("GET") was wrong, it should have been a "POST".
Returning a 405 instead of a 500 would have made this clearer though.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-13-2020
04:59 AM
04-13-2020
04:59 AM
Turns out, the method ("GET") was wrong, it should have been a "POST".
Returning a 405 instead of a 500 would have made this clearer though.