Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/scooller/Leben-site/llms.txt

Use this file to discover all available pages before exploring further.

The iLeben catalog API exposes real estate projects (proyectos) and their individual plant units (plantas) for consumption by authorized frontends. These endpoints are intentionally designed without user-level authentication — no logged-in session is needed — but they are still protected by the token.origin middleware, which validates that the request comes from an authorized origin for the given API token. This allows multiple frontend deployments to query the same backend catalog while maintaining per-integration access control.
Auth requirements for all catalog endpoints: Include both an Authorization: Bearer <token> header and an Origin (or Referer / X-Authorized-Url) header matching the authorized URL registered for that token. No user session (auth:sanctum) is required. A 403 response indicates the origin header does not match the token’s authorized_url.

Projects

GET /api/v1/proyectos — List projects

Returns a paginated list of real estate projects with optional filtering.
region
string
Filter projects by region name (e.g. "Metropolitana").
comuna
string
Filter by municipality or district.
etapa
string
Filter by project stage (e.g. "en_venta", "entrega_inmediata"). Normalized aliases for legacy values are supported.
q
string
Full-text search query across project name, commune, region, and address fields.
entrega_inmediata
boolean
When true, restricts results to projects with immediate delivery availability.
tipo
array
Filter by one or more project types. Accepts a list (e.g. tipo[]=departamento&tipo[]=casa).
perPage
integer
Number of results per page. Defaults to 15. Maximum 100.
fields
string
Alias: campos. Comma-separated list of fields to include in each result object. Useful for reducing payload size on listing views. When omitted, a standard default field set is returned.
Example — list projects in Región Metropolitana:
curl -H "Authorization: Bearer TOKEN" \
  -H "Origin: https://frontend.cliente.com" \
  "https://tu-dominio.com/api/v1/proyectos?region=Metropolitana&perPage=12"

GET /api/v1/proyectos/ — Project detail

Returns a single project record by its database ID.
include_plantas
boolean
Pass 1 to include the full array of plant units belonging to this project in the response.
include_asesores
boolean
Pass 1 to include the asesores array of active advisors assigned to this project. Omitting this parameter removes the asesores key from the response entirely.
fields
string
Alias: campos. Comma-separated list of fields to include in the response object.
When include_asesores=1 is set (or include_plantas=1, which also loads advisors), each advisor object in the asesores array contains the following fields:
FieldDescription
idAdvisor database ID
full_nameCombined first and last name
first_nameFirst name
last_nameLast name
emailContact email address
whatsapp_ownerWhatsApp number for direct contact
resolved_avatar_urlProfile image URL — Curator media asset takes priority over the static avatar_url field
Example — project detail with plants and advisors:
curl -H "Authorization: Bearer TOKEN" \
  -H "Origin: https://frontend.cliente.com" \
  "https://tu-dominio.com/api/v1/proyectos/3?include_plantas=1&include_asesores=1"

Plants

GET /api/v1/plantas — List plants with filters

