TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nelrondon/backend-proyecto-estructuras/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/properties/type/:type endpoint returns all property listings that match a specific property type. No authentication is required. Before the value is validated, the server automatically capitalizes the first letter of the supplied type parameter using a capitalize() utility — meaning casa, CASA, and Casa all resolve to Casa. If the type does not match one of the four permitted values after capitalization, the server returns a 422 validation error. If no properties of that type exist in the database, a 500 error is returned.
Endpoint
Authentication
None required. This is a public endpoint.Path Parameters
The category of property to filter by. Must be one of the following values (case-insensitive, automatically capitalized by the server):
Casa— Residential houseApartamento— Apartment or condominium unitTerreno— Land or undeveloped plotComercial— Commercial property
Input Normalization
The server passes the raw:type path segment through a capitalize() utility before schema validation. This means inputs such as casa, CASA, or cAsA are all normalized to Casa before being checked against the allowed enum values. You may send the value in any casing.
Response
On success, the endpoint returns a JSON object with aproperties key containing an array of matching property records.
Response Fields
Array of property objects that match the requested type. Each element contains the full property record.
Error Responses
| Status | Body | Description |
|---|---|---|
422 | { "error": "<validation message>" } | The supplied type is not one of the four valid enum values after capitalization. The error message is generated by the Zod schema and indicates the invalid value and the permitted options. |
500 | { "error": "No hay propiedades de este tipo" } | The type is valid but no properties of that type exist in the database. |