$filter parameter cannot be used on Generic Enquiry endpoint

Users are unable to filter the results of a Generic Inquiry endpoint through the API with the $filter parameter.

In MYOB Acumatica Business, it's possible to extend a webservice to use an existing Generic Inquiry to provide access to data through the API. If a user is calling a Generic Inquiry endpoint through the API, then it's not possible to use the $filter parameter in the URL to sort the results which have been returned. This is because the generic inquiry only accepts parameters through the body of the API query, similar to how the GI only accepts parameters through the webpage on a site, rather than through the URL.

Other parameters which are unable to be used in the URL are $top, $skip and $expand.

Workaround

If you want to supply parameters to a GI endpoint when performing an API call, they need to be supplied through the body of the call. For example, if the generic inquiry has parameters that allow you to specify the maximum and minimum stock IDs, then the body of the API call would look similar to this:

{
"InventoryIDMaxID" : {"value" : 100},
"InventoryIDMinID" : {"value" : 0}
}