{"openapi":"3.1.0","info":{"title":"Mapbase Engine API","version":"0.0.0","description":"The **Mapbase Engine** is the public HTTP API for Mapbase products.\n\nThis reference is generated from the same Zod/OpenAPI contracts that the\nengine uses at runtime.\n\n## Base URL & versioning\n\nAll stable API routes live under `/v1`. Utility routes (`/health`, `/redis-health`, `/layers`, `/openapi.json`, `/reference`) sit outside the versioned contract and do not require authentication.\n\n`/v1` is a stable contract: we add fields, routes, and optional parameters without bumping the version, but we never remove a field or make a breaking change to an existing one within `/v1`. A breaking change ships under a new prefix (`/v2`). Clients should ignore unknown response fields so additive changes are non-breaking for them.\n\nSend an `x-sdk-version` header (the official SDK sets it automatically) so we can attribute traffic and warn about outdated clients. When a route is slated for removal it is first marked `deprecated` in this spec and serves a `Deprecation` header (and, once a removal date is set, a `Sunset` header) for at least one deprecation window before it is retired.\n\n## Layers\n\nRegistry data is grouped into three **layers**: `locations`, `postcodes`, and `zones`. The `layer` field appears on autocomplete hits, boundary routes, and the optional `layers` query parameter on several endpoints. **GET /layers** lists each layer with record counts and covered countries (sourced from `search_registry`).\n\nTwo Postgres materialized views back different read paths. **`search_registry`** holds searchable rows for locations, postcodes, and zones, with trigram-friendly text fields and ranking metadata; **GET /v1/autocomplete** and per-layer autocomplete routes query it. **`point_layers`** holds polygon-backed rows only (`locations`, `zones`) with full geometry for point-in-polygon tests; **GET /v1/points/resolve** queries it. Postcodes live in `search_registry` but not `point_layers` (they have no own boundary polygon), so resolve accepts `layers=locations|zones` only â use the postcode routes for postal lookups. By default, resolve uses `layers=locations,zones`. With `include=postcodes`, resolve embeds `anchor.postcode` (string or `null`) from the input coordinates plus the linked-code list on `anchor.postcodes`.\n\n## Custom zones\n\nPublished custom zones are read-only at **GET /v1/zones**. Customer writes use **POST /v1/zone-submissions** (draft â submit â admin review); approved submissions are published to the zones registry. The same workflow is available in the dashboard at [dashboard.mapbase.dev](https://dashboard.mapbase.dev).\n\n## Canonical registry IDs\n\nRegistry rows expose a canonical **`id`** prefixed by layer: `mb_loc_`, `mb_zon_`, `mb_lau_`, `mb_cod_`. Each is deterministic URL-safe base64url of the upstream key (postcodes encode Eurostat `pc_cntr`). Responses always return `mb_*` as `id`; upstream ingestion keys are not included in JSON bodies. Route path and query parameters may still accept legacy upstream keys where noted per route. LAU rows expose `gisco_id`; postcodes expose `code` for display. Location path and hierarchy filters use canonical `mb_loc_*` ids (including `parent_id` on location nodes).\n\n## Authentication\n\nEvery `/v1` route requires an API key, sent in the `x-api-key` header. Requests without a valid key receive `401` (`auth_missing_key` / `auth_invalid_key`). The utility routes (`/health`, `/redis-health`, `/layers`, `/openapi.json`, `/reference`) are unauthenticated. For local testing in the Scalar reference UI, set `REFERENCE_API_KEY` in your `.env` to pre-fill the key on every `/v1` endpoint. Provider passthrough routes also accept `x-google-api-key` and `x-geoapify-api-key`; pre-fill those in Scalar with `REFERENCE_GOOGLE_API_KEY` and `REFERENCE_GEOAPIFY_API_KEY` (engine `/reference`) or `REFERENCE_GOOGLE_API_KEY` / `GEOAPIFY_API_KEY` (dashboard `/api`).\n\n## Rate limits & credits\n\nEach API key is rate limited per second (burst) and per billing period (quota). Successful `/v1` responses include `X-Mapbase-Credits` with the credits charged for that request. Quota headers use the IETF-draft `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` and `RateLimit-Policy` fields; `429` responses add `Retry-After`. The base path cost is documented on each operation as the `x-mapbase-credits` OpenAPI extension â use the [playgrounds](https://mapbase.dev/playground) to see request-aware costs live. When you exceed your included volume, requests are blocked until you upgrade or the billing period resets.\n\n## Errors\n\nEvery error response follows:\n\n```json\n{\n \"error\": {\n \"code\": \"not_found\",\n \"message\": \"Human-readable explanation.\",\n \"request_id\": \"...\"\n }\n}\n```"},"servers":[{"url":"https://api.mapbase.dev","description":"Production"}],"tags":[{"name":"health","description":"Unversioned liveness probe at GET /health and Redis connectivity probe at GET /redis-health. No API key required."},{"name":"layers","description":"Unversioned registry layer counts at GET /layers. No API key required."},{"name":"locations","description":"Administrative and named locations with hierarchy, boundaries, and autocomplete. List/detail `id` is canonical `mb_loc_*`; path params also accept ids."},{"name":"points","description":"Point-in-polygon resolve against registry matviews. Hits return canonical `mb_*` ids."},{"name":"autocomplete","description":"Unified registry autocomplete across locations, postcodes, and zones. Each hit `id` is canonical `mb_*`."},{"name":"postcodes","description":"Postal code lookups backed by Eurostat postal_codes. `id` is `mb_cod_*`; `code` is the display value."},{"name":"zones","description":"Custom overlapping areas in the published registry (read-only). `id` is `mb_zon_*`; path params also accept zone ids. To create or edit zones, use zone-submissions â drafts are reviewed before publish."},{"name":"zone-submissions","description":"Customer zone writes: create a draft, edit geometry/metadata, submit for admin review. Free (bypasses payment gate). Approved submissions are published to `/v1/zones`; published zones cannot be deleted via this API."},{"name":"boundaries","description":"Bulk boundary queries at GET /v1/boundaries (polylines by default; GeoJSON capped). For one entity use GET /v1/locations/{identifier}/boundary, /v1/zones/{identifier}/boundary, or /v1/lau/{identifier}/boundary."},{"name":"seo","description":"SEO helpers built on point resolve."},{"name":"providers","description":"Third-party adapters (Google address, Geoapify boundaries). Send the provider API key in `x-google-api-key` or `x-geoapify-api-key`; Mapbase never stores it."}],"components":{"schemas":{"CountryCode":{"type":"string","minLength":2,"maxLength":2,"description":"ISO 3166-1 alpha-2 country code. PT, ES, IT, UK, or FR on location and address surfaces.","example":"PT"},"FilterKinds":{"type":"string","description":"Comma-separated list of location kinds to include. Defaults to all kinds.","example":"town,district"},"FilterLevels":{"type":"string","description":"Comma-separated admin depths to include (1=country ⦠7=block).","example":"4,5"},"FilterParentId":{"type":"string","description":"Filter by parent location id. Pass the literal string `null` to fetch root rows.","example":"pt"},"FilterBbox":{"type":"string","description":"Bounding box as `minLng,minLat,maxLng,maxLat`. Filters via PostGIS ST_Intersects.","example":"-9.2,38.7,-9.0,38.8"},"FilterNear":{"type":"string","description":"Optional `lng,lat` bias or centre point.","example":"-9.1393,38.7223"},"FilterRadiusM":{"type":"integer","minimum":1,"maximum":50000,"description":"Radius in metres around `near`. Default 5000 when `near` is set without an explicit radius.","example":5000},"FilterLang":{"type":"string","enum":["native","en","fr","de"],"description":"Selects between native name and translated columns (`name_engl`, `name_fren`, `name_germ`).","example":"en"},"FilterLimit":{"type":"integer","minimum":1,"maximum":200,"description":"Max items per page.","example":50},"FilterBoundaryLimit":{"type":"integer","minimum":1,"maximum":10000,"description":"Max items per page for bulk boundary scans (`format=polyline` default).","example":50},"FilterOffset":{"type":"integer","minimum":0,"description":"Offset pagination. Mutually exclusive with `cursor`.","example":0},"FilterCursor":{"type":"string","description":"Opaque pagination cursor returned by a previous response."},"FilterSrid":{"type":"integer","enum":[4326,3857,25829,32629],"description":"Output coordinate reference (EPSG). Default 4326 (WGS84).","example":4326},"CountryQueryParam":{"type":"object","properties":{"country":{"$ref":"#/components/schemas/CountryCode"}}},"KindsQueryParam":{"type":"object","properties":{"kinds":{"$ref":"#/components/schemas/FilterKinds"}}},"LevelsQueryParam":{"type":"object","properties":{"levels":{"$ref":"#/components/schemas/FilterLevels"}}},"ParentQueryParam":{"type":"object","properties":{"parent_id":{"$ref":"#/components/schemas/FilterParentId"}}},"BboxQueryParam":{"type":"object","properties":{"bbox":{"$ref":"#/components/schemas/FilterBbox"}}},"NearQueryParam":{"type":"object","properties":{"near":{"$ref":"#/components/schemas/FilterNear"}}},"RadiusQueryParam":{"type":"object","properties":{"radius_m":{"$ref":"#/components/schemas/FilterRadiusM"}}},"LangQueryParam":{"type":"object","properties":{"lang":{"$ref":"#/components/schemas/FilterLang"}}},"PaginationQueryParam":{"type":"object","properties":{"limit":{"$ref":"#/components/schemas/FilterLimit"},"offset":{"$ref":"#/components/schemas/FilterOffset"},"cursor":{"$ref":"#/components/schemas/FilterCursor"}}},"BoundaryPaginationQueryParam":{"type":"object","properties":{"limit":{"$ref":"#/components/schemas/FilterBoundaryLimit"},"cursor":{"$ref":"#/components/schemas/FilterCursor"}}},"SridQueryParam":{"type":"object","properties":{"srid":{"$ref":"#/components/schemas/FilterSrid"}}},"HealthResponse":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"uptime_ms":{"type":"integer"},"version":{"type":"string"},"environment":{"type":"string"}},"required":["status","uptime_ms","version","environment"]},"RedisHealthResponse":{"oneOf":[{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"redis":{"type":"object","properties":{"reachable":{"type":"boolean","enum":[true]},"host":{"type":"string"},"latency_ms":{"type":"integer","minimum":0}},"required":["reachable","host","latency_ms"]},"ratelimit_enabled":{"type":"boolean"},"ip_rules_loaded":{"type":"boolean"}},"required":["status","redis","ratelimit_enabled","ip_rules_loaded"]},{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"redis":{"type":"object","properties":{"reachable":{"type":"boolean","enum":[false]},"host":{"type":"string"},"latency_ms":{"type":"null"},"error":{"type":"string"}},"required":["reachable","host","latency_ms","error"]},"ratelimit_enabled":{"type":"boolean"},"ip_rules_loaded":{"type":"null"}},"required":["status","redis","ratelimit_enabled","ip_rules_loaded"]}]},"LayersResponse":{"type":"object","properties":{"layers":{"type":"array","items":{"type":"object","properties":{"layer":{"type":"string","enum":["locations","postcodes","zones"]},"label":{"type":"string"},"count":{"type":"integer","minimum":0},"countries":{"type":"array","items":{"type":"string","minLength":2,"maxLength":2}}},"required":["layer","label","count"]}},"countries":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string","minLength":2,"maxLength":2},"count":{"type":"integer","minimum":0}},"required":["country","count"]}},"byLayerCountry":{"type":"array","items":{"type":"object","properties":{"layer":{"type":"string","enum":["locations","postcodes","zones"]},"country":{"type":"string","minLength":2,"maxLength":2},"count":{"type":"integer","minimum":0}},"required":["layer","country","count"]}},"breakdown":{"type":"array","items":{"type":"object","properties":{"layer":{"type":"string","enum":["locations","postcodes","zones"]},"country":{"type":"string","minLength":2,"maxLength":2},"kind":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"count":{"type":"integer","minimum":0}},"required":["layer","country","kind","count"]}}},"required":["layers"]},"LocationListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]}},"meta":{"type":"object","properties":{"limit":{"type":"integer"},"next_cursor":{"type":["string","null"]}},"required":["limit","next_cursor"]}},"required":["data","meta"]},"ApiErrorEnvelope":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"scope":{"type":"string"},"detail":{"type":"string"},"request_id":{"type":"string"}},"required":["code","message","request_id"]}},"required":["error"]},"LocationRelationsResponse":{"type":"object","properties":{"location":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]},"parent":{"type":["object","null"],"properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]},"children":{"type":["object","null"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]}},"meta":{"type":"object","properties":{"limit":{"type":"integer"},"next_cursor":{"type":["string","null"]}},"required":["limit","next_cursor"]}},"required":["data","meta"]},"siblings":{"type":["object","null"],"properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]}},"meta":{"type":"object","properties":{"limit":{"type":"integer"},"next_cursor":{"type":["string","null"]}},"required":["limit","next_cursor"]}},"required":["data","meta"]},"ancestors":{"type":["array","null"],"items":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]}}},"required":["location","parent","children","siblings","ancestors"]},"BoundaryResponse":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"geometry":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["Point"]},"coordinates":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","enum":["MultiPolygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}}}},"required":["type","coordinates"]}]},"bbox":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"srid":{"type":"integer"}},"required":["id","layer","geometry","bbox","srid"]},"ZoneListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"uri":{"type":"string"},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"status":{"type":"string","enum":["active","inactive"]},"location_id":{"type":["string","null"]},"location":{"type":["object","null"],"properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","name","uri","kind","country","status","location_id","location","has_boundary"]}},"meta":{"type":"object","properties":{"limit":{"type":"integer"},"next_cursor":{"type":["string","null"]}},"required":["limit","next_cursor"]}},"required":["data","meta"]},"LocationDetail":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"},"parent":{"type":["object","null"],"properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]},"hierarchy":{"type":"object","additionalProperties":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]}},"postcodes":{"type":"array","items":{"type":"string"}}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"],"example":{"id":"mb_loc_MC1FVS1QVC0xMS0wNg","layer":"locations","kind":"municipality","country":"PT","name":"Lisboa","uri":"lisboa","parent_id":"mb_loc_MC1FVS1QVC0xMQ","level":4,"is_final":false,"has_boundary":true,"parent":{"id":"mb_loc_MC1FVS1QVC0xMQ","layer":"locations","kind":"district","country":"PT","name":"Lisboa distrito","uri":"lisboa-distrito","parent_id":"mb_loc_MC1FVS1QVC1DT05U","level":3,"is_final":false,"has_boundary":true},"hierarchy":{"1":{"id":"mb_loc_MC1FVS1QVA","layer":"locations","kind":"country","country":"PT","name":"Portugal","uri":"pt","parent_id":null,"level":1,"is_final":false,"has_boundary":true},"2":{"id":"mb_loc_MC1FVS1QVC1DT05U","layer":"locations","kind":"continent","country":"PT","name":"Portugal (continente)","uri":"portugal-continent","parent_id":"mb_loc_MC1FVS1QVA","level":2,"is_final":false,"has_boundary":true},"3":{"id":"mb_loc_MC1FVS1QVC0xMQ","layer":"locations","kind":"district","country":"PT","name":"Lisboa distrito","uri":"lisboa-distrito","parent_id":"mb_loc_MC1FVS1QVC1DT05U","level":3,"is_final":false,"has_boundary":true},"4":{"id":"mb_loc_MC1FVS1QVC0xMS0wNg","layer":"locations","kind":"municipality","country":"PT","name":"Lisboa","uri":"lisboa","parent_id":"mb_loc_MC1FVS1QVC0xMQ","level":4,"is_final":false,"has_boundary":true}}}},"PointResolveResponse":{"type":"object","properties":{"point":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]},"country":{"type":["string","null"],"minLength":2,"maxLength":2},"anchor":{"type":["object","null"],"properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"postcodes":{"type":"array","items":{"type":"string"}},"postcode":{"type":["string","null"]}},"required":["id","layer","kind","country","name","uri","parent_id","level"]},"hierarchy":{"type":"object","additionalProperties":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}}},"required":["id","layer","kind","country","name","uri","parent_id","level"]}},"contains":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}}},"required":["id","layer","kind","country","name","uri","parent_id","level"]}}},"required":["point","country","anchor","hierarchy","contains"]},"AutocompleteResponse":{"type":"object","properties":{"query":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"score":{"type":"number"}},"required":["id","layer","kind","country","name","label","uri","parent_id","level","score"]}}},"required":["query","results"]},"PostcodeListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"gisco_id":{"type":["string","null"]},"lau_name":{"type":["string","null"]},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"location_id":{"type":["string","null"]},"location":{"type":["object","null"],"properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]}},"required":["id","code","country","gisco_id","lau_name","location_id","location"]}},"meta":{"type":"object","properties":{"limit":{"type":"integer"},"next_cursor":{"type":["string","null"]}},"required":["limit","next_cursor"]}},"required":["data","meta"]},"Postcode":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"gisco_id":{"type":["string","null"]},"lau_name":{"type":["string","null"]},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"location_id":{"type":["string","null"]},"location":{"type":["object","null"],"properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]}},"required":["id","code","country","gisco_id","lau_name","location_id","location"],"example":{"id":"mb_cod_UFRfMTEwMC0wNjI","code":"1100-062","country":"PT","gisco_id":"PT_110665","lau_name":"Santa Maria Maior","centroid":[-9.138168592,38.710022004],"location_id":"mb_loc_MC1FVS1QVC0xMS0wNi0wNjUtNjUtMDI","location":{"id":"mb_loc_MC1FVS1QVC0xMS0wNi0wNjUtNjUtMDI","layer":"locations","kind":"neighborhood","country":"PT","name":"Baixa, Lisboa","uri":"santa-maria-maior/baixa","parent_id":"0-EU-PT-11-06-065-65","level":6,"is_final":true,"centroid":[-9.136837163,38.708410674],"bbox":[-9.141969,38.705318,-9.13082,38.713488],"has_boundary":true}}},"PostcodeDetail":{"type":"object","properties":{"id":{"type":"string"},"code":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"gisco_id":{"type":["string","null"]},"lau_name":{"type":["string","null"]},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"location_id":{"type":["string","null"]},"location":{"type":["object","null"],"properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]},"parent":{"type":["object","null"],"properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]},"hierarchy":{"type":"object","additionalProperties":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]}}},"required":["id","code","country","gisco_id","lau_name","location_id","location"],"example":{"id":"mb_cod_UFRfMTEwMC0wNjI","code":"1100-062","country":"PT","gisco_id":"PT_110665","lau_name":"Santa Maria Maior","centroid":[-9.138168592,38.710022004],"location_id":"mb_loc_MC1FVS1QVC0xMS0wNi0wNjUtNjUtMDI","location":{"id":"mb_loc_MC1FVS1QVC0xMS0wNi0wNjUtNjUtMDI","layer":"locations","kind":"neighborhood","country":"PT","name":"Baixa, Lisboa","uri":"santa-maria-maior/baixa","parent_id":"0-EU-PT-11-06-065-65","level":6,"is_final":true,"centroid":[-9.136837163,38.708410674],"bbox":[-9.141969,38.705318,-9.13082,38.713488],"has_boundary":true}}},"Zone":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"uri":{"type":"string"},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"status":{"type":"string","enum":["active","inactive"]},"location_id":{"type":["string","null"]},"location":{"type":["object","null"],"properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"name":{"type":"string"},"label":{"type":"string"},"uri":{"type":["string","null"]},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"is_final":{"type":"boolean"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"bbox":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","layer","kind","country","name","uri","parent_id","level","is_final","has_boundary"]},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"polylines":{"type":"array","items":{"type":"string"}},"has_boundary":{"type":"boolean"}},"required":["id","name","uri","kind","country","status","location_id","location","has_boundary"]},"ZoneSubmission":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"zone_id":{"type":["string","null"]},"tenant_id":{"type":"string"},"created_by":{"type":"string"},"status":{"type":"string","enum":["draft","submitted","approved","rejected"]},"name":{"type":"string"},"uri":{"type":["string","null"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"location_id":{"type":["string","null"]},"geometry":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["Point"]},"coordinates":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","enum":["MultiPolygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}}}},"required":["type","coordinates"]},{"type":"null"}]},"centroid":{"type":["object","null"],"properties":{"lng":{"type":"number"},"lat":{"type":"number"}},"required":["lng","lat"]},"polylines":{"type":"array","items":{"type":"string"}},"notes":{"type":["string","null"]},"rejection_reason":{"type":["string","null"]},"submitted_at":{"type":["string","null"],"format":"date-time"},"approved_at":{"type":["string","null"],"format":"date-time"},"rejected_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","zone_id","tenant_id","created_by","status","name","uri","kind","country","location_id","created_at","updated_at"]},"ZoneSubmissionCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"example":"Test zone"},"uri":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","example":"test-zone"},"kind":{"type":"string","minLength":1,"default":"custom_zone","example":"neighborhood"},"country":{"type":"string","minLength":2,"maxLength":2,"example":"PT"},"geometry":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["Point"]},"coordinates":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","enum":["MultiPolygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}}}},"required":["type","coordinates"]}],"example":{"type":"Polygon","coordinates":[[[-9.148168592,38.700022004000004],[-9.128168592,38.700022004000004],[-9.128168592,38.720022004],[-9.148168592,38.720022004],[-9.148168592,38.700022004000004]]]}},"notes":{"type":"string","example":"Example submission"}},"required":["name","uri","country","geometry"]},"ZoneSubmissionListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"zone_id":{"type":["string","null"]},"tenant_id":{"type":"string"},"created_by":{"type":"string"},"status":{"type":"string","enum":["draft","submitted","approved","rejected"]},"name":{"type":"string"},"uri":{"type":["string","null"]},"kind":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"location_id":{"type":["string","null"]},"geometry":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["Point"]},"coordinates":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","enum":["MultiPolygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}}}},"required":["type","coordinates"]},{"type":"null"}]},"centroid":{"type":["object","null"],"properties":{"lng":{"type":"number"},"lat":{"type":"number"}},"required":["lng","lat"]},"polylines":{"type":"array","items":{"type":"string"}},"notes":{"type":["string","null"]},"rejection_reason":{"type":["string","null"]},"submitted_at":{"type":["string","null"],"format":"date-time"},"approved_at":{"type":["string","null"],"format":"date-time"},"rejected_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"required":["id","zone_id","tenant_id","created_by","status","name","uri","kind","country","location_id","created_at","updated_at"]}},"meta":{"type":"object","properties":{"limit":{"type":"number"},"offset":{"type":"number"}},"required":["limit","offset"]}},"required":["data","meta"]},"ZoneSubmissionUpdate":{"type":"object","properties":{"name":{"type":"string","minLength":1,"example":"Renamed submission"},"uri":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"kind":{"type":"string","minLength":1,"default":"custom_zone"},"country":{"type":"string","minLength":2,"maxLength":2},"geometry":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["Point"]},"coordinates":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","enum":["MultiPolygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}}}},"required":["type","coordinates"]}]},"notes":{"type":"string","example":"Updated notes"}}},"ZoneSubmissionDeleteResponse":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"]},"BoundaryListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","zones"]},"name":{"type":"string"},"kind":{"type":"string"},"country":{"type":"string"},"level":{"type":["integer","null"]},"bbox":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"},{"type":"number"},{"type":"number"}]},"srid":{"type":"integer"},"format":{"type":"string","enum":["geojson","polyline"]},"geometry":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["Point"]},"coordinates":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}}},"required":["type","coordinates"]},{"type":"object","properties":{"type":{"type":"string","enum":["MultiPolygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number"},{"type":"number"}]}}}}},"required":["type","coordinates"]}]},"polylines":{"type":"array","items":{"type":"string"}},"is_final":{"type":"boolean"}},"required":["id","layer","bbox","srid","format"]}},"meta":{"type":"object","properties":{"limit":{"type":"integer"},"next_cursor":{"type":["string","null"]}},"required":["limit","next_cursor"]}},"required":["data","meta"]},"SeoPageResponse":{"type":"object","properties":{"entity":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"name":{"type":"string"},"uri":{"type":["string","null"]},"country":{"type":"string","enum":["PT","ES","IT","UK","FR"]},"kind":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"path":{"type":["string","null"]},"href":{"type":["string","null"],"format":"uri"}},"required":["id","layer","name","uri","country","kind","level","path","href"]},"breadcrumbs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"uri":{"type":"string"},"layer":{"type":"string"},"kind":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"path":{"type":"string"},"href":{"type":["string","null"],"format":"uri"}},"required":["name","uri","layer","kind","level","path","href"]}},"meta":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"canonical_path":{"type":"string"},"canonical_url":{"type":["string","null"],"format":"uri"},"og_title":{"type":"string"},"og_description":{"type":"string"}},"required":["title","description","canonical_path","canonical_url","og_title","og_description"]},"json_ld":{"type":"object","additionalProperties":{}},"sections":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"title":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"layer":{"type":"string"},"name":{"type":"string"},"uri":{"type":["string","null"]},"path":{"type":"string"},"href":{"type":["string","null"],"format":"uri"}},"required":["id","layer","name"]}}},"required":["key","title","items"]}}},"required":["entity","breadcrumbs","meta","json_ld"]},"SeoTreeResponse":{"type":"object","properties":{"country":{"type":"string","enum":["PT","ES","IT","UK","FR"]},"parent":{"type":["object","null"],"properties":{"id":{"type":"string"},"source_id":{"type":"string"},"layer":{"type":"string"},"country":{"type":"string","enum":["PT","ES","IT","UK","FR"]},"name":{"type":"string"},"kind":{"type":["string","null"]},"uri":{"type":["string","null"]},"path":{"type":"string"},"level":{"type":["integer","null"],"minimum":0,"maximum":7}},"required":["id","layer","country","name"]},"breadcrumbs":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"uri":{"type":"string"},"layer":{"type":"string"},"kind":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"path":{"type":"string"},"href":{"type":["string","null"],"format":"uri"}},"required":["name","uri","layer","kind","level","path","href"]}},"sections":{"type":"array","items":{"type":"object","properties":{"layer":{"type":"string","enum":["locations","postcodes","zones"]},"title":{"type":"string"},"nodes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"source_id":{"type":"string"},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"country":{"type":"string","enum":["PT","ES","IT","UK","FR"]},"name":{"type":"string"},"label":{"type":"string"},"centroid":{"type":["array","null"],"prefixItems":[{"type":"number"},{"type":"number"}]},"kind":{"type":["string","null"]},"uri":{"type":["string","null"]},"path":{"type":"string"},"parent_id":{"type":["string","null"]},"level":{"type":["integer","null"],"minimum":0,"maximum":7},"has_children":{"type":"boolean"},"child_count":{"type":"integer","minimum":0}},"required":["id","layer","country","name"]}},"meta":{"type":"object","properties":{"limit":{"type":"integer"},"next_cursor":{"type":["string","null"]}},"required":["limit","next_cursor"]}},"required":["layer","title","nodes","meta"]}}},"required":["country","parent","breadcrumbs","sections"]},"SeoSitemapResponse":{"type":"object","properties":{"shards":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string"},"lastmod":{"type":["string","null"]}},"required":["slug","lastmod"]}},"entries":{"type":"array","items":{"type":"object","properties":{"uri":{"type":"string"},"loc":{"type":"string","format":"uri"},"country":{"type":"string","enum":["PT","ES","IT","UK","FR"]},"layer":{"type":"string","enum":["locations","postcodes","zones"]},"kind":{"type":["string","null"]},"lastmod":{"type":["string","null"]}},"required":["uri","country","layer","lastmod"]}},"meta":{"type":"object","properties":{"shard":{"type":"string"},"count":{"type":"integer","minimum":0}},"required":["shard","count"]}}},"GoogleAutocompleteResponse":{},"GooglePlaceDetailsResponse":{},"GoogleGeocodeResponse":{},"GoogleReverseGeocodeResponse":{},"GeoapifyAutocompleteResponse":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"place_id":{"type":"string"},"formatted":{"type":"string"},"country_code":{"type":"string"},"name":{"type":"string"}},"required":["place_id","formatted"]}}},"required":["results"]},"GeoapifyBoundariesResponse":{}},"parameters":{"CountryQueryParam":{"name":"country","in":"query","required":false,"schema":{"$ref":"#/components/schemas/CountryCode"},"description":"ISO 3166-1 alpha-2 country code. PT, ES, IT, UK, or FR on location and address surfaces.","example":"PT"},"KindsQueryParam":{"name":"kinds","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FilterKinds"},"example":"town,district"},"LevelsQueryParam":{"name":"levels","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FilterLevels"},"example":"4,5"},"ParentQueryParam":{"name":"parent_id","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FilterParentId"},"example":"0-EU-PT-11"},"BboxQueryParam":{"name":"bbox","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FilterBbox"},"example":"-9.2,38.7,-9.0,38.8"},"NearQueryParam":{"name":"near","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FilterNear"},"example":"-9.138168592,38.710022004"},"RadiusQueryParam":{"name":"radius_m","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FilterRadiusM"},"example":5000},"LangQueryParam":{"name":"lang","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FilterLang"},"example":"en"},"PaginationQueryParam":{"name":"pagination","in":"query","required":false,"schema":{"$ref":"#/components/schemas/PaginationQueryParam"}},"LimitQueryParam":{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FilterLimit"},"example":25},"OffsetQueryParam":{"name":"offset","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FilterOffset"},"example":0},"CursorQueryParam":{"name":"cursor","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FilterCursor"}},"SridQueryParam":{"name":"srid","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FilterSrid"},"example":4326}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","description":"API key required on all /v1 routes. Set REFERENCE_API_KEY in .env to pre-fill the Scalar reference UI. Provider routes: REFERENCE_GOOGLE_API_KEY and REFERENCE_GEOAPIFY_API_KEY.","example":"