Filtering
When accessing data via the API, there are three types of relationships that are exposed. They are described below.
Simple Attribute
orders.total
Total value of the order
One-To-One
orders.shipping_address
A single address entity or null if one isn't set.
One-To-Many
order.line_items
An array of line_item entities. If there are no line_items associated with this order, the array is empty.
Simple Filtering
The Rest API currently only supports simple filtering, while our "Server Side API" or "Entity Access" which can be accessed on the server side supports both simple and advanced filtering.
Simple filtering allows the API caller to filter results by attributes that can be combined with the and
logical operator. That format looks like:
Example: Let's say you have a product that has some product variants. On the product variants table there is a column called visible
and we want to filter all of theproduct variants that are visible that have a price over $80
In order to get all the product variants we filter product_variants.visible attribute eq (equal) to 1 since that column is a boolean and
which is specified by the comma price is greather than 80.
Supported Operators
The follow operators for filtering are supported.
eq
- equalsequal
- equalslt
- less thangt
- greater thanlike
- SQL LIKE operator using%
as the wildcardneq
- Not equal to
If you aren't familar with the SQL LIKE operator then using that filter will give you all the data that contains the filtered value. For example:
and in the above example I would return all the products that name contain the word bracelet
Last updated