tag: PROD

PROD

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/feed-v1/submit-question

Parameters

KeyTypeRequiredDescription
agencyIdstringyesThe agency ID provided by GET /api/action/feed-v1/get-properties or GET /api/action/feed-v1/get-delta webservices
propertyIdstringyesThe property ID generated by the system provided by GET /api/action/feed-v1/get-properties  or GET /api/action/feed-v1/get-delta  webservices. Not propertyCode but the field called 'id'
portalNamestringyesThe name of the portal submiting the question. ie. Trovit
userAgentstringyesThe 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.
domainstringyesThe domain name of the portal submitting the question
urlstringyesThe URL of the ad in your site. Might be the same as the referer.
urlAltstringnoAn alternative URL useful for the agency. Like a stats URL.
testbooleannoIf this is set to true, the validation will be performed but the question won't be submitted.
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/feed-v1/submit-question HTTP/1.1
Host: mapaprop.app
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Authorization: Bearer ya29.1.AADtN_UxybTdjLw9jX6lg_SXIgc3wTtek4q2WvfETzSrz7Q6loEYoJEWd1x4qvlpGw

agencyId=ECID022222201EN&propertyId=16928-avC&portalName=Trovit&
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=trovit.com&url=http%3A%2F%2Ftrovit.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

ACTION REQUIRED!

If you get a error=PROPERTY_NOT_FOUND you should remove the property from your inventory inmediately. That means the customer stop publishing that property or deleted it from our inventory.

A lot of customers always complains properties still being published in external portals.

Sample code

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

Other Methods