Learn how to use filters to streamline your search results.
filter_by
field in your request payload. This field can be matched against one or more values. For example:
"status:applied"
returns documents where the status is “applied.”"status:[applied, inflight]"
returns documents where the status is “applied” or “inflight.”:=
exact match operator, e.g., status:=applied
returns documents where the status is exactly “applied”.
Using the non-exact match operator, :
, will do a word-level partial match, returning documents where the field has the word within it, e.g., account_name:John
will match records with account_name
equal to John
, John Smith
, Smith John
.
:!=
operator, e.g., currency:!=USD
. This will return records where the currency
field is not equal to “USD”.
You can also negate multiple values, e.g., currency:!=[USD, EUR]
.
To exclude results that contain strings, use the :!
operator, e.g., account_name:!John
will exclude all records with account_name
containing “John” from the search results.
>
, >=
, <
, <=
, and =
. To filter between a min and max value, use the range operator, [min..max]
Operator | Meaning | Examples |
---|---|---|
> | Greater than | balance:>500000 |
>= | Greater than or equal to | balance:>=500000 |
< | Less than or equal to | balance:<500000 |
<= | Less than or equal to | balance:<=500000 |
= | Equal to | balance:=500000 |
[min..max] | Between min and max | balance:[200..500000] filters documents where balance value is between 200 and 500000. |
balance:[200..500000, 0]
returns docs where the value is between 200 and 500000 or exactly equal to 0.
The same syntax works for date fields as well such as created_at
or scheduled_for
, e.g., created_at:>2024-04-21
returns docs with dates later than than 21 April, 2024.
Note, when filtering by date, input the values in the same format it was stored in your ledger (YYYY-MM-DD).
&&
and ||
operators. &&
means all conditions must be true, while ||
means that at least one condition must be true.
For example, to filter all USD transactions with the APPLIED
and INFLIGHT
statuses, our filter will look like this: currency:=USD && status:[applied, inflight]
.
To use ||
, e.g., all balances with balance
less than 500000 or credit_balance
above 100000, we’ll have: balance:<500000 || credit_balance:>100000
.