PROD

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
AuthenticationRequired (Mapaprop token + Cabaprop token)
HTTP MethodPOST
ResponseJSON
Version1

Resource URL

https://property-api.mapaprop.com/cabaprop/publish

Headers

HeaderRequiredDescription
AuthorizationyesBearer <token> — Mapaprop token
X-Cabaprop-TokenyesCabaprop token obtained in POST /cabaprop/connect
Content-Typeyesapplication/json

Parameters (body request)

KeyTypeRequiredDescription
propertyIdnumber/stringyesId of the property in your application. It is used to link your property with the Cabaprop listing.
custIdnumber/stringyesId of the customer/account in your application. It must match the authenticated custId (see errors).
propertyobjectyesThe Property Object, with a minimum of 3 images.
realStateIdstring/numberyesId of the real estate agency on Cabaprop, obtained in GET /cabaprop/get-branches (.id).
branchOfficeIdstring/numberyesId of the branch on Cabaprop, obtained in GET /cabaprop/get-branches (.branchOffices[].id).

Sample code

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 }
    ]
  }
}

Response

On success it returns a 200:

{
  "success": true,
  "cabapropId": "68cae034f1a2b3c4d5e6f7a8",
  "mode": "created"
}
FieldTypeDescription
successbooleantrue if the listing was published (or updated) successfully.
cabapropIdstringId of the listing on Cabaprop. Store it for future calls to PUT /cabaprop/property and DELETE /cabaprop/property/unpublish.
modestringcreated if it is a new listing, updated if a live listing already existed and was updated (idempotency).

Errors

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