EstateHub

Property Discovery API

Base URL: http://localhost:8000/api/v1
Prefix: /customers
Auth: Mixed public/customer JWT
Headers: Content-Type: application/json


1. List Properties

Browse available buy/rent properties with pagination and filters.

GET/customers/properties/?page=1&city=Austin&purpose=rent&currency=USD

Auth: Not required

Success Example

JSON
{
  "success": true,
  "message": "Properties retrieved successfully.",
  "data": {
    "properties": {
      "count": 1,
      "next": null,
      "previous": null,
      "results": [
        {
          "id": "7fd15d25-5f68-48d8-a97d-60ec10cf41b2",
          "title": "Modern Apartment in Downtown",
          "slug": "modern-apartment-in-downtown",
          "property_type": "apartment",
          "purpose": "rent",
          "price": "2250.00",
          "currency": "USD",
          "city": "Austin",
          "area_name": "Downtown",
          "bedrooms": 3,
          "bathrooms": 2,
          "area_size": "1450.00",
          "area_unit": "sqft",
          "ownership_verified": true,
          "is_featured": true,
          "is_trending": true,
          "primary_media": {
            "id": "a3e2a1bb-57a1-4ca5-86d2-bc4b5160b6e2",
            "type": "image",
            "file_url": "https://example.com/property.jpg",
            "thumbnail_url": "",
            "is_primary": true,
            "sort_order": 0
          },
          "amenities": [
            {
              "id": "5c59b373-5b04-498e-9ec8-4a10f4ed4789",
              "name": "Parking",
              "slug": "parking",
              "icon_url": ""
            }
          ],
          "approved_at": "2026-08-02T08:30:00Z",
          "created_at": "2026-08-01T10:00:00Z"
        }
      ]
    }
  }
}

Notes

  • Supported filters: q, search, property_type, type, purpose, city, area_name, min_price, max_price, bedrooms, bathrooms, amenities, amenity, ordering, sort.

  • Supported sort values: price, -price, newest, -created_at, featured, trending.

  • Only available properties with purpose buy or rent are returned.

  • Pagination defaults to 12 items per page and max 50.


2. Property Details

Get full details for one public property.

GET/customers/properties/{id_or_slug}/

Auth: Not required

Success Example

