Step 4 What type of place will guests have

Purpose (Product)

  • Clarify listing scope: Captures whether guests book the entire place, a single private room, or multiple rooms in a co-living setup.

  • Why it matters: Determines inventory model (parent vs child/shared), downstream UX (e.g., rooms configuration), calendar/availability logic, and channel mapping behavior.

UX Flow (What the user sees)

1

Selection screen

A screen with three selectable cards:

  • Entire place

  • Co Living / Private Room

  • Co Living / Multiple Rooms

![[Desktop 3.png]]

2

Interaction

  • Selecting a card highlights it.

  • Clicking Next validates the selection and persists it.

  • If no selection → validation error and Next disabled.

3

Success

  • If valid and updates succeed, the step advances to the next screen: “Where is the listing located?”.

System Flow (How it works)

  1. User selects a listing type and clicks Next.

  2. Frontend PATCHes the property with the chosen listing type.

  3. On success, frontend PATCHes the user to increment onboardingStep.

  4. Frontend refreshes property list (GET /api/properties) and navigates to the next onboarding screen.

  5. On API error, the user remains on the current step; no onboardingStep increment or navigation occurs.

APIs Called

  • PATCH /api/properties/{propertyId}

    • Payload:

Request payload
{
  "propertyDetails": {
    "listingType": "parent" | "child" | "shared"
  }
}
  • Response: Updated property

  • Errors: 400 (validation), 401/403 (authz), 404 (property not found), 500

  • Idempotent for same value

  • PATCH /api/users/{userId}

    • Payload:

- Response: Updated user - Errors: 400, 401/403, 404, 500

  • GET /api/properties

    • Purpose: Refresh property list post-update

QA Checklist

Visual
  • Three cards render with correct labels and icons.

  • Selection styles apply when a card is chosen.

Behavior
  • Without selection → validation error; Next disabled.

  • With selection → PATCH property then PATCH user step, then advance.

Data
  • propertyDetails.listingType updated accordingly.

  • users.onboardingStep increments exactly once per successful step.

Negative
  • Simulated API error keeps user on step; no step increment or navigation.