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/feed-v1/submit-question
Parameters
| Key | Type | Required | Description |
|---|---|---|---|
| agencyId | string | yes | The agency ID exactly as provided in the agency.id field by GET /api/action/feed-v1/get-properties or GET /api/action/feed-v1/get-delta. Treat it as an opaque string, do not parse it (see Get Started). |
| 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 | Test mode. The question is still recorded, but it is routed to a Mapaprop test account instead of the listing's agency: it never reaches a real agency. This is the recommended way to verify the integration end to end before publishing the listings. It does not skip the validations: the agencyId and the listing still have to be valid. |
| 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 |
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 {access_token}
agencyId=ECID00222201EN&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&email=john.doe%40example.com&phone=6667117&message=Want%20to%20know%20more%20about%20this
Either email or phone is enough, but it is better to send both keys — even if one is empty — as in the example above. That is the form that does not depend on how your site's form serializes the request.
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 |
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.
{
"success": false,
"error": "INVALID_EMAIL"
}