JSON
{
  "success": true,
  "message": "Property details retrieved successfully.",
  "data": {
    "property": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "title": "Luxury Apartment in South Congress",
      "slug": "luxury-apartment-in-south-congress",
      "property_type": "apartment",
      "purpose": "buy",
      "price": "1250000.00",
      "currency": "USD",
      "city": "Austin",
      "area_name": "South Congress",
      "bedrooms": 4,
      "bathrooms": 3,
      "area_size": "2450.00",
      "area_unit": "sqft",
      "ownership_verified": true,
      "is_featured": true,
      "is_trending": true,
      "primary_media": {
        "id": "a550e840-e29b-41d4-a716-446655440001",
        "type": "image",
        "file_url": "https://example.com/properties/south-congress-apartment-main.jpg",
        "thumbnail_url": "https://example.com/properties/south-congress-apartment-main-thumbnail.jpg",
        "is_primary": true,
        "sort_order": 0
      },
      "amenities": [
        {
          "id": "b550e840-e29b-41d4-a716-446655440001",
          "name": "Parking",
          "slug": "parking",
          "icon_url": "https://example.com/icons/parking.svg"
        },
        {
          "id": "b550e840-e29b-41d4-a716-446655440002",
          "name": "Swimming Pool",
          "slug": "swimming-pool",
          "icon_url": "https://example.com/icons/swimming-pool.svg"
        },
        {
          "id": "b550e840-e29b-41d4-a716-446655440003",
          "name": "24/7 Security",
          "slug": "24-7-security",
          "icon_url": "https://example.com/icons/security.svg"
        }
      ],
      "approved_at": "2026-08-20T08:30:00Z",
      "created_at": "2026-08-18T10:15:30Z",
      "description": "A spacious luxury apartment located in South Congress with modern interiors, large balconies, excellent natural lighting and premium community facilities.",
      "address": "125 Example Avenue, Austin, TX 78704",
      "latitude": "30.2500000",
      "longitude": "-97.7490000",
      "estimated_value": "26500000.00",
      "estimated_at": "2026-08-25T12:00:00Z",
      "owner": {
        "id": "c550e840-e29b-41d4-a716-446655440001",
        "full_name": "Alex Carter",
        "email": "arif.james@example.com",
        "phone": "+15125550106"
      },
      "agent": {
        "id": "d550e840-e29b-41d4-a716-446655440001",
        "full_name": "Olivia Miller",
        "email": "nusrat.agent@example.com",
        "phone": "+15125550108"
      },
      "media": [
        {
          "id": "a550e840-e29b-41d4-a716-446655440001",
          "type": "image",
          "file_url": "https://example.com/properties/south-congress-apartment-main.jpg",
          "thumbnail_url": "https://example.com/properties/south-congress-apartment-main-thumbnail.jpg",
          "is_primary": true,
          "sort_order": 0
        },
        {
          "id": "a550e840-e29b-41d4-a716-446655440002",
          "type": "image",
          "file_url": "https://example.com/properties/south-congress-apartment-bedroom.jpg",
          "thumbnail_url": "https://example.com/properties/south-congress-apartment-bedroom-thumbnail.jpg",
          "is_primary": false,
          "sort_order": 1
        },
        {
          "id": "a550e840-e29b-41d4-a716-446655440003",
          "type": "video",
          "file_url": "https://example.com/properties/south-congress-apartment-tour.mp4",
          "thumbnail_url": "https://example.com/properties/south-congress-apartment-tour-thumbnail.jpg",
          "is_primary": false,
          "sort_order": 2
        },
        {
          "id": "a550e840-e29b-41d4-a716-446655440004",
          "type": "floor_plan",
          "file_url": "https://example.com/properties/south-congress-apartment-floor-plan.jpg",
          "thumbnail_url": "https://example.com/properties/south-congress-apartment-floor-plan-thumbnail.jpg",
          "is_primary": false,
          "sort_order": 3
        }
      ],
      "resources": [
        {
          "id": "f550e840-e29b-41d4-a716-446655440001",
          "title": "Architectural Plan",
          "resource_type": "architectural_plan",
          "file_url": "https://example.com/properties/south-congress-architectural-plan.pdf",
          "file_size": 3200000,
          "sort_order": 0
        },
        {
          "id": "f550e840-e29b-41d4-a716-446655440002",
          "title": "Project Brochure",
          "resource_type": "brochure",
          "file_url": "https://example.com/properties/south-congress-project-brochure.pdf",
          "file_size": 2100000,
          "sort_order": 1
        },
        {
          "id": "f550e840-e29b-41d4-a716-446655440003",
          "title": "Financial Projection",
          "resource_type": "financial_projection",
          "file_url": "https://example.com/properties/south-congress-financial-projection.pdf",
          "file_size": 3100000,
          "sort_order": 2
        }
      ],
      "price_history": [
        {
          "id": "e550e840-e29b-41d4-a716-446655440001",
          "price": "1250000.00",
          "currency": "USD",
          "change_type": "price_updated",
          "recorded_at": "2026-08-28T09:45:00Z"
        },
        {
          "id": "e550e840-e29b-41d4-a716-446655440002",
          "price": "1375000.00",
          "currency": "USD",
          "change_type": "listed",
          "recorded_at": "2026-08-18T10:15:30Z"
        }
      ]
    }
  }
}

Notes

  • Returns 404 when the property does not exist or is not publicly available.

3. Map Properties

Get property pins inside a map boundary.

GET/customers/properties/map/?north=30.35&south=30.15&east=-97.65&west=-97.85

Auth: Not required

Success Example

JSON
{
  "success": true,
  "message": "Property map pins retrieved successfully.",
  "data": {
    "pins": [
      {
        "id": "7fd15d25-5f68-48d8-a97d-60ec10cf41b2",
        "title": "Modern Apartment in Downtown",
        "property_type": "apartment",
        "purpose": "rent",
        "price": "2250.00",
        "currency": "USD",
        "city": "Austin",
        "area_name": "Downtown",
        "latitude": "30.2672000",
        "longitude": "-97.7431000",
        "primary_media": null
      }
    ]
  }
}

Notes

  • Required query params: north, south, east, west.

  • Supports the same discovery filters as List Properties.

  • Maximum 200 pins are returned.

  • Returns 400 when boundaries are missing or invalid.


4. Nearby Properties

Get nearby properties using latitude and longitude.

GET/customers/properties/nearby/?latitude=30.2672&longitude=-97.7431&radius_km=2&limit=20

Auth: Not required

Success Example

JSON
{
  "success": true,
  "message": "Nearby properties retrieved successfully.",
  "data": {
    "properties": [
      {
        "id": "7fd15d25-5f68-48d8-a97d-60ec10cf41b2",
        "title": "Modern Apartment in Downtown",
        "property_type": "apartment",
        "purpose": "rent",
        "price": "2250.00",
        "currency": "USD",
        "city": "Austin",
        "area_name": "Downtown",
        "latitude": "30.2672000",
        "longitude": "-97.7431000",
        "primary_media": null,
        "distance_km": 0
      }
    ]
  }
}

