Skip to main content

Overview

The Metadata API provides reference data for property listings. These endpoints return configuration values for property types, operation types, features, tags, and other categorical data used throughout the application. Base Path: /api/metadata
All metadata endpoints are public and do not require authentication.

Get All Metadata

const response = await api.metadata.getAll();
Retrieve all metadata in a single request. This is the most efficient way to load all reference data at application startup.

Response

success
boolean
required
Indicates if the request was successful
data
Metadata
required
Complete metadata object containing all reference data

Usage Example

From src/components/FilterSidebar.tsx:39:
const response = await api.metadata.getAll();
setMetadata(response.data);

Get Property Types

const response = await api.metadata.getPropertyTypes();
Retrieve all available property types.

Response

success
boolean
required
Indicates if the request was successful
data
PropertyType[]
required
Array of property type objects

Example Response

{
  "success": true,
  "data": [
    { "id": 1, "name": "Casa", "slug": "casa" },
    { "id": 2, "name": "Departamento", "slug": "departamento" },
    { "id": 3, "name": "PH", "slug": "ph" },
    { "id": 4, "name": "Terreno", "slug": "terreno" },
    { "id": 5, "name": "Local comercial", "slug": "local" },
    { "id": 6, "name": "Galpón", "slug": "galpon" },
    { "id": 7, "name": "Oficina comercial", "slug": "oficina" },
    { "id": 8, "name": "Campo", "slug": "campo" },
    { "id": 9, "name": "Depósito", "slug": "deposito" },
    { "id": 10, "name": "Bodega", "slug": "bodega" },
    { "id": 11, "name": "Consultorio", "slug": "consultorio" },
    { "id": 12, "name": "Fondo de comercio", "slug": "fondo-comercio" },
    { "id": 13, "name": "Hotel", "slug": "hotel" },
    { "id": 14, "name": "Cochera", "slug": "cochera" }
  ]
}

Get Property Subtypes

// Get all subtypes
const response = await api.metadata.getPropertySubtypes();

// Get subtypes for a specific property type
const response = await api.metadata.getPropertySubtypes(1);
Retrieve property subtypes, optionally filtered by property type.

Query Parameters

propertyTypeId
number
Filter subtypes by property type ID

Response

success
boolean
required
Indicates if the request was successful
data
PropertySubtype[]
required
Array of property subtype objects

Example Response

{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "Casa en barrio cerrado",
      "slug": "casa-barrio-cerrado",
      "typeId": 1
    },
    {
      "id": 2,
      "name": "Casa en country",
      "slug": "casa-country",
      "typeId": 1
    }
  ]
}

Usage Example

From src/pages/PropertyFormPage.tsx:282:
const response = await api.metadata.getPropertySubtypes(propertyTypeId);
setPropertySubtypes(response.data);

Get Operation Types

const response = await api.metadata.getOperationTypes();
Retrieve all available operation types (venta, alquiler, etc.).

Response

success
boolean
required
Indicates if the request was successful
data
OperationType[]
required
Array of operation type objects

Example Response

{
  "success": true,
  "data": [
    { "id": 1, "name": "Venta", "slug": "venta" },
    { "id": 2, "name": "Alquiler", "slug": "alquiler" },
    { "id": 3, "name": "Alquiler temporal", "slug": "alquiler-temporal" },
    { "id": 4, "name": "Permuta", "slug": "permuta" }
  ]
}

Get Property Statuses

const response = await api.metadata.getPropertyStatuses();
Retrieve all available property statuses.

Response

success
boolean
required
Indicates if the request was successful
data
PropertyStatus[]
required
Array of property status objects

Example Response

{
  "success": true,
  "data": [
    { "id": 1, "name": "Activo", "slug": "activo" },
    { "id": 2, "name": "Pendiente", "slug": "pendiente" },
    { "id": 3, "name": "Vendido", "slug": "vendido" },
    { "id": 4, "name": "Alquilado", "slug": "alquilado" },
    { "id": 5, "name": "Pausado", "slug": "pausado" }
  ]
}