Returns a paginated list of plant units. This is the primary endpoint for building catalog and search views, supporting a comprehensive set of filters across location, product type, availability, pricing, and sale events.
proyecto_id
string
Alias: project_id. Filter by project database ID. Accepts a comma-separated list (e.g. proyecto_id=3,7,12) to fetch plants from multiple projects in a single request.
salesforce_proyecto_id
string
Filter by the Salesforce record ID of the parent project. Useful when the frontend stores Salesforce IDs rather than local IDs.
project_slug
string
Alias: slug. Filter by the URL slug of the parent project.
comuna_slug
string
Filter by the slugified name of the municipality. Matched against active project communes using Str::slug().
catalog_slug
string
Filter by catalog slug. Matches against both project slugs and slugified commune names, making it suitable for unified catalog URL routing.
comuna
string
Filter by municipality name (non-slugified).
provincia
string
Filter by province name.
region
string
Filter by region name.
programa
string
Number of bedrooms (dormitorios). Accepts values like "2D" (2 bedrooms), "3D" (3 bedrooms), or "ST" (Studio). The numeric portion is extracted from the value and matched against the programa field. Accepts comma-separated or repeated query params for multiple values.
programa2
string
Number of bathrooms (baños). Accepts the numeric portion (e.g. "2" matches +2B). Accepts comma-separated or repeated values.
piso
string
Floor number. Accepts comma-separated or repeated values.
orientacion
string
Unit orientation (e.g. "norte", "sur"). Accepts comma-separated or repeated values.
tipo_producto
string
Filter by product type display name. Accepts comma-separated or repeated values.
tipo_producto_slug
string
Alias: tipo_slug. Filter by slugified product type. The slug is matched against available product types using Str::slug().
entrega
string
Delivery period or project stage string. Normalized via Proyecto::normalizeEtapa() before filtering.
disponible
boolean
Alias: available. Filter by availability status. Pass 1 or true to return only available units (no active reservation, no completed reservation, no completed payment). Pass 0 or false to return only unavailable units.
is_active
integer
Filter by the plant’s active status. 1 returns only active plants; 0 returns only inactive plants. Omitting this parameter returns all plants regardless of active state.
evento_sale
integer
Filter and apply sale event pricing. Only takes effect when explicitly included in the query string. 1 returns only sale units (where unidad_sale = true) using the event price. 0 returns non-sale units with normal pricing. Omitting this parameter applies no filter and uses normal project-level discount pricing.
min_precio
number
Minimum precio_base filter (inclusive). Filters on the plant’s stored precio_base field, not the computed precio_final.
max_precio
number
Maximum precio_base filter (inclusive). Filters on the plant’s stored precio_base field, not the computed precio_final.
perPage
integer
Number of results per page. Defaults to the plants_per_page value from SiteSettings (default 12). Maximum 100.
page
integer
Page number for pagination.
Key response fields for each plant object in the results:
FieldDescription
is_availableAvailability boolean — true when the unit has no active reservation, completed reservation, or completed payment
is_paidtrue when the unit has an associated completed reservation or completed payment
precio_finalComputed final price after applicable discounts or sale event pricing
cover_image_mediaCurator media object for the unit’s cover image (contains type, title, url, thumbnail_url, medium_url, large_url)
interior_image_mediaCurator media object for the unit’s interior image
cover_image_urlResolved URL for the cover image
interior_image_urlResolved URL for the interior image (falls back to salesforce_interior_image_url)
salesforce_interior_image_urlRaw interior image URL from Salesforce sync, used as fallback
imageUrlBest available image URL for listing cards — cover image, then project image, then site logo
detailImageUrlBest available image URL for detail views — interior image, then cover image, then project image
projectLogoUrlProject logo URL from salesforce_logo_url. null if not configured
proyectoImageUrlProject cover image URL from proyecto.image_url
asesoresArray of advisors associated with this plant (see advisor fields below)
proyectoEmbedded parent project object
Each advisor object in asesores contains: id, full_name, first_name, last_name, email, whatsapp_owner, whatsapp_redirect_url, avatar_manual_url, and avatar_url (falls back to the site favicon or logo if no manual avatar is set). Example — available plants in a project:
curl "https://tu-dominio.com/api/v1/plantas?proyecto_id=3&disponible=1" \
  -H "Authorization: Bearer TOKEN" \
  -H "Origin: https://frontend.cliente.com"

GET /api/v1/plantas/ — Plant detail

Returns a single plant unit by its database ID, including all computed pricing fields, media assets, and advisor assignments.
curl "https://tu-dominio.com/api/v1/plantas/42" \
  -H "Authorization: Bearer TOKEN" \
  -H "Origin: https://frontend.cliente.com"

GET /api/v1/plantas/filtros-ubicacion — Location filter options

Returns the set of available filter values based on the current active catalog. Use this endpoint to populate filter UI dropdowns on your frontend rather than hardcoding values. The response contains:
KeyDescription
regionsSorted list of available region names
comunasSorted list of available municipality names
comunas_by_regionObject mapping each region to its sorted list of municipalities
orientacionesSorted list of available unit orientations
tipos_productoSorted list of available product type names
pisosSorted list of available floor values
entregasSorted list of available delivery stage labels
curl "https://tu-dominio.com/api/v1/plantas/filtros-ubicacion" \
  -H "Authorization: Bearer TOKEN" \
  -H "Origin: https://frontend.cliente.com"

GET /api/v1/plantas/proyecto//unidad/ — Plant by project slug and unit name

Looks up a plant unit by its parent project’s slug and the unit’s name identifier. The unitName is matched both as an exact value and as a slug (LOWER(REPLACE(TRIM(name), ' ', '-'))). Only active plants within active projects are returned. Useful for deep-linking to a specific unit from a URL-friendly route without knowing the internal database ID.
curl "https://tu-dominio.com/api/v1/plantas/proyecto/torre-central/unidad/1201" \
  -H "Authorization: Bearer TOKEN" \
  -H "Origin: https://frontend.cliente.com"

Preview access

iLeben supports pre-publication catalog browsing via the FrontendPreviewLink model. Preview links carry a temporary access token that allows authorized users (e.g. marketing staff) to browse the catalog before it is publicly visible, without needing a full admin account. The preview middleware accepts a token query parameter on catalog routes. When a valid preview token is supplied, the middleware bypasses the standard token.origin check and grants time-limited read access to the catalog. It also overrides mostrar_plantas to true in the site-config response, ensuring the catalog is visible during preview sessions.
Preview tokens are managed from the Filament admin panel and are intended for internal QA and stakeholder review workflows. They should not be distributed publicly or embedded in shared links without an expiry. Preview access does not grant write permissions or expose payment gateway configuration.

Build docs developers (and LLMs) love