POST /cabaprop/publish
Publishes a property on Cabaprop from the Property Object.
It is idempotent: if a live listing already exists for the same propertyId/custId, this endpoint updates it instead of returning a duplicate error.
| Resource information | |
|---|
| Authentication | Required (Mapaprop token + Cabaprop token) |
| HTTP Method | POST |
| Response | JSON |
| Version | 1 |
https://property-api.mapaprop.com/cabaprop/publish
| Header | Required | Description |
|---|
Authorization | yes | Bearer <token> — Mapaprop token |
X-Cabaprop-Token | yes | Cabaprop token obtained in POST /cabaprop/connect |
Content-Type | yes | application/json |
| Key | Type | Required | Description |
|---|
propertyId | number/string | yes | Id of the property in your application. It is used to link your property with the Cabaprop listing. |
custId | number/string | yes | Id of the customer/account in your application. It must match the authenticated custId (see errors). |
property | object | yes | The Property Object, with a minimum of 3 images. |
realStateId | string/number | yes | Id of the real estate agency on Cabaprop, obtained in GET /cabaprop/get-branches (.id). |
branchOfficeId | string/number | yes | Id of the branch on Cabaprop, obtained in GET /cabaprop/get-branches (.branchOffices[].id). |
POST /cabaprop/publish
Host: property-api.mapaprop.com
Content-Type: application/json
Authorization: Bearer {access_token}
X-Cabaprop-Token: {cabaprop_token}
{
"propertyId": 188017,
"custId": 1,
"realStateId": "81592",
"branchOfficeId": "83347",
"property": {
"title": "Hermosa casa 4 ambientes con parrilla",
"description": "Casa de 4 ambientes con jardín y parrilla.",
"operation_type": "1",
"property_type": "3",
"sub_property_type": "12",
"location": {
"barrios": [1234],
"cp": "1425",
"lat": "-34.5885",
"lng": "-58.4306",
"street": "Av. Santa Fe",
"number": "3253"
},
"surface": { "totalSurface": 180, "coveredSurface": 140 },
"price": { "currency": 1, "total": 250000 },
"characteristics": { "ambience": 4, "bedrooms": 3, "bathrooms": 2 },
"images": [
{ "url": "https://tu-servidor.com/fotos/1.jpg", "title": "imagen1", "originalname": "casa1", "filename": null },
{ "url": "https://tu-servidor.com/fotos/2.jpg", "title": "imagen2", "originalname": "casa2", "filename": null },
{ "url": "https://tu-servidor.com/fotos/3.jpg", "title": "imagen3", "originalname": "casa3", "filename": null }
]
}
}
On success it returns a 200:
{
"success": true,
"cabapropId": "68cae034f1a2b3c4d5e6f7a8",
"mode": "created"
}
| Field | Type | Description |
|---|
success | boolean | true if the listing was published (or updated) successfully. |
cabapropId | string | Id of the listing on Cabaprop. Store it for future calls to PUT /cabaprop/property and DELETE /cabaprop/property/unpublish. |
mode | string | created if it is a new listing, updated if a live listing already existed and was updated (idempotency). |
| Status | Body | Cause |
|---|
| 400 | {"error":"Invalid JSON body"} | The body is not valid JSON. |
| 403 | {"error":"custId does not match the authenticated customer"} | The custId in the body does not match the authenticated account. |
| 400 | {"error":"propertyId, custId and property are required"} | One of the required fields is missing. |
| 400 | {"error":"La propiedad debe tener al menos 3 imagenes para publicarse en Cabaprop"} | property.images has fewer than 3 elements. |
| 400 | {"error":"Cabaprop account is not connected (missing token)"} | The Cabaprop token is missing. |
| 400 | {"error":"Missing realStateId/branchOfficeId — reconnect the Cabaprop account (GET /cabaprop/get-branches) and retry"} | realStateId/branchOfficeId are missing. |
| 400 | {"error":"La zona/tipo/operacion no tiene mapping en Cabaprop","missing":["..."]} | operation_type, property_type or location.barrios came in empty. |
| 502 | {"error":"Could not verify existing Cabaprop publication state — retry"} | Internal error while checking whether a listing already existed. Retry. |
| 401 | {"error":"Cabaprop authentication failed — reconnect the account"} | The Cabaprop token is invalid or expired. |
| 200 | {"success":false,"errorCode":"...","detail":"..."} | Cabaprop rejected the publication because of invalid data (see Property Object notes). detail carries the portal's literal message. |
| 500 | {"error":"Error publishing Cabaprop property","detail":"..."} | Unexpected error. |