GET /property-catalog-v1/zones
Returns every publishable zone in a country, flat and paginated. This is the batch mapping endpoint: you call it a handful of times, store the result and build your equivalence table.
Before using it, read Zones: that is where you will find what a publishable zone is and what format the code has.
| Resource information | |
|---|---|
| Authentication | Required (API Token, Bearer) |
| Scope | property-api-catalog |
| HTTP Method | GET |
| Response | JSON |
| Version | 1 |
Resource URL
https://mapaprop.app/api/action/property-catalog-v1/zones
Parameters
| Key | Type | Required | Description |
|---|---|---|---|
| country | string | yes | The country's 2-letter ISO code (AR, ES, MX…). You get them from /countries |
| from | int | no | Which row to start at. Defaults to 0 |
| size | int | no | How many rows. Defaults to 1000, maximum 5000 |
Sample code
GET /api/action/property-catalog-v1/zones?country=AR&from=0&size=1000 HTTP/1.1
Host: mapaprop.app
Authorization: Bearer {access_token}
Response
{
"total": 7526,
"from": 0,
"size": 1000,
"zones": [
{
"code": "1-2-201-0",
"zone0": 1, "zone1": 2, "zone2": 201, "zone3": 0,
"level": 2,
"description": "La Matanza",
"zone1Description": "Buenos Aires",
"zone2Description": "La Matanza",
"path": "Buenos Aires > La Matanza"
}
]
}
| Field | Type | Description |
|---|---|---|
| total | int | How many zones the country has in total, not on this page. This is how you know when you are done |
| from | int | The from you requested |
| size | int | The size you requested |
| zones | array | The rows on this page |
And inside each row:
| Field | Type | Description |
|---|---|---|
| code | string | The value that goes in the property object. Always four segments |
| zone0 · zone1 · zone2 · zone3 | int | The same four numbers, separately, so you do not have to split the code |
| level | int | 2 = district/municipality · 3 = locality/neighborhood |
| description | string | The name of this zone |
| zone1Description | string | The name of its province/state |
| zone2Description | string | The name of its district/municipality |
| path | string | The assembled ancestry, Province > District > Locality. For text matching |
Paginating
The order is stable across calls, so you can walk it page by page without worrying about a row repeating or going missing. The pattern is:
from=0 size=1000
from=1000 size=1000
from=2000 size=1000
…until from >= total
Argentina takes 8 calls; Spain, 13. A from beyond the end returns 200 with an empty zones,
not an error.
Caching and ETag
Every response carries an ETag. If you send it back in If-None-Match on the next call and the
catalog has not changed, we answer 304 Not Modified with no body:
GET /api/action/property-catalog-v1/zones?country=AR&size=1000 HTTP/1.1
Authorization: Bearer {access_token}
If-None-Match: "1-0-1000-46f144e43a1443ed"
HTTP/1.1 304 Not Modified
ETag: "1-0-1000-46f144e43a1443ed"
Store the ETag of each page along with its data: the ETag identifies that page, not the whole
country. If you send page 1's ETag while requesting page 2, you will get a 200 with the data —
correct, but it saves you nothing.
Refreshing the catalog is cheap. Instead of deciding how often to re-download it, request it with the ETag you stored: if nothing changed, you get 304s and that is it. If something changed, the new version arrives.
Errors
| HTTP | error | What happened |
|---|---|---|
| 400 | REQUIRED_INPUT | country is missing |
| 400 | INVALID_INPUT | The ISO code matches no country, or from is negative, or size is 0 |
| 400 | INPUT_TOO_LONG | You requested more than 5000 per call |
| 403 | INVALID_PERMISSION | Your token lacks the property-api-catalog scope |
| 403 | CREDENTIALS_DOES_NOT_MATCH | You sent no token, or it expired |
| 404 | — | You used a different method: this endpoint is GET |
See also
- Zones — the concept and the code format
- The cascade — to resolve a branch without downloading everything