Business DocumentationProperty Listing

Property & Property Unit Listing

Overview

LandlordX uses a two-level hierarchy for property management: Properties (buildings/societies) and Property Units (individual rentable units within properties). This design enables efficient reuse of property data while maintaining unit-level granularity.

Core Concepts

Property vs Property Unit

EntityDescriptionExample
PropertyOverall building, society, or plot”Sunshine Apartments”
Property UnitSpecific rentable unit within a property”Flat 101 in Sunshine Apartments”

Property Types

TypeDescription
apartmentFlat in a multi-story building
gated_community_villaVilla in a gated community
independent_houseStandalone house
commercialCommercial/office space
pgPaying Guest accommodation

Property Onboarding Flow

When a landlord lists a new property, the system intelligently checks for existing properties to avoid duplicates.

Smart Property Matching

The system searches for existing properties based on:

  1. Society/Building Name - Fuzzy matching on the name
  2. Pin Code - Exact match required
  3. Locality - Similarity matching

This prevents duplicate entries for the same building (e.g., multiple landlords in “Sunshine Apartments”).

Data Models

Property Entity

interface Property {
  property_id: string; // UUID
 
  // Address fields
  society_building?: string; // "Sunshine Apartments", "Anand Niwas"
  survey_number?: string; // Land survey number
  road_name?: string; // Road/street name
  locality?: string; // Area/sector/locality
  landmark?: string; // Nearby landmark
  pin_code: number; // Postal code
 
  // Location (auto-fetched via pin code)
  district: string;
  city: string;
  state: string;
  country: string; // Default: "India"
 
  // Classification
  alias_name: string; // User-friendly name
  property_type: PropertyType; // apartment, pg, etc.
  common_amenities?: string[]; // gym, pool, security, parking
 
  // Approval status
  property_approved: boolean;
  property_approved_at?: Date;
  property_approved_by?: number; // OpsUser ID
}

Property Unit Entity

interface PropertyUnit {
  property_unit_id: string; // UUID
  property_id: number; // Parent property
  landlord_id: number; // Owner
  managed_by_id: number; // Manager (can be same as landlord)
 
  // Unit identification
  unit_name: string; // "Flat 101", "Tower A - 801"
 
  // Unit details
  room_type?: RoomType; // 1rk, 1bhk, 2bhk, etc.
  furnishing_type?: FurnishingType; // fully/semi/unfurnished
  furniture_included?: string; // Description of furniture
  area_sqft?: number; // Unit area
  floor_number?: number; // Floor level
 
  // Status
  is_available: boolean; // Available for rent
  unit_notes?: string; // Additional notes
  unit_amenities?: string[]; // balcony, private_parking
}

Room Types

TypeDescription
1rk1 Room Kitchen
1bhk1 Bedroom Hall Kitchen
2bhk2 Bedroom Hall Kitchen
3bhk3 Bedroom Hall Kitchen
4bhk4 Bedroom Hall Kitchen
5bhk5 Bedroom Hall Kitchen
otherOther configurations

Furnishing Types

TypeDescription
fully_furnishedAll furniture and appliances included
semi_furnishedBasic furniture included
unfurnishedNo furniture included

Property Listing Workflow

Step 1: Property Search & Selection

Step 2: Property & Unit Creation

API Endpoints

Property Management

MethodEndpointDescription
POST/propertiesCreate property (with optional units)
GET/propertiesList all landlord’s properties
GET/properties/:idGet single property
PATCH/properties/:idUpdate property
DELETE/properties/:idSoft delete property

Property Unit Management

MethodEndpointDescription
POST/properties/:propertyId/unitsCreate unit for property
GET/properties/:propertyId/unitsList units for property
GET/properties/:propertyId/units/:unitIdGet single unit
PATCH/properties/:propertyId/units/:unitIdUpdate unit
DELETE/properties/:propertyId/units/:unitIdSoft delete unit

Example: Create Property with Unit

POST /properties
 
{
  "alias_name": "Sunshine Apartments - A Wing",
  "property_type": "apartment",
  "society_building": "Sunshine Apartments",
  "locality": "Koregaon Park",
  "pin_code": 411001,
  "district": "Pune",
  "city": "Pune",
  "state": "Maharashtra",
  "common_amenities": ["gym", "security", "parking"],
  "property_units": [
    {
      "unit_name": "Flat 101",
      "room_type": "2bhk",
      "furnishing_type": "semi_furnished",
      "area_sqft": 1200,
      "floor_number": 1,
      "unit_amenities": ["balcony"]
    }
  ]
}

Property Lifecycle

Business Rules

  1. Property Reuse: Same building can be shared across multiple landlords
  2. Auto-Approval: Properties are automatically approved on creation
  3. Landlord Assignment: landlord_id automatically set from JWT token
  4. Manager Default: If no manager specified, managed_by_id = landlord_id
  5. Soft Delete: Deletions set is_active = false (data preserved)
  6. Pin Code Lookup: City, district, state auto-fetched from pin code