PROD

POST /cabaprop/connect

This service connects a Mapaprop account with Cabaprop. Using the customer's apiKey, it authenticates against the Cabaprop integration API, stores the resulting token for future publications and notifies the customer (internal Slack + email) that their account has been connected.

Resource information
AuthenticationRequired (service token)
HTTP MethodPOST
ResponseJSON
Version1

Resource URL

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

Headers

HeaderRequiredDescription
authorizationyesCabaprop static service token. If it does not match, the request is rejected.
Content-Typeyesapplication/json

Parameters (body request)

The body is a JSON with the following fields:

KeyTypeRequiredDescription
custIdnumberyesCustomer identifier in Mapaprop.
apiKeystringyesCustomer API key in Cabaprop. Sent as the x-api-key header to the Cabaprop API for authentication.
brandstringyesBrand/real estate agency associated with the connection. Part of the stored app name (cabaprop___{brand}).
namestringyesCustomer name. Used in Slack and email notifications.
emailstringyesCustomer email. Destination of the connection confirmation email.

Sample code

POST /property-api/cabaprop/connect
Host: api-cabaprop.mapaprop.com
Content-Type: application/json
authorization: {access_token}
{
  "custId": 1,
  "apiKey": "tu-api-key-de-cabaprop",
  "brand": "Mapaprop",
  "name": "Mapaprop INC",
  "email": "info@mapaprop.com"
}

Response

On success, returns a 200 with the response body from the Cabaprop authentication API, which includes the integration token.

{
  "token": "{access_token}"
}

As a side effect of a successful connection, the service:

  • Stores the token and connection data associated with the custId and brand.
  • Sends an internal Slack notification (support channel).
  • Sends a confirmation email to the specified email.

Errors

StatusBodyCause
500{"message":"Unauthorized"}The authorization header does not match the Cabaprop service token.
500"Error Post cabaprop intration auth : {error}"Authentication against the Cabaprop integration API failed (e.g., invalid apiKey).
500"Error DynamoDB put Item : {error}"The token was obtained but the connection could not be stored.
500"Error to send notification to Slack/Email : {error}"The connection was stored but sending the Slack notification or email failed.