Onboarding step 2 — current home
Onboarding
Onboarding step 2 — current home
Submit current-home property details. Creates a DRAFT listing. Step 2 of 4.
POST
Onboarding step 2 — current home
Overview
Submits the property details that describe the user’s current home. The server creates acurrent_homes document in status: DRAFT (1:1 with the user — a unique partial index on userId enforces “one listing per user”) and advances currentStep from 2 to 3.
The listing stays DRAFT through the rest of onboarding. Photos are attached in step 3, the description in step 3 description, and the listing only becomes eligible for LIVE once onboarding completes AND tenancy is APPROVED — see POST /current-home/me/publish.
rentMonthlyMinor is derived server-side from rent (weekly → amountMinor * 52 / 12 rounded to nearest pence; monthly → identity) and is used by the matching engine.
Preconditions:
- Onboarding is
IN_PROGRESSandcurrentStepis2or later (step 1 completed).
currentStep only advances 2 → 3 on the first submission — a re-submission never moves or regresses it.
Authentication
Bearer <accessToken> required. Scope: user.
Path parameters
None.Query parameters
None.Request body
| Field | Type | Required | Allowed values / Constraints | Example |
|---|---|---|---|---|
propertyType | enum | yes | DETACHED, SEMI_DETACHED, TERRACED, FLAT, MAISONETTE, BUNGALOW | FLAT |
bedrooms | integer | yes | 0..10 inclusive | 2 |
bathrooms | integer | yes | 0..10 inclusive | 1 |
address | string | yes | 1..500 chars. Free-text postal address (usually the reverse-geocoded address of the map pin). | 27 Camden High Street, London |
addressDetails | string | no | 0..200 chars. Free-text detail the user typed on top of the pin address (house/flat number, street, entrance notes). Display-only. Defaults to "". | Flat 4 |
postcode | string | yes | 5..10 chars; must be a valid UK postcode. Normalized to uppercase server-side. | NW1 7JE |
lng | number | yes | -180..180. Decimal degrees, WGS-84. | -0.1426 |
lat | number | yes | -90..90. Decimal degrees, WGS-84. | 51.5390 |
rent | object | yes | See Rent object | |
features | string[] | no | Subset of: GARDEN, PARKING, BALCONY, LIFT, GROUND_FLOOR, PETS_ALLOWED, WHEELCHAIR_ACCESS. Defaults to []. | ["GARDEN", "LIFT"] |
Rent object
| Field | Type | Required | Notes / Constraints | Example |
|---|---|---|---|---|
amountMinor | integer | yes | Positive integer pence (1 = £0.01). | 120000 |
frequency | enum | yes | WEEKLY, MONTHLY | MONTHLY |
Example payload
Response — 200 OK
Returns the refreshed onboarding state (same shape asGET /onboarding/state).
| Field | Type | Allowed values | Example |
|---|---|---|---|
onboardingStatus | enum | IN_PROGRESS, COMPLETE | IN_PROGRESS |
currentStep | integer | null | advances to 3 | 3 |
tenancyStatus | enum | unchanged | PENDING |
Example response
Error responses
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED | Body fails Zod validation (bad enum, postcode not a valid UK format, lng/lat out of range, etc.). |
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
| 409 | STATE_CONFLICT | Step 1 not completed yet (currentStep < 2), or onboarding is already complete (use PATCH /current-home/me instead). |
Example error — 409
Side effects
- First submission: inserts a row into the
current_homescollection withstatus: DRAFT, the supplied details,photos: [],description: "", andrentMonthlyMinorderived fromrent; setsusers.currentStep = 3. - Re-submission (onboarding in progress): updates the existing DRAFT row’s step-2 fields in place; photos, description, status, and
currentStepare untouched.