Most of the models that we expose via our API support list queries i.e. fetching a collection of models in a single request. These queries may be filtered via query parameters.
One of the most common filters is the
seller filter which lets you query for objects owned by a particular seller:
Xola will automatically apply authorization filters to any query you perform. The results returned will only contain data that your credentials authorize you to view. So if you try to query for orders that belong to a seller you don't have access to, you will get zero results.
A more interesting query might be to find orders arriving on a particular day for that seller:
The above examples show how to perform exact matches. What if you wanted to find orders across a range of arrival dates, say Nov 8 to Nov 10? Here are a few different ways you could accomplish that:
Apart from the operators demonstrated in the above examples, we support many more. Some operators are limited to certain types of fields.
|equals||Matches values that are equal to a specified value. This is the default operator if none is specified.|
|notEqual||Matches all values that are not equal to a specified value.|
|gt||Matches values that are greater than a specified value.|
|gte||Matches values that are greater than or equal to a specified value.|
|lt||Matches values that are less than a specified value.|
|lte||Matches values that are less than or equal to a specified value.|
|range||Matches values that inclusively fall within two values.|
|in||Matches any of the values specified in an array.|
|nin||Matches none of the values specified in an array.|
|startsWith||Matches string values that start with a specified value (ignores case).|
|endsWith||Matches string values that end with a specified value (ignores case).|
|contains||Matches string values that contain a specified sub-string value (ignores case).|
|doesNotContain||Matches string values that do not contain a specified sub-string value.|
|exists||Matches objects that have a value for the specified field.|