Build

Filtering & Sorting

Learn how to filter and sort data returned by Lev API list endpoints.

Updated September 2026

Filtering

Filter results by field values using the filter query parameter:

# Equality filter
GET /deals?filter[loan_type]=heavy_bridge
 
# Multiple values (OR)
GET /deals?filter[loan_type]=heavy_bridge,permanent
 
# Range filter
GET /deals?filter[loan_amount][gte]=1000000&filter[loan_amount][lte]=5000000
 
# Date filter
GET /deals?filter[created_at][gte]=2026-01-01

Available filter fields by resource

ResourceFilterable Fields
Dealsloan_type, transaction_type, business_plan, loan_amount, created_at, updated_at
ContactsVaries by endpoint
CompaniesVaries by endpoint
Lender Directorystate, lender_type (eq only), plus the name search parameter. See Lender Directory.

Filter Operators

OperatorSyntaxDescriptionExample
eqfilter[field]=valueEquals (default)filter[loan_type]=heavy_bridge
gtfilter[field][gt]=valueGreater thanfilter[loan_amount][gt]=1000000
gtefilter[field][gte]=valueGreater than or equalfilter[created_at][gte]=2026-01-01
ltfilter[field][lt]=valueLess thanfilter[loan_amount][lt]=5000000
ltefilter[field][lte]=valueLess than or equalfilter[updated_at][lte]=2026-03-01

Multiple values for eq are comma-separated and treated as OR: filter[loan_type]=heavy_bridge,permanent matches either.

Sorting

Sort results using the sort query parameter. Prefix with - for descending order:

# Sort by created_at descending
GET /deals?sort=-created_at
 
# Multiple sort fields
GET /deals?sort=-loan_amount,title

Available sort fields by resource

ResourceSortable Fields
Dealstitle, loan_amount, created_at, updated_at

Note: When sort is specified, the API uses offset pagination instead of cursor pagination.

The lender directory doesn't support sort. It returns results best match first when you search by name, and alphabetically otherwise. Passing a non-empty sort returns 400.

Sparse Fieldsets

Reduce response payload by requesting only specific fields:

GET /deals?fields=id,title,loan_amount,created_at

The id field is always included regardless of the fields parameter.

Includes

Embed related sub-resources in a single request using the include parameter:

# Include financials and properties with deals
GET /deals?include=financials,properties
 
# Include on a single deal
GET /deals/123?include=financials,properties

Available includes by resource

ResourceAvailable Includes
Dealsfinancials, properties
More in this section