Skip to main content

Documentation 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.

The GET /api/properties endpoint retrieves every property listing stored in the properties table. It requires no authentication and accepts no query parameters or request body. Use this endpoint to populate listing pages, dashboards, or any view that needs the full catalogue of available properties. If no properties exist in the database, the model throws an error and the server responds with a 500 status.

Endpoint

GET /api/properties

Authentication

None required. This is a public endpoint.

Request

No path parameters, query parameters, or request body are accepted.

Response

On success, the endpoint returns a JSON array where each element is a full property object from the properties table.

Response Fields

id
string
required
Unique UUID identifier for the property, generated server-side at creation time.
title
string
required
Short descriptive title of the property listing.
description
string
Longer free-text description of the property.
status
string
required
Listing availability status. One of Venta (for sale), Alquiler (for rent), or Ambas (both).
property_type
string
required
Category of the property. One of Casa, Apartamento, Terreno, or Comercial.
address
string
required
Street address of the property.
city
string
required
City where the property is located.
state
string
required
State or region where the property is located.
price
number
required
Listed price of the property as a numeric value.
bedrooms
number
Number of bedrooms in the property.
bathrooms
number
Number of bathrooms in the property.
square_feet
number
Total area of the property in square feet.
parking_lots
number
Number of parking spaces available with the property.
img_url
string
URL pointing to the primary image of the property. May be null if no image was provided.
user_id
string
UUID of the user who created the listing. Set server-side from the authenticated user’s JWT at creation time.

Error Responses

StatusBodyDescription
500{ "error": "No hay propiedades" }No property records exist in the database.

Example

Request

curl --request GET \
  --url https://your-api-domain.com/api/properties

Success Response

[
  {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "title": "Casa en el centro",
    "description": "Hermosa casa de dos plantas en pleno centro de la ciudad.",
    "status": "Venta",
    "property_type": "Casa",
    "address": "Calle Principal 123",
    "city": "Caracas",
    "state": "Distrito Capital",
    "price": 150000,
    "bedrooms": 3,
    "bathrooms": 2,
    "square_feet": 1800,
    "parking_lots": 1,
    "img_url": "https://example.com/images/casa-centro.jpg",
    "user_id": "f7e6d5c4-b3a2-1098-fedc-ba9876543210"
  }
]

Error Response

{
  "error": "No hay propiedades"
}

Build docs developers (and LLMs) love