Endpoint
GET /businesses
Returns an HTML page listing businesses with support for filtering, sorting, and pagination. When called with the HX-Request header, returns only the business table rows partial for HTMX-driven updates.
Query parameters
Filter by partial business name match. Case-insensitive.
Filter by partial industry match. Case-insensitive.
Filter by partial country match. Case-insensitive.
ISO date string. Returns businesses created on or after this date (e.g.,
2024-01-01).ISO date string. Returns businesses created on or before this date, inclusive through end of day (e.g.,
2024-12-31).Column to sort by. Accepted values:
name, industry, country, created_at, risk_score. Sorting by risk_score uses the most recent evaluation for each business. Defaults to created_at.Sort direction. Accepted values:
asc, desc. Defaults to desc.Page number for pagination. Defaults to
1. Each page returns up to 15 results. Values below 1 are clamped to 1; values beyond the last page are clamped to the last page.Response
Returns an HTML page. When theHX-Request header is present, returns only the partials/business_rows.html fragment containing the business table rows, pagination info, and totals.
When making requests via HTMX (i.e., requests that include the
HX-Request: true header), the server returns a partial HTML fragment instead of the full page. This allows the UI to swap in updated table rows without a full page reload. Direct browser navigation always returns the full page.