Onboarding step 3 — photos
Onboarding
Onboarding step 3 — photos
Attach confirmed HOME_PHOTO uploads to the listing and pick a cover. Step 3 of 4.
POST
Onboarding step 3 — photos
Overview
Attaches the user’s confirmedHOME_PHOTO uploads to the listing created in step 2, and designates which one is the cover photo.
This endpoint is a one-shot during onboarding — the listing is created with photos: [] and step 3 appends them in a single call. After step 3 has fired, further photo edits go through the post-onboarding photo endpoints (POST /current-home/me/photos, PATCH /current-home/me/photos/reorder, etc.). Re-submitting step 3 returns 409 STATE_CONFLICT.
currentStep stays at 3 until both photos AND description are submitted — only then does it advance to 4.
Preconditions:
currentStepis exactly3.- A step-2 listing exists with
photos.length === 0. - Every
photoUploadIdreferences a confirmed upload owned by the caller withfileType: 'HOME_PHOTO'. coverPhotoIdis one ofphotoUploadIds.- Total photo count would not exceed 10.
Authentication
Bearer <accessToken> required. Scope: user.
Path parameters
None.Query parameters
None.Request body
| Field | Type | Required | Allowed values / Constraints | Example |
|---|---|---|---|---|
photoUploadIds | string[] | yes | 1..10 entries. Each is a 24-char ObjectId of a previously confirmed HOME_PHOTO upload owned by the caller. Array order becomes initial orderIndex. | ["66400a8f1c2b4d5e6f7a8b91", "66400a8f1c2b4d5e6f7a8b92"] |
coverPhotoId | string | yes | 24-char ObjectId. Must equal exactly one entry in photoUploadIds. | 66400a8f1c2b4d5e6f7a8b91 |
photoMeta | object[] | no | Up to 10 per-photo display-metadata entries, computed client-side after cropping. Keyed by uploadId; entries whose uploadId is not in photoUploadIds are ignored. When omitted, photos are stored with an empty blurhash and 0×0 dimensions. | see below |
photoMeta[] object
| Field | Type | Required | Constraints |
|---|---|---|---|
uploadId | string | yes | 24-char ObjectId; should match an entry in photoUploadIds. |
blurhash | string | yes | BlurHash placeholder string, 1..120 chars. The client computes it from the cropped image; the app paints it as a progressive placeholder before the full photo loads. |
width | integer | yes | Cropped width in px, > 0. |
height | integer | yes | Cropped height in px, > 0. |
Example payload
Response — 200 OK
Returns the refreshed onboarding state (same shape asGET /onboarding/state). currentStep stays 3 until the description is also submitted.
| Field | Type | Allowed values | Example |
|---|---|---|---|
onboardingStatus | enum | IN_PROGRESS, COMPLETE | IN_PROGRESS |
currentStep | integer | null | stays 3 until description posted | 3 |
tenancyStatus | enum | unchanged | PENDING |
Example response
Error responses
| Status | Code | Meaning |
|---|---|---|
| 400 | VALIDATION_FAILED | Body fails Zod validation; coverPhotoId not in photoUploadIds; one of the uploads is not a HOME_PHOTO; or the resulting photo count would exceed 10. |
| 401 | UNAUTHENTICATED | Missing, malformed, or expired access token. |
| 404 | NOT_FOUND | One or more photoUploadIds do not belong to the caller (or do not exist). |
| 409 | STATE_CONFLICT | currentStep is not 3; no step-2 listing exists yet; or photos have already been submitted (use the post-onboarding photo endpoints). |
Example error — 400
Side effects
- Appends each photo as an embedded subdocument on the user’s
current_homesdocument (url,thumbnailUrl,orderIndex,isCover,fileSizeBytes). WhenphotoMetais supplied,blurhash,width, andheightare stored from it; otherwise they default to""/0/0. - Exactly one photo is marked
isCover: true— the entry whose id matchescoverPhotoId. - Does NOT advance
currentStepon its own — only the description PATCH does that.
See also
- Step 3 — description
- Upload flow — how to obtain the
photoUploadIds. - Presign upload URLs
- Confirm uploads
- Add listing photos (post-onboarding)