Skip to main content

Overview

The property object is the core data structure containing all information about a real estate listing. It is accessed via data.property in the JSON response.

Top-Level Structure

Property data is returned in a nested structure:
data
object
required
Top-level wrapper object
success
boolean
required
Indicates if the request was successful

Property Object Fields

The data.property object contains the following fields:

Identification

property_uuid
string
required
Unique identifier for the propertyExample: "bbb8185d-2ee3-48a4-ba7f-8fecaba6e549"
property_id
string
required
Numeric property identifierExample: "5157395"
nid
number
required
Node ID from the source systemExample: 49695472717

Basic Information

titulo
string
required
Property listing titleExample: "Apartamento en Venta en Las Cabañas, Bello"
descripcion
string
required
Detailed property description including features, location, and nearby amenitiesExample: "Apartamento en venta de 79m2, con vista exterior..."

Media

images
array
required
Array of image objects for the property. See Image Schema for details.Images are sorted by the order field before display.
url_360
string
URL to a 360-degree virtual tour of the propertyExample: "https://apartamento-dubai.vercel.app/?m=bE7cSwnyKad"

Services & Features

servicios
array
required
Array of utility service objects with costs. See Services Schema for details.
caracteristicas_propiedad
array
required
Array of property feature stringsExample: ["Interior", "Balcón", "Conjunto Cerrado", "Instalación de gas"]

Property Details

detalles_propiedad
object
required
Nested object containing detailed property information

Data Normalization

The normalizeProperty() function in app.js transforms the raw property data into a flattened structure for easier rendering:
const normalizeProperty = (raw) => {
  const property = raw?.property || raw?.data?.property || raw;
  const details = property?.detalles_propiedad || {};
  
  return {
    titulo: property?.titulo,
    descripcion: property?.descripcion,
    tipo_inmueble: details?.tipo_inmueble || property?.tipo_inmueble,
    estrato: details?.estrato || property?.estrato,
    precio: details?.precio_venta ?? property?.precio,
    area_privada: details?.area ?? property?.area_privada,
    habitaciones: details?.num_habitaciones ?? property?.habitaciones,
    banos: details?.baños ?? details?.banos ?? property?.banos,
    // ... additional fields
  };
};

Key Normalization Rules

  • Field Merging: Top-level and detalles_propiedad fields are merged, with detalles_propiedad taking precedence
  • Fallback Values: Multiple field names are checked (e.g., conjunto, conjunto_edificio)
  • Image Sorting: Images are sorted by the order field ascending
  • Null Coalescing: Uses ?? operator to handle null/undefined values

Example Response

{
  "data": {
    "property": {
      "property_uuid": "bbb8185d-2ee3-48a4-ba7f-8fecaba6e549",
      "property_id": "5157395",
      "nid": 49695472717,
      "titulo": "Apartamento en Venta en Las Cabañas, Bello",
      "descripcion": "Apartamento en venta de 79m2, con vista exterior...",
      "url_360": "https://apartamento-dubai.vercel.app/?m=bE7cSwnyKad",
      "images": [...],
      "servicios": [...],
      "caracteristicas_propiedad": ["Interior", "Balcón"],
      "detalles_propiedad": {
        "area": 79.0,
        "tipo_inmueble": "Apartamento",
        "precio_venta": 328000000.0,
        "num_habitaciones": 3,
        "baños": 2,
        "ciudad": "Bello"
      }
    }
  },
  "success": true
}

Usage in Application

The property data is loaded and rendered in app.js:665-687:
const loadData = async () => {
  initLightbox();
  
  if (window.PROPERTY_DATA) {
    populatePage(window.PROPERTY_DATA);
    return;
  }
  
  const response = await fetch('./property-5157395.json');
  const data = await response.json();
  populatePage(data);
};

Build docs developers (and LLMs) love