Skip to main content
Basics

Filters

Learn about how DRUO API endpoints use filters to efficiently provide listing results.

Filters are used to search on a large dataset and return smaller chunks. Accounts,  Connect Links, End Users, Payments and Payouts endpoints support filters. Each request to these endpoints returns a list with the given values.

When the filters are applied and there is no data to return, the response will be an empty array.

Filter limitations

There are fields that are available for all the endpoints mentioned above (General) and there are others that can be used only in specific ones.
The filter fields that you can currently use are listed in the following table:
Category Query Parameter Use Filter
General type Available on all list endpoints. Search based on the type value given in the request.
General subtype Available on all list endpoints. Search based on the subtype value given in the request.
General current_status Available on all list endpoints. Search based on the current_status value given in the request.
Account institution_uuid Not available on ListAccounts. Search based on the Account object containing the institution_uuid value given in the request.
Account uuid Not available on ListAccounts. Search based on the Account object containing the uuid value given in the request.
Account code Not available on ListAccounts. Search based on the Account object containing the code value given in the request.
Account last4 Not available on ListAccounts. Search based on the Account object containing the las4 value given in the request.
End User end_user_uuid Not available on ListEndUser. Search based on the EndUser object containing the end_user_uuid value given in the request.
End User end_user_code Not available on ListEndUser. Search based on the EndUser object containing the end_user_code value given in the request.
End User end_user_email Not available on ListEndUser. Search based on the EndUser object containing the end_user_email value given in the request.
End User end_user_local_id Not available on ListEndUser. Search based on the EndUser object containing the end_user_local_id value given in the request.
Connect Link connect_link_uuid Not available on ListConnectLinks. Search based on the ConnectLink object containing the connect_link_uuid value given in the request.
Date date_from Available on all list endpoints. Search based on the date_from value given in the request.
Date date_to Available on all list endpoints. Search based on the date_to value given in the request.

Specifying parameters

In your initial call to an endpoint, there is no need to include filters, a list of results is returned. Optionally, you can send filters like a general one: current_status
The GET requests do not have a body. Therefore, you include the filter as a query parameter. The following applies when specifying filter fields in these endpoint requests:

curl https://api.druo.com/payments/list?current_status=PROCESSING&end_user_uuid=eur_xxxx-xxxxxxx-xxxxxx-xxxxxx \
    -X GET \
  -H 'Authorization: Bearer ACCESS_TOKEN' 

The sample response includes objects containing the values used to filter the data.

{
    "payments": [
        {
            ...
        },
        {
            ...
        },
        {
            ...
        }
    ]
}