POST /property/post
Actualmente esta funcionalidad solo es compatible con https://www.mapaprop.com/
General Rules
A traves de un json estructurado, se puede importar una propiedad a Mapapaprop
- Debe tener una cuenta Mapaprop.
- Debe tener al menos 1 imagen
- Las imagenes deben estar en una url
- Existen ciertos campos obligatorios
- Ante ciertas fallas, la importacion se retrotrae.
- Sobre las imagenes
- Si es mas de una imagen, se van procesando en lista ordenada.
- Si al menos una imagen logra ser obtenida, la importacion se procesa.
- Si fallan todas, la importacion se cancela.
- La primer imagen del listado siempre sera la
mainImage
- se puede establecer si la prop se publica a traves del campo
published = true - Ud debe conocer el
branchId. ElcustomerIdse deriva automaticamente del token de autenticacion (el valor enviado en el body se ignora por seguridad).
This service will import property json to Mapaprop
El procesamiento es asincronico. El endpoint responde de inmediato con un executionArn que identifica la ejecucion. La creacion de la propiedad, la descarga/procesamiento de imagenes y la indexacion ocurren en segundo plano. El estado de avance se consulta con GET /property/get/status/machine/{executionArn}.
| Resource information | |
|---|---|
| Authentication | Required (JWT) |
| HTTP Method | POST |
| Response | JSON |
| Version | 1 |
Resource URL
https://property-api.mapaprop.com/property/post
Sample code
POST /property/post
Host: property-api.mapaprop.com
Content-Type: application/json
Authorization: Bearer {access_token}
El cuerpo de la peticion es el JSON de la propiedad (ver "Complete JSON model"). El customerId se deriva del token de autenticacion: si se incluye en el body, se ignora y se reemplaza por el del token.
Campos obligatorios
El JSON debe incluir al menos estos campos (de lo contrario la importacion se cancela con Missing required field: {campo} o Invalid type for {campo}: expected {tipo}):
| Campo | Tipo |
|---|---|
title | string |
address | string |
propertyOperation | number |
type | number |
zone0 | number |
zone1 | number |
zone2 | number |
zipCode | string |
description | string |
price | number |
ambiences | number |
landArea | number |
buildingArea | number |
rooms | number |
yearsOld | number |
branchId | number |
currency | string |
Complete JSON model
{
"zipCode": "1416",
"landArea": 600,
"buildingArea": 2500,
"ubication": 1,
"type": 23,
"apartmentsPerFloor": 4,
"ambiences": 1,
"price": 62000,
"customerEmail": "info@mapaprop.com",
"customerAddress": "Calle 6666",
"branchId": 1,
"descriptionFormatted": "descripcion de la propiedad\ndescripcion de la propiedad\ndescripcion de la propiedad\ndescripcion de la propiedad\ndescripcion de la propiedad",
"published": true,
"bathrooms": 1,
"customerName": "Mapaprop INC",
"dependencies": 2,
"propertyOperation": 1,
"bedrooms": 1,
"yearsOld": 2,
"conditions": "condiciones optimas para vivir",
"expensesCurrency": "ARS",
"description": "descripcion de la propiedad descripcion de la propiedad descripcion de la propiedad descripcion de la propiedad descripcion de la propiedad",
"alternativePrices": [],
"title": "Semipisos en Nuevo edificio de Categoria",
"totalFloors": 8,
"customerCountry": 1,
"toilettes": 2,
"customerPhone": "1111-1111-",
"rented": false,
"floors": 1,
"expensesPrice": 29000,
"propertyType": 220,
"customerId": 1,
"currency": "USD",
"address": "Camarones 2721",
"zone3": 1344,
"zone2": 134,
"zone1": 1,
"zone0": 1,
"taxCurrency": "USD",
"taxPrice": 400,
"location": {
"lon": "-58.47843509999999",
"lat": "-34.6111005"
},
"images" : [
{"url": "https://images.mapaprop.app/photos/2563/258096/2897613.jpg", "description":"Primera Imagen"},
{"url": "https://images.mapaprop.app/photos/2563/258096/2897600.jpg", "description":"Segunda Imagen"},
{"url": "https://images.mapaprop.app/photos/2563/258096/2897610.jpg", "description":"Tercer Imagen"},
{"url": "https://images.mapaprop.app/photos/2563/258096/2897609.jpg", "description":"Cuarta Imagen"}
],
"videoDescription": "Video de ejemplo",
"videoUrl": "https://www.youtube.com/shorts/LwtS1Hzempo",
"attributes": [
{
"group_sub": "label",
"country": "ar",
"key_legacy": "accessible",
"group_subtype": "ammenities",
"id": "accessible",
"label": "Accesible",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "airConditonerType",
"country": "ar",
"key_legacy": "1",
"id": "airConditonerTypeCentral",
"label": "Aire acondicionado Central",
"locale": "es_AR",
"type": "list",
"value": "1",
"group": "propertyAttribute"
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "alarm",
"group_subtype": "ammenities",
"id": "alarm",
"label": "Alarma",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "balcony",
"country": "ar",
"key_legacy": "1",
"id": "balconyFrench",
"label": "Balcón Francés",
"locale": "es_AR",
"type": "list",
"group": "propertyAttribute"
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "barbecueArea",
"group_subtype": "spaces",
"id": "barbecue-area",
"label": "Quincho",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "cableIncluded",
"group_subtype": "services",
"id": "cable-included",
"label": "TV Cable incluido",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "countryClub",
"group_subtype": "extras",
"id": "country-club",
"label": "Country club",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "dailyDining",
"group_subtype": "spaces",
"id": "daily-dinning",
"label": "Comedor diario",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "propertyType",
"country": "ar",
"key_legacy": "23",
"id": "developmentRealEstate",
"label": "Desarrollo inmobiliario",
"locale": "es_AR",
"type": "string",
"group": "type"
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "electricGenerator",
"group_subtype": "ammenities",
"id": "electric-generator",
"label": "Generador eléctrico",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "electricity",
"group_subtype": "services",
"id": "electricity",
"label": "Electricidad",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "frontGarden",
"group_subtype": "spaces",
"id": "front-garden",
"label": "Jardín al frente",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "furnished",
"group_subtype": "ammenities",
"id": "furnished",
"label": "Amoblado",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "garageType",
"country": "ar",
"number": 2,
"key_legacy": "1",
"id": "garageSpace",
"label": "Espacio Guarda Coche",
"locale": "es_AR",
"type": "list",
"value": "1",
"group": "propertyAttribute"
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "gatedCommunity",
"group_subtype": "extras",
"id": "gated-community",
"label": "Barrio cerrado",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "grill",
"group_subtype": "ammenities",
"id": "grill",
"label": "Parrilla",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "heatingType",
"country": "ar",
"key_legacy": "1",
"id": "heatingCentral",
"label": "Calefacción Central",
"locale": "es_AR",
"type": "list",
"value": "1",
"group": "propertyAttribute"
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "internet",
"group_subtype": "services",
"id": "internet",
"label": "Internet",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "jacuzzi",
"group_subtype": "ammenities",
"id": "jacuzzi",
"label": "Hidromasaje",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "janitor",
"group_subtype": "services",
"id": "janitor",
"label": "Portero",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "hasLaundry",
"group_subtype": "spaces",
"id": "laundry",
"label": "Lavadero",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "laundryMachine",
"group_subtype": "ammenities",
"id": "laundry-machine",
"label": "Lavarropas",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "mortgageReady",
"group_subtype": "extras",
"id": "mortgage-ready",
"label": "Apto crédito",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "orientation",
"country": "ar",
"key_legacy": "1",
"id": "orientationEast",
"label": "Orientación Este",
"locale": "es_AR",
"type": "list",
"value": "1",
"group": "propertyAttribute"
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "park",
"group_subtype": "spaces",
"id": "park",
"label": "Parque",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "partySaloon",
"group_subtype": "spaces",
"id": "party-saloon",
"label": "Salón de fiestas / SUM",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "hasPatio",
"group_subtype": "spaces",
"id": "patio",
"label": "Patio",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "pavement",
"group_subtype": "services",
"id": "pavement",
"label": "Pavimento",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "petsReady",
"group_subtype": "extras",
"id": "petsReady",
"label": "Apto mascotas",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "pipedWater",
"group_subtype": "services",
"id": "pipedWater",
"label": "Agua Corriente",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "playroom",
"group_subtype": "spaces",
"id": "playroom",
"label": "Playroom",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "hasPrivatElevator",
"group_subtype": "ammenities",
"id": "private-elevator",
"label": "Elevador privado",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "professionalAvailable",
"group_subtype": "extras",
"id": "professional-available",
"label": "Apto profesional",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "propertyOperation",
"country": "ar",
"key_legacy": "1",
"id": "sale",
"label": "Venta",
"locale": "es_AR",
"type": "string",
"group": "operation"
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "hasSecurity",
"group_subtype": "services",
"id": "security",
"label": "Seguridad",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "securityBox",
"group_subtype": "ammenities",
"id": "security-box",
"label": "Caja de seguridad",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "sewers",
"group_subtype": "services",
"id": "sewers",
"label": "Cloacas",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "hasStorage",
"group_subtype": "spaces",
"id": "storage",
"label": "Baulera",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "suite",
"group_subtype": "spaces",
"id": "suite",
"label": "Dormitorio en suite",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "hasSwimmingPool",
"group_subtype": "ammenities",
"id": "swimming-pool",
"label": "Piscina",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "telephoneLine",
"group_subtype": "services",
"id": "telephone-line",
"label": "Línea telefónica",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "terrace",
"group_subtype": "spaces",
"id": "terrace",
"label": "Terraza",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
},
{
"group_sub": "ubication",
"country": "ar",
"key_legacy": "1",
"id": "ubicationFront",
"label": "Ubicación Frente",
"locale": "es_AR",
"type": "list",
"value": "1",
"group": "propertyAttribute"
},
{
"group_sub": "waterHeaterType",
"country": "ar",
"key_legacy": "2",
"id": "waterHeaterThermostatic",
"label": "Agua caliente Termotanque",
"locale": "es_AR",
"type": "list",
"value": "2",
"group": "propertyAttribute"
},
{
"group_sub": "label",
"country": "ar",
"key_legacy": "wifi",
"group_subtype": "services",
"id": "wifi",
"label": "WIFI",
"locale": "es_AR",
"type": "bool",
"group": "propertyAttribute",
"status": true
}
],
}
Complete property model
| Atributo | Descripción |
|---|---|
zipCode | Código postal de la propiedad. |
landArea | Área del terreno en metros cuadrados. |
buildingArea | Área construida en metros cuadrados. |
ubication | Identificador de ubicación. |
type | Tipo de propiedad. |
apartmentsPerFloor | Número de apartamentos por piso. |
ambiences | Número de ambientes en la propiedad. |
price | Precio de la propiedad. |
customerEmail | Correo electrónico del cliente. |
customerAddress | Dirección del cliente. |
branchId | Identificador de la sucursal. |
descriptionFormatted | Descripción formateada de la propiedad. |
published | Indica si la propiedad está publicada. |
bathrooms | Número de baños en la propiedad. |
customerName | Nombre del cliente. |
dependencies | Número de dependencias de la propiedad. |
propertyOperation | Tipo de operación de la propiedad (venta, alquiler, etc.). |
bedrooms | Número de habitaciones. |
yearsOld | Antigüedad de la propiedad en años. |
conditions | Condiciones de la propiedad. |
expensesCurrency | Moneda de los gastos comunes. |
description | Descripción breve de la propiedad. |
alternativePrices | Lista de precios alternativos (vacío). |
title | Título de la propiedad. |
totalFloors | Número total de pisos en el edificio. |
customerCountry | País del cliente (como identificador). |
toilettes | Número de toilettes. |
customerPhone | Teléfono del cliente. |
rented | Indica si la propiedad está rentada. |
floors | Número de pisos. |
expensesPrice | Precio de los gastos comunes. |
propertyType | Tipo de propiedad (como identificador). |
customerId | Identificador del cliente. |
currency | Moneda del precio de la propiedad. |
address | Dirección de la propiedad. |
zone3, zone2, zone1, zone0 | Identificadores de zona geográfica. |
taxCurrency | Moneda de los impuestos. |
taxPrice | Precio de los impuestos. |
location | Objeto que incluye lon (longitud) y lat (latitud) de la propiedad. |
images | Lista de objetos con url y description para imágenes de la propiedad. |
videoDescription | Descripción del video de la propiedad. |
videoUrl | URL del video asociado a la propiedad. |
attributes | Lista de atributos con detalles como group, type, label, locale, etc. para características de la propiedad. |
Internos del Atributo location
| Atributo | Descripción |
|---|---|
lon | Longitud geográfica. |
lat | Latitud geográfica. |
Internos del Atributo images
| Atributo | Descripción |
|---|---|
url | URL de la imagen. |
description | Descripción de la imagen. |
Internos del Atributo attributes
| Atributo | Descripción |
|---|---|
group | Grupo al que pertenece el atributo (e.g., "propertyAttribute"). |
type | Tipo de atributo (e.g., bool, list, string). |
label | Etiqueta del atributo (e.g., "Accesible"). |
locale | Localización lingüística asociada al atributo (e.g., es_AR). |
status | Estado del atributo (e.g., true o false, si aplica). |
value | Valor asociado al atributo (si aplica). |
group_subtype | Subgrupo dentro del grupo principal. |
id | Identificador único del atributo. |
country | País asociado al atributo (e.g., "ar"). |
key_legacy | Clave legada del atributo. |
Response
La importacion es asincronica. El endpoint inicia el procesamiento en segundo plano y responde de inmediato con el identificador de la ejecucion (executionArn), que luego se usa para consultar el estado en GET /property/get/status/machine/{executionArn}.
| Field | Type | Description |
|---|---|---|
message | string | Confirmacion de que el procesamiento comenzo (Property creation started). |
executionArn | string | Identificador de la ejecucion para consultar el estado del avance. |
Sample response
{
"message": "Property creation started",
"executionArn": "arn:aws:states:us-east-1:000000000000:execution:PropertyWorkflow:Property-1717500000000"
}
Errores
| Status | Cuerpo | Causa |
|---|---|---|
| 401 | { "error": "Unauthorized: missing auth context" } | El token no resolvio un customerId valido. |
| 401 | { "error": "Unauthorized: missing Bearer token" } | Falta el header Authorization: Bearer {access_token}. |
| 500 | { "error": "..." } | Error al iniciar el procesamiento. |
Los errores de validacion de campos obligatorios (Missing required field: {campo}, Invalid type for {campo}: expected {tipo}) ocurren durante el procesamiento asincronico y se reportan al consultar el estado de la ejecucion.