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.
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
Indicates if the request was successful
Complete metadata object containing all reference data All available property types
All operation types (venta, alquiler, etc.)
Available property features
Property condition options
Usage Example
From src/components/FilterSidebar.tsx:39:
const response = await api . metadata . getAll ();
setMetadata ( response . data );
Get Property Types
GET /metadata/property-types
const response = await api . metadata . getPropertyTypes ();
Retrieve all available property types.
Response
Indicates if the request was successful
Array of property type objects Show PropertyType structure
Unique property type identifier
Display name (Casa, Departamento, PH, Terreno, etc.)
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 /metadata/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
Filter subtypes by property type ID
Response
Indicates if the request was successful
data
PropertySubtype[]
required
Array of property subtype objects Show PropertySubtype structure
Unique subtype identifier
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
GET /metadata/operation-types
const response = await api . metadata . getOperationTypes ();
Retrieve all available operation types (venta, alquiler, etc.).
Response
Indicates if the request was successful
Array of operation type objects Show OperationType structure
Unique operation type identifier
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
GET /metadata/property-statuses
const response = await api . metadata . getPropertyStatuses ();
Retrieve all available property statuses.
Response
Indicates if the request was successful
Array of property status objects Show PropertyStatus structure
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
Indicates if the request was successful
Array of currency objects Unique currency identifier
ISO 4217 currency code (ARS, USD, EUR)
Currency symbol (, U S , US , U S , €)
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
Indicates if the request was successful
Array of feature objects Unique feature identifier
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" }
]
}
const response = await api . metadata . getTags ();
Retrieve all available property tags.
Response
Indicates if the request was successful
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
Indicates if the request was successful
Array of condition objects Unique condition identifier
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
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 );
};