Happy Business Starts Here


REST API response filtering

Hello everyone,


I am trying to use a Get request on Usage and ensure I am only seeing results where UsageForSubscription__c is equal to a specific order number. Is there a way to do this using REST API? I cannot seem to figure out how to filter my queries like I was able to do using SOAP. Thanks!


Re: REST API response filtering

Hi @agill86


Unfortunately, there is no way to filter custom fields in Get request.


Did you use query call when using SOAP?


If so, query call can also be used in REST. This call is more appropriate for your situation than Get request.
REST Query call reference: https://www.zuora.com/developer/api-reference/#operation/Action_POSTquery


For example, you should make a request like this:


[POST] https://rest.apisandbox.zuora.com/v1/action/query

"queryString": "select Id from Usage where UsageForSubscription__c = 'a specific order number'"