Saltar al contenido principal

Publicar Inmueble

POSThttps://{environment}.metrocuadrado.com/rest-api/realestate/publish

Publica un nuevo inmueble en la plataforma.

Ambientes Disponibles

AmbienteURL Base
Desarrollohttps://ptec-core-dev.metrocuadrado.com/rest-api/realestate/publish
Producciónhttps://www.metrocuadrado.com/rest-api/realestate/publish

Parámetros

HeaderValorRequeridoDescripción
Content-Typeapplication/jsonTipo de contenido
x-api-keystringAPI key de autenticación
tokenstringToken JWT de acceso

Ejemplos

curl -X POST \
'https://ptec-core-dev.metrocuadrado.com/rest-api/realestate/publish' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'token: tu-jwt-token' \
-d '{
"realEstateType": 2,
"realEstateOffer": 1,
"price": "12000000",
"administration": "800000",
"city": "5",
"neighborhood": "Laureles",
"stratum": 5,
"zone": 12,
"sector": 22,
"reference1": "9876543210",
"address": "Carrera 80 # 33B 45",
"latitude": "6.24420",
"longitude": "-75.58121",
"amenities": {
"builtTime": "Entre 5 y 10 años",
"rooms": "4",
"bathrooms": "3",
"garages": "2",
"garageType": "Compartido",
"builtArea": "90",
"area": "110",
"negotiable": "false",
"terraceOrBalcony": "Balcón",
"terraceOrBalconyArea": "12.5",
"dinningRoomType": "Comedor Auxiliar",
"kitchenForm": "Abierta",
"heaterType": "Gas",
"gasInstallationType": "Propano",
"stoveType": "Eléctrica",
"closedComplex": false,
"laundryArea": false,
"furnished": false,
"wardrobes": "3",
"curtainType": "Cortinas",
"block": "B",
"apartmentNumber": "204",
"floorNumber": "2",
"studyOrLibrary": false,
"serviceRoom": "false",
"chimney": "false",
"airConditioned": "false",
"cytophone": "false",
"registrationNumber": "XYZ123456",
"jacuzzi": "false",
"alarm": "false",
"pool": "false",
"tennisCourt": "false",
"squashCourt": "false",
"basketballCourt": "false",
"soccerField": "false",
"sauna": "false",
"heater": "false",
"handicappedAccesible": "false",
"greenArea": "true",
"childrenArea": "true",
"cctv": "true",
"bbqArea": "false",
"surveillanceType": "Portería",
"petsAllowed": "true",
"onMainStreet": "false",
"onSecondaryRoad": "true",
"smokingAllowed": "false",
"nearbySupermarket": "true",
"nearbyShoppingCenter": "false",
"nearbyPark": "true",
"nearbyPublicTransport": "true",
"nearbySchoolCollege": "false",
"woodenFloor": "false",
"carpetedFloor": "false",
"tiledFloor": "true",
"porcelainTiledFloor": "false",
"fullKitchen": "true",
"americanKitchen": "false",
"serviceBathroom": "false",
"utilityRoom": "false",
"golfCage": "false",
"surveillance": "true",
"gateHouse": "false",
"ruralZone": "false",
"suitableForChildren": true,
"terrace": false,
"twoFamilyHome": false,
"auxiliaryBathroom": false,
"inBuilding": true,
"shoppingZone": false,
"residentialZone": true,
"lifts": "1",
"bodyguardRoom": false,
"view": "Interior",
"auxiliaryDinningRoom": false,
"bedroomFlooringType": "Vinilo",
"studyFlooringType": "Cerámica",
"diningRoomFlooringType": "Mármol",
"livingRoomFlooringType": "Granito",
"flooringType": "Cerámica",
"mortgageEntity": "Bancolombia",
"hall": false,
"securityDoors": false,
"panoramicView": false,
"elevator": false,
"communityHall": false,
"coveredGarage": false,
"gym": false,
"visitorParkingLot": false,
"parkingType": "Cubierto"
},
"images": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"video": "https://www.youtube.com/watch?v=example123",
"comments": "APTO EN VENTA: Este apartamento está ubicado en una zona tranquila y residencial, ideal para familias. Cuenta con amplios espacios y buena iluminación natural.",
"agentId": 123456,
"responseUrl": "https://example.com/api/callback"
}'

Notas Importantes

- Requiere un token JWT válido (generar en el endpoint de autenticación)

- La API Key debe corresponder al ambiente seleccionado

- Todos los campos marcados como requeridos deben enviarse

  • Las imágenes se pueden subir en una petición separada

Cómo Probar

Para probar este endpoint, sigue estos pasos:

  1. Genera un token JWT usando el endpoint de autenticación
  2. Asegúrate de usar la API Key correcta según el ambiente
  3. Incluye el token en el header token
  4. Prepara el body JSON con los datos del inmueble
  5. Realiza la petición POST al endpoint correspondiente

Códigos de Respuesta

CódigoDescripción
201Inmueble publicado exitosamente
400Parámetros inválidos o faltantes
401Token inválido o expirado
409El usuario no tiene cupos suficientes

Probar Endpoint

API Tester

Prueba los endpoints de forma interactiva

Token Requerido

Este endpoint requiere autenticación. Configura un token JWT válido usando el botón de token en la parte superior de la página.