Enquiries for the whole account
GET /property-v1/leads?portal={portal}
Returns the enquiries for every listing of that agency on that portal, in a single call. Each lead
comes with its propertyCode, so you know which listing it belongs to without having to ask listing by
listing.
This is the method to use. See why in the introduction.
curl "https://property-api.mapaprop.com/property-v1/leads?portal=zonapropapi&fromDate=20260101" \
-H "Authorization: Bearer $TOKEN" \
-H "x-client-ref: cliente-42"
The parameters
portal | required | zonapropapi |
fromDate | from which date, format YYYYMMDD | if you omit it, the last 7 days |
size | how many leads you want at most | 100, which is the portal's ceiling |
The 7-day default is the one for a call with no parameters, so that a request without a date does not try to pull the entire history. It is not a frequency recommendation: you choose the frequency.
The response
{
"portal": "zonaprop",
"from": "20260101",
"leads": [
{
"id": "322337250",
"propertyCode": "2605257___mapaprop",
"name": "Lucía",
"email": "lucia@ejemplo.com",
"phone": "1156781234",
"message": "Hola, quería coordinar una visita",
"date": 1790878040000,
"portalMessageId": null,
"portalAdId": 56801168,
"portalContactId": 49474924,
"portalActionId": 10
}
],
"total": 12,
"quota": { "remaining": 1346, "limit": 1500 }
}
The lead object, field by field, is in the introduction.
| Field | What it is |
|---|---|
from | the window actually used (yours, or the default) |
leads | the leads. It may come back empty, which means there were no enquiries in that window |
total | how many the portal says there are in that window. It can be greater than leads.length — see below |
quota | the balance the portal reported on this call |
The per-request ceiling is set by the portal
On Zonaprop it is 100 per request, returned from newest to oldest. Each portal sets its own: as we add others, this section will gain their cases.
If there are more than 100 in your window, we give you the 100 newest and the response tells you so:
{
"portal": "zonaprop",
"from": "20240101",
"leads": [ "… 100 leads …" ],
"total": 386,
"truncated": true,
"truncatedReason": "parcial_tope_del_portal",
"detail": "Te devolvemos los más nuevos. Para ver los anteriores, mové `fromDate`: el portal no permite pedir la página siguiente de este listado.",
"warnings": [
"El portal informa 386 mensajes en esa ventana y devuelve como máximo 100 por pedido, los más nuevos primero. Para ver los anteriores, mové `fromDate`."
],
"quota": { "remaining": 1348, "limit": 1500 }
}
There is no "next page" in this listing: the portal does not offer one. To see the ones before the 100
you received, move fromDate further back and make another request.
What this means in practice: if you request often — once a day, say — you will never reach 100 and you will never lose a lead. The ceiling only shows up when you ask for a very long window, for example on your first sync.
toDate: the portal ignores it in this listing
If you send it, we do not apply it and we tell you so in warnings:
"warnings": [
"Zonaprop ignora `toDate` cuando se piden los mensajes de toda la cuenta: el filtro no se aplicó. Acotá con `fromDate`."
]
We would rather tell you than pass it on to the portal and have it silently discarded: if we did, you
would believe your window had been honoured and you would receive leads later than your toDate.
To narrow the upper bound, filter on your side using each lead's date field. In
the single-property method, toDate does work.
The errors
| When | What to do | |
|---|---|---|
400 portal_requerido | ?portal= is missing | send it |
| 403 | you are missing the {portal}:leads scope | ask us to grant it |
409 portal_not_connected | that account is not connected to that portal | connect it |
409 portal_account_unlinked | it was unlinked on the portal's side | it has to be connected again |
429 portal_quota_exhausted | the agency used up its monthly allowance | wait for the following month. The allowance is shared with publishing — see Zonaprop's allowance |
501 leads_no_soportado | that portal does not offer this service yet | — |
502 portal_rejected | the portal did not answer or rejected the request | retrying is safe: querying changes nothing |
A deactivated account does not block this request: the leads that already came in belong to your client, and they can still be retrieved.