POST /api/propiedades
Create a new property in the database. This endpoint requires admin authentication using HTTP Basic Auth.Request
Optional unique 6-character property identifier. If not provided, one will be automatically generated. Must be exactly 6 characters if provided.
Country where the property is located (e.g., “Argentina”)
City where the property is located (e.g., “Tigre”)
Street address of the property (e.g., “Av. Cazón 123”)
Number of rooms in the property
Property size in square meters
Property price in local currency
Type of contract. Must be one of:
Alquiler (Rent) or Venta (Sale)Current status of the property. Must be one of:
Disponible (Available), Reservado (Reserved), Alquilado (Rented), Vendido (Sold)Optional description or additional details about the property
Example Request
Response
Indicates whether the operation was successful
Human-readable message describing the result
The unique identifier assigned to the newly created property (returned on success)
Error message describing what went wrong (returned on failure)
Example Response
Success (201)Status Codes
Property created successfully
Invalid data or validation error in request body
Authentication required or credentials invalid
Property with the specified codigo_id already exists
Notes
- If
codigo_idis not provided, the system will automatically generate a unique 6-character code using alphanumeric characters (excluding O, 0, I, L for clarity) - If a custom
codigo_idis provided and already exists, the request will fail with a 409 Conflict error - The system will attempt up to 5 times to generate a unique ID if collisions occur (extremely rare)
- All required fields must be provided and pass validation according to the property schema