PRODUCTION

This webservice is used to submit a query to the customer. Basic data is requested and validated and also spam check is performed.

Resource information
AuthenticationRequired
HTTP MethodPOST
ResponseJSON
Version1

Resource URL

https://mapaprop.app/api/action/portal-v2/messages

Parameters

KeyTypeRequiredDescription
propertyHashstringyesThe property hash ID. Get the IDs in GET /api/action/express-v1/properties or GET /api/action/express-v1/properties/{propertyHash} services
userAgentstringyesThe real browser userAgent string. Required for spam check
refererstringyesThe referer string requesting the question submition. Required for spam check.
ipstringyesThe IP of the user submitting the question. Required for spam check.
urlstringyesThe URL of the ad in your site. Might be the same as the referer.
namestringyesName of the user submitting the question.
emailstringorEmail of the user submitting the question. Email or phone has to be submitted.
phonestringorPhone of the user submitting the question. Email or phone has to be submitted.
messagestringyesText submitted for the user regarding the question or an auto generated text readable for the agency

Sample code

POST /api/action/portal-v2/messages HTTP/1.1
Host: mapaprop.app
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Authorization: Bearer ya29.1.AADtN_UxybTdjLw9jX6lg_SXIgc3wTtek4q2WvfETzSrz7Q6loEYoJEWd1x4qvlpGw

propertyHash=32ojflsdfjasld-avC&
userAgent=Mozilla%2F5.0%20%28X11%3B%20Linux%20x86_64%29%20AppleWebKit%2F537.36%20%28KHTML%2C%20like%20Gecko%29%20Chrome%2F32.0.1700.77%20Safari%2F537.36
&referer=http%3A%2F%2Ftrovit.com%2Fad%3Fid%3D111
&ip=85.33.65.69&domain=someinmo.com&url=http%3A%2F%2Fsomeinmo.com%2Fad%3Fid%3D111
&name=John%20Doe&phone=6667117&message=Want%20to%20know%20more%20about%20this

Response

The JSON response will tell you if the question was submitted, if not, will tell you what happened showing that is in the queue for moderation because looks like spam or has invalid fields.

ObjectFieldTypeRequiredDescription
ResponsesuccessbooleanyesA boolean showing if the submission was or not successful
errorstringnoA text indicating the type of error if success == false

Sample code

{
    "success": false,
    "error": "INVALID_EMAIL"
}