Filtering

Discover how to implement filtering syntax.

For more details, please refer to each endpoint documentation to see if it supports filtering.

Query Params filtering

Most of our GET endpoints offer built-in query parameters for filtering resources.
You can filter the results of an endpoint by adding query parameters to the request.
For example, to filter the results of an endpoint by a specific field, you can add the following query parameter:

GET /orders?field=value

You can also filter the results by multiple fields by adding multiple query parameters.

GET /orders?field=value&field2=value2

JSON:API Filtering (work in progress)

We strive to implement standards wherever possible.

The new UniFy API filtering syntax, based on the JSON:API specification, uses the ?filter query parameter for all endpoints that support filtering operations.

URI encoding

Filter expressions might have characters that are not safe for URLs. To make sure your filter expression works as it should, it's a good idea to always encode the filter query parameter using URI encoding.
See the MDN docs on encodeURIComponent for more details.

Function-based DSL

The filtering system uses a function-based DSL (Domain-Specific Language) syntax, where each filter is expressed as a function name followed by its arguments — for example, equals(status,"active") — making filters both human-readable and machine-parseable.

Logical operators

FunctionDescriptionExample usage
equals(field, value)Field equals the given value (exact match).equals(status,"pending")
less-than(field, value)Field is strictly less than the given value (numbers or dates).less-than(created_at,"2025-10-01")
less-or-equal(field, value)Field is less than or equal to the given value.less-or-equal(price,100)
greater-than(field, value)Field is strictly greater than the given value.greater-than(price,0)
greater-or-equal(field, value)Field is greater than or equal to the given value.greater-or-equal(created_at,"2025-01-01")
contains(field, value)Field contains the given substring or the collection contains the element.contains(name,"nike")
starts-with(field, value)Field starts with the given prefix.starts-with(email,"support@")
ends-with(field, value)Field ends with the given suffix.ends-with(domain,".fr")
any(field, [v1,v2,...])Field value is in the provided list (inclusive match).any(status,["pending","shipped"])
none(field, [v1,v2,...])Field value is not in the provided list (exclusive match).none(channel,["oms","rms"])
is-null(field)Field is NULL.is-null(updated_by_id)
is-empty(field)For strings: NULL or empty string. For collections/JSON: empty or NULL. For numbers/dates/bools/enums: treated as NULL.is-empty(tags)
contains-any(field, [v1,v2,...])At least one provided value or pattern is contained in the field or collection.contains-any(tags,["brand:nike","color:red"])
contains-all(field, [v1,v2,...])All provided values or patterns are contained in the field or collection.contains-all(tags,["brand:nike","color:red"])
and(expr1, expr2, ...)All nested expressions must be true.and(equals(type,"rma"),equals(status,"pending"))
or(expr1, expr2, ...)At least one nested expression must be true.or(equals(type,"rma"),equals(type,"order"))
not(expr)Negates the nested expression.not(equals(status,"cancelled"))

⚠️ WARNING
Please note that support for given operators and fields is highly endpoint-specific. You can refer to the "filter" query parameter in the API reference documentation to see which operators are supported for each field.


Did this page help you?