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 |
<https://mapaprop.app/api/action/feed-v1/submit-question>
Key | Type | Required | Description |
---|---|---|---|
agencyId | string | yes | The agency ID provided by GET /api/action/feed-v1/get-properties or GET /api/action/feed-v1/get-delta webservices |
propertyId | string | yes | The 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' |
portalName | string | yes | The name of the portal submiting the question. ie. Trovit |
userAgent | string | yes | The 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. |
domain | string | yes | The domain name of the portal submitting the question |
url | string | yes | The URL of the ad in your site. Might be the same as the referer. |
urlAlt | string | no | An alternative URL useful for the agency. Like a stats URL. |
test | boolean | no | If this is set to true, the validation will be performed but the question won't be submitted. |
name | string | yes | Name of the user submitting the question. |
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 |
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
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 |
<aside> ⚠️ 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.
</aside>
{
"success": false,
"error": "INVALID_EMAIL"
}