Filters and Conditions Reference
Learn about using filters and conditions with Query and Export endpoints
Each Query and Export endpoint accepts a set of field identifiers and conditions that allow you to filter and select data in the API.
Field identifiers and conditions are passed to the entrypoint path via parameters in the URL. The conditions are applied to the field in parentheses. The pattern is fieldName(condition)=value
For example: https://api.payabli.com/api/Query/transactions/entry?totalAmount(ge)=50
Here totalAmount is the field identifier to which you want to apply the comparison or condition. The condition is (ge), which in this case is greater or equal than. The value base for the condition is 50, so the expression above is filtering records with the value in field totalAmount>=50.
Below you can see all the conventions for comparison you can use in the fields:
Condition | Action |
---|---|
eq or empty | equal to value |
gt | greater than value |
ge | greater or equal than value |
lt | lesser than value |
le | lesser or equal than value |
ne | not equal to value |
ct | contains value |
nct | not contains value |
in | include in array value (separated by ”|“) |
nin | not include in array value (separated by ”|”) |
All the fields and conditions passed to the API entrypoint are inclusive, meaning that all conditions need to be satisfied to get the result set.
Date formats
All dates must be in ISO 8601 format, for example YYYY-MM-DDTHH:mm:ss.
Examples
The filters are appended as query parameters when making an API request. These examples are URL-encoded, the unencoded filter is included with the definition.
/api/Query/customers/entry?customerZip%28eq%29%3D37615%26customerFirstname%28ct%29%3DMary
Unencoded filter: customerZip(eq)=37615&customerFirstname(ct)=Mary
.
This query returns the first 20 transactions with a customer ZIP code of 37615 and a customer first name that contains “Mary”.
/api/Query/subscriptions/entry?frequency%28eg%29%3Dmonthly&limitRecord=20
Unencoded filter: frequency(eg)=monthly
.
This query returns the first 20 subscriptions with a monthly frequency.
/api/Query/vendors/org/orgID?ein%3Dnull&limitRecord=100
Unencoded filter: ein(eq)=null
.
This query returns the first 100 records with an empty EIN.
Was this page helpful?