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
Authentication Required
HTTP Method POST
Response JSON
Version 1

Resource URL

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

Parameters

Key Type Required Description
propertyHash string yes The property hash ID. Get the IDs in ‣ or ‣ services
userAgent string yes The real browser userAgent string. Required for spam check
referer string yes The referer string requesting the question submition. Required for spam check.
ip string yes The IP of the user submitting the question. Required for spam check.
url string yes The URL of the ad in your site. Might be the same as the referer.
name string yes Name of the user submitting the question.
email string or Email of the user submitting the question. Email or phone has to be submitted.
phone string or Phone of the user submitting the question. Email or phone has to be submitted.
message string yes Text 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.

Object Field Type Required Description
Response success boolean yes A boolean showing if the submission was or not successful
error string no A text indicating the type of error if success == false

Sample code

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