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:

ConditionAction
eq or emptyequal to value
gtgreater than value
gegreater or equal than value
ltlesser than value
lelesser or equal than value
nenot equal to value
ctcontains value
nctnot contains value
ininclude in array value (separated by ”|“)
ninnot 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.

Not all comparisons or conditions apply to all fields, refer to the API reference of each entrypoint to see the list of accepted fields and conditions.

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.