Notes

  • Required query params: latitude, longitude.

  • Optional query params: radius_km, default 10; limit, default 20, max 50.

  • Supports the same discovery filters as List Properties.

  • Returns 400 when coordinates, radius, or limit are invalid.


Get featured public properties.

GET/customers/properties/featured/

Auth: Not required

Success Example

JSON
{
  "success": true,
  "message": "Featured properties retrieved successfully.",
  "data": {
    "properties": {
      "count": 1,
      "next": null,
      "previous": null,
      "results": []
    }
  }
}

Notes

  • Returns available buy/rent properties where is_featured is true.

  • Supports the same filters and pagination as List Properties.


6. New Properties

Get newest public properties.

GET/customers/properties/new/

Auth: Not required

Success Example

JSON
{
  "success": true,
  "message": "New properties retrieved successfully.",
  "data": {
    "properties": {
      "count": 1,
      "next": null,
      "previous": null,
      "results": []
    }
  }
}

Notes

  • Ordered by latest approval date, then latest creation date.

  • Supports the same filters and pagination as List Properties.


Get trending public properties.

GET/customers/properties/trending/

Auth: Not required

Success Example

JSON
{
  "success": true,
  "message": "Trending properties retrieved successfully.",
  "data": {
    "properties": {
      "count": 1,
      "next": null,
      "previous": null,
      "results": []
    }
  }
}

Notes

  • Returns available buy/rent properties where is_trending is true.

  • Supports the same filters and pagination as List Properties.


Get personalized property recommendations for the authenticated customer.

GET/customers/properties/recommended/

Auth: Required

Headers

HTTP
Authorization: Bearer {{access_token}}

Success Example

JSON
{
  "success": true,
  "message": "Recommended properties retrieved successfully.",
  "data": {
    "properties": {
      "count": 1,
      "next": null,
      "previous": null,
      "results": []
    }
  }
}

Notes

  • Requires a customer role: buyer, renter, or investor.

  • Recommendations exclude the customer’s favorited properties.

  • When favorites exist, recommendations use matching city, purpose, or property type.

  • Returns 401 when no valid token is provided.

  • Returns 403 when the authenticated user is not a customer.


9. Categories

Get property category metadata.

GET/customers/categories/

Auth: Not required

Success Example

JSON
{
  "success": true,
  "message": "Property categories retrieved successfully.",
  "data": {
    "property_types": [
      {
        "value": "apartment",
        "label": "Apartment"
      }
    ],
    "purposes": [
      {
        "value": "rent",
        "label": "Rent"
      }
    ],
    "area_units": [
      {
        "value": "sqft",
        "label": "Square Feet"
      }
    ]
  }
}

Notes

  • Property types include land, house, villa, apartment, mansion.

  • Public purposes include buy and rent.


10. Amenities

Get active amenity options.

GET/customers/amenities/

Auth: Not required

Success Example

JSON
{
  "success": true,
  "message": "Amenities retrieved successfully.",
  "data": {
    "amenities": [
      {
        "id": "5c59b373-5b04-498e-9ec8-4a10f4ed4789",
        "name": "Parking",
        "slug": "parking",
        "icon_url": ""
      }
    ]
  }
}

Notes

  • Only active amenities are returned.

  • Amenities are ordered by name.


11. Locations

Get available property cities and areas.

GET/customers/locations/

Auth: Not required

Success Example

JSON
{
  "success": true,
  "message": "Locations retrieved successfully.",
  "data": {
    "locations": [
      {
        "city": "Austin",
        "areas": [
          "Downtown",
          "South Congress"
        ]
      }
    ]
  }
}

Notes

  • Locations are generated from currently available buy/rent properties.

12. Search Suggestions

Get search keyword and location suggestions.

GET/customers/search-suggestions/?q=Downtown

Auth: Not required

Success Example

JSON
{
  "success": true,
  "message": "Search suggestions retrieved successfully.",
  "data": {
    "locations": [
      "Downtown",
      "Austin"
    ],
    "keywords": [
      "Modern Apartment in Downtown"
    ]
  }
}

Notes

  • Optional query param: q.

  • Searches title, city, area name, and address.

  • Returns up to 10 unique locations and 10 unique keywords.


Common Success Format

JSON
{
  "success": true,
  "message": "Operation completed successfully.",
  "data": {}
}

Common Error Format

JSON
{
  "success": false,
  "message": "Validation failed.",
  "errors": {
    "field_name": [
      "Error message."
    ]
  }
}