Skip to main content

Filtering and sorting

Collection GET endpoints accept filtering and sorting via query string, on top of cursor pagination. Which fields are filterable and sortable varies by resource — check each endpoint's OpenAPI specification. Here is the common grammar.

Filters

Syntax: ?field=value (equality) or ?field[operator]=value.

OperatorSyntaxMeaning
eq (implicit)?status=paid or ?status[eq]=paidEqual to
in?status[in]=pending,paidIs in (comma-separated list)
gte?due_date[gte]=2026-01-01Greater than or equal
lte?due_date[lte]=2026-01-31Less than or equal
gt?amount[gt]=100.00Greater than
lt?amount[lt]=100.00Less than
not?status[not]=cancelledNot equal to

Rules:

  • Each resource allows a subset of fields and operators; a field or operator outside the allowlist → 400 bad_request.
  • eq is always allowed when the field is filterable.
  • An empty value (?field= or ?field[in]=) → 400. Omit the parameter to not filter.
  • Multiple filters combine with logical AND.

Sorting

?sort=field (ascending) or ?sort=-field (descending — - prefix). One field at a time; a field outside the allowlist → 400.

Example

# Payables of a company, due in January, most recent first
curl -H "Authorization: Bearer $KOBANA_TOKEN" \
-H 'User-Agent: Meu Sistema (contato@example.com)' \
'https://api.finance.kobana.com.br/v1/payables?company_id=00000000-0000-0000-0000-000000000001&due_date[gte]=2026-01-01&due_date[lte]=2026-01-31&sort=-due_date&limit=100'

Combining with pagination

Filters and sort carry across pages — pass the cursor from the previous response together with the same filters. See Listing and Pagination.