Landlord autocomplete
Onboarding
Landlord autocomplete
Search the curated list of UK councils and housing associations for the step-1 tenancy form.
GET
Landlord autocomplete
Overview
Returns the curated list of UK councils and housing associations the client offers as autocomplete suggestions on the step-1 “Who is your landlord?” tenancy form. This is a reference lookup only — it does not verify anything; a human admin reviews the uploaded tenancy document. Pass an optionalq to filter by name as the user types, and an optional type to restrict to councils or housing associations. Only active landlords are returned, name-sorted, capped at 20 rows.
The list is populated by the pnpm seed:landlords script (a vendored data file mirroring the Regulator of Social Housing register — ~1,580 councils + private registered providers) and curated by admins via the admin landlords endpoints. When the user’s landlord is not in the list, the client falls back to the free-text landlordName field on step 1 with landlordId: null.
Authentication
Bearer <accessToken> required. Scope: user.
Path parameters
None.Query parameters
| Param | Type | Required | Notes | Example |
|---|---|---|---|---|
q | string | no | Case-insensitive substring match on the landlord name (1..100 chars). | camden |
type | string | no | Filter to COUNCIL or HOUSING_ASSOCIATION. | COUNCIL |
Request body
None.Response — 200 OK
| Field | Type | Notes | Example |
|---|---|---|---|
items | array | Up to 20 active landlords matching the query, name-sorted. Empty when nothing matches or the list is unseeded in this environment. | see below |
items[].id | string | Landlord id — send back as landlordId on step 1. | 665f0a... |
items[].name | string | Canonical landlord name. | London Borough of Camden |
items[].type | string | COUNCIL or HOUSING_ASSOCIATION. | COUNCIL |
Example response
Error responses
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED | type is not one of the allowed values, or q is out of range. |
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
Side effects
None — this is a pure read.See also
- Step 1 — tenancy — consumes the selected
landlordId. - Admin — list landlords — curate the reference list.
- Onboarding state machine