DELETE /cabaprop/property/unpublish
Unpublishes (soft delete) a listing previously published with POST /cabaprop/publish.
It is idempotent: if the property was never published, or was already unpublished, or Cabaprop replies that the listing no longer exists, this endpoint still returns success.
| Resource information | |
|---|---|
| Authentication | Required (Mapaprop token + Cabaprop token) |
| HTTP Method | DELETE |
| Response | JSON |
| Version | 1 |
Resource URL
https://property-api.mapaprop.com/cabaprop/property/unpublish
Headers
| 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 |
Parameters (body request)
| Key | Type | Required | Description |
|---|---|---|---|
propertyId | number/string | yes | Id of the published property. |
custId | number/string | yes | Id of the customer/account; it must match the authenticated account. |
Sample code
DELETE /cabaprop/property/unpublish
Host: property-api.mapaprop.com
Content-Type: application/json
Authorization: Bearer {access_token}
X-Cabaprop-Token: {cabaprop_token}
{
"propertyId": 188017,
"custId": 1
}
Response
{
"success": true
}
Errors
| 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 and custId are required"} | One of the required fields is missing. |
| 400 | {"error":"Cabaprop account is not connected (missing token)"} | The Cabaprop token is missing (only if the property has a live listing to unpublish). |
| 401 | {"error":"Cabaprop authentication failed — reconnect the account"} | The Cabaprop token is invalid or expired. |
| 200 | {"success":false,"errorCode":"...","detail":"..."} | Cabaprop rejected the unpublication because of invalid data. detail carries the portal's literal message. |
| 500 | {"error":"Error unpublishing Cabaprop property","detail":"..."} | Unexpected error. |