Get Currencies

const response = await api.metadata.getCurrencies();
Retrieve all available currencies.

Response

success
boolean
required
Indicates if the request was successful
data
Currency[]
required
Array of currency objects

Example Response

{
  "success": true,
  "data": [
    {
      "id": 1,
      "code": "ARS",
      "symbol": "$",
      "name": "Peso Argentino"
    },
    {
      "id": 2,
      "code": "USD",
      "symbol": "US$",
      "name": "Dólar Estadounidense"
    },
    {
      "id": 3,
      "code": "EUR",
      "symbol": "€",
      "name": "Euro"
    }
  ]
}

Get Features

const response = await api.metadata.getFeatures();
Retrieve all available property features.

Response

success
boolean
required
Indicates if the request was successful
data
Feature[]
required
Array of feature objects

Example Response

{
  "success": true,
  "data": [
    { "id": 1, "name": "Parrilla" },
    { "id": 2, "name": "Pileta" },
    { "id": 3, "name": "Aire acondicionado" },
    { "id": 4, "name": "SUM" },
    { "id": 5, "name": "Gimnasio" },
    { "id": 6, "name": "Seguridad 24hs" },
    { "id": 7, "name": "Ascensor" },
    { "id": 8, "name": "Balcón" },
    { "id": 9, "name": "Terraza" },
    { "id": 10, "name": "Jardín" },
    { "id": 11, "name": "Cochera" },
    { "id": 12, "name": "Lavadero" },
    { "id": 13, "name": "Internet" },
    { "id": 14, "name": "Electricidad" }
  ]
}

Get Tags

const response = await api.metadata.getTags();
Retrieve all available property tags.

Response

success
boolean
required
Indicates if the request was successful
data
Tag[]
required
Array of tag objects

Example Response

{
  "success": true,
  "data": [
    { "id": 1, "name": "Oportunidad" },
    { "id": 2, "name": "Crédito hipotecario" },
    { "id": 3, "name": "Apto profesional" },
    { "id": 4, "name": "Acepta permuta" },
    { "id": 5, "name": "Apto crédito" },
    { "id": 6, "name": "Amoblado" },
    { "id": 7, "name": "Acepta mascotas" },
    { "id": 8, "name": "Dueño directo" }
  ]
}

Get Conditions

const response = await api.metadata.getConditions();
Retrieve all available property conditions.

Response

success
boolean
required
Indicates if the request was successful
data
Condition[]
required
Array of condition objects

Example Response

{
  "success": true,
  "data": [
    { "id": 1, "name": "A estrenar" },
    { "id": 2, "name": "Bueno" },
    { "id": 3, "name": "Muy bueno" },
    { "id": 4, "name": "Excelente" },
    { "id": 5, "name": "Reciclado" },
    { "id": 6, "name": "Para refaccionar" }
  ]
}

Usage Best Practices

Cache Metadata

Metadata rarely changes. Load it once at application startup and cache it:
// Load all metadata at startup
const metadata = await api.metadata.getAll();
localStorage.setItem('metadata', JSON.stringify(metadata.data));

// Use cached data
const cachedMetadata = JSON.parse(localStorage.getItem('metadata'));

Load on Demand

For specific forms, load only needed metadata:
const [propertyTypes, operationTypes, conditions] = await Promise.all([
  api.metadata.getPropertyTypes(),
  api.metadata.getOperationTypes(),
  api.metadata.getConditions()
]);

Dynamic Subtype Loading

Load subtypes when user selects a property type:
const handlePropertyTypeChange = async (propertyTypeId: number) => {
  const response = await api.metadata.getPropertySubtypes(propertyTypeId);
  setAvailableSubtypes(response.data);
};

Build docs developers (and LLMs) love