Some of our endpoints support specifying filter or sorting criteria within the request. These options can reduce the result set size or return data in a more suitable order.
Zixflow supports two distinct formats for filtering: shorthand and verbose.
Shorthand filters are straightforward and concise. Here’s an example:
Verbose filters enable more complex queries, such as combining multiple conditions or querying specific properties of an attribute. All shorthand filters can also be expressed in verbose syntax.
Here:
$and
) is used to combine conditions.name
and emails
) are queried.Each attribute type has specific properties available, so the set of possible filters varies by attribute type.
There are fourteen comparison operators in total. Below are some examples:
$eq
- EqualityChecks for equality and is supported by every attribute type. If using shorthand syntax, $eq
is usually implied but can also be specified explicitly.
Deals with an exact name
$not_empty
Filters results based on whether there is any value defined.
Companies which have at least one domain
$in
Checks if the record or entry has a value that is part of a set.
Records where
record_id
is one of many values
For string-like properties or attributes, the following operators are available:
$contains
Matches parts of a string, case-sensitively.
Name contains John
$not_contains
Do not matches parts of a string, case-sensitively.
Name does not contains John
$starts_with
& $ends_with
Matches the beginning or the end of a string, respectively.
People with phone numbers starting
+1
Phone number starts with
+1
and ends with0909
For sortable properties like numbers or dates, use the following operators:
$lt
: Less than$lte
: Less than or equal$gte
: Greater than or equal$gt
: Greater thanPeople with 4 or more rating
people created in 2024
Combine multiple conditions using $and
, $or
, and $not
.
$and
OperatorSpecifies that all conditions must match. If using shorthand syntax with multiple attributes, $and
is implied.
People with name John Doe and email is john@doe.com
$or
OperatorSpecifies that at least one condition must match.
List all peoples with name John Doe or Alice Doe
$not
OperatorMatches all documents that do not meet the condition.
People not with name John
Sorting allows us to retrieve results in a specific order based on attribute values. Each sort operation must define a direction.
Sorting can be performed by an attribute apiKeyName. For instance, we can sort People first by their name and then by their email address:
Some of our endpoints support specifying filter or sorting criteria within the request. These options can reduce the result set size or return data in a more suitable order.
Zixflow supports two distinct formats for filtering: shorthand and verbose.
Shorthand filters are straightforward and concise. Here’s an example:
Verbose filters enable more complex queries, such as combining multiple conditions or querying specific properties of an attribute. All shorthand filters can also be expressed in verbose syntax.
Here:
$and
) is used to combine conditions.name
and emails
) are queried.Each attribute type has specific properties available, so the set of possible filters varies by attribute type.
There are fourteen comparison operators in total. Below are some examples:
$eq
- EqualityChecks for equality and is supported by every attribute type. If using shorthand syntax, $eq
is usually implied but can also be specified explicitly.
Deals with an exact name
$not_empty
Filters results based on whether there is any value defined.
Companies which have at least one domain
$in
Checks if the record or entry has a value that is part of a set.
Records where
record_id
is one of many values
For string-like properties or attributes, the following operators are available:
$contains
Matches parts of a string, case-sensitively.
Name contains John
$not_contains
Do not matches parts of a string, case-sensitively.
Name does not contains John
$starts_with
& $ends_with
Matches the beginning or the end of a string, respectively.
People with phone numbers starting
+1
Phone number starts with
+1
and ends with0909
For sortable properties like numbers or dates, use the following operators:
$lt
: Less than$lte
: Less than or equal$gte
: Greater than or equal$gt
: Greater thanPeople with 4 or more rating
people created in 2024
Combine multiple conditions using $and
, $or
, and $not
.
$and
OperatorSpecifies that all conditions must match. If using shorthand syntax with multiple attributes, $and
is implied.
People with name John Doe and email is john@doe.com
$or
OperatorSpecifies that at least one condition must match.
List all peoples with name John Doe or Alice Doe
$not
OperatorMatches all documents that do not meet the condition.
People not with name John
Sorting allows us to retrieve results in a specific order based on attribute values. Each sort operation must define a direction.
Sorting can be performed by an attribute apiKeyName. For instance, we can sort People first by their name and then by their email address: