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 REST API is a versioned JSON API served under /api/v1. It exposes the platform’s real estate catalog, checkout flow, payment management, reservation system, and site configuration to frontend applications and authorized external clients. All responses use Content-Type: application/json. The API is built on Laravel 12 with Laravel Sanctum for token-based authentication and a custom token.origin middleware that validates the request’s origin against the token’s authorized URL.

Base URL

All endpoints described in this documentation are relative to the versioned base path:
/api/v1
For a production deployment at https://tu-dominio.com, every endpoint is reachable at https://tu-dominio.com/api/v1/{path}.

Discovery Endpoint

Before integrating, you can inspect the full machine-readable route catalog at:
GET /api/v1
This endpoint returns an OpenAPI 3.0.3-style JSON document containing the info block, the servers array (populated with the live base URL), all tags, every path with its operations and security requirements, and the securitySchemes component. No authentication is required to call this endpoint.
curl "https://tu-dominio.com/api/v1"
{
  "openapi": "3.0.3",
  "info": {
    "title": "iLeben API",
    "version": "v1",
    "description": "Documentación base de endpoints para integración frontend y clientes externos."
  },
  "servers": [{ "url": "https://tu-dominio.com/api/v1" }],
  "tags": [
    { "name": "Config" },
    { "name": "Auth" },
    { "name": "Proyectos" },
    { "name": "Plantas" },
    { "name": "Reservas" },
    { "name": "Pagos" },
    { "name": "Checkout" }
  ]
}

Authentication Models

The API enforces three distinct authentication tiers depending on the endpoint group.
TierMiddlewareWho uses it
Public — no auth required(none)Anonymous browsers, webhooks returning payment results
Catalog — Bearer token + origin onlytoken.originFrontend apps reading the catalog without a logged-in user
Authenticated — Bearer token + Sanctum session + originauth:sanctum, token.originLogged-in buyers performing checkout, reservations, and payment operations

Public endpoints (no authentication)

MethodPathNotes
GET/api/v1Discovery — OpenAPI-style JSON
GET/api/v1/site-configGlobal site configuration
POST/api/v1/contact-submissionsLead / contact form submission
GET/api/v1/payments/public-status/{id}Payment result screen (requires ?token= query param)

Catalog endpoints — token.origin only (no auth:sanctum)

These endpoints do not require a logged-in user session, but they do require a valid Bearer token and a matching origin header. See Authentication for details on the token.origin middleware.
MethodPath
GET/api/v1/proyectos
GET/api/v1/proyectos/{id}
GET/api/v1/plantas
GET/api/v1/plantas/{id}
GET/api/v1/plantas/filtros-ubicacion
GET/api/v1/plantas/proyecto/{projectSlug}/unidad/{unitName}
Catalog endpoints are protected by token.origin only — they do not require auth:sanctum. A Bearer token with a matching origin header is sufficient to access the full real estate catalog without a user login.

Authenticated endpoints — auth:sanctum + token.origin

MethodPath
GET/api/v1/me
POST/api/v1/logout
GET/api/v1/payment-gateways
POST/api/v1/checkout
POST/api/v1/reservations
GET/api/v1/reservations/planta/{plantId}
DELETE/api/v1/reservations/{sessionToken}
GET/api/v1/payments
GET/api/v1/payments/{id}
POST/api/v1/payments/{id}/manual-proof
POST/api/v1/payments
GET/api/v1/production-sync/export

Rate Limits

Sensitive write endpoints are throttled per IP to prevent abuse.
EndpointLimit
POST /api/v1/login5 requests / minute
POST /api/v1/register5 requests / minute
POST /api/v1/contact-submissions10 requests / minute
Requests exceeding the limit receive a 429 Too Many Requests response. All other endpoints inherit Laravel’s default API throttle.

Full Endpoint Index

The table below lists every route registered under /api/v1 with its HTTP method, authentication requirement, and a short description.
MethodPathAuthDescription
GET/api/v1PublicOpenAPI-style discovery document
GET/api/v1/site-configPublicGlobal site configuration; some fields only visible with Bearer token
POST/api/v1/loginPublicAuthenticate a user and receive a Sanctum Bearer token
POST/api/v1/registerPublicRegister a new user account
POST/api/v1/logoutSanctum + originRevoke the current token and end the session
GET/api/v1/meSanctum + originReturn the authenticated user object
POST/api/v1/contact-submissionsPublicSubmit a contact / lead form
GET/api/v1/proyectostoken.originPaginated list of real estate projects with filters
GET/api/v1/proyectos/{id}token.originProject detail; supports include_plantas and include_asesores
GET/api/v1/plantastoken.originPaginated catalog of floor plans with filters
GET/api/v1/plantas/{id}token.originFloor plan detail with pricing and availability
GET/api/v1/plantas/filtros-ubicaciontoken.originAvailable regions and comunas for filter UI
GET/api/v1/plantas/proyecto/{projectSlug}/unidad/{unitName}token.originLook up a floor plan by project slug and unit name
GET/api/v1/payment-gatewaysSanctum + originList payment gateways available for a given plant_id
POST/api/v1/checkoutSanctum + originInitiate a checkout session (Transbank, MercadoPago, or manual)
POST/api/v1/reservationsSanctum + originCreate a timed reservation on a floor plan
GET/api/v1/reservations/planta/{plantId}Sanctum + originGet the active reservation status for a plant
DELETE/api/v1/reservations/{sessionToken}Sanctum + originRelease a reservation before it expires
GET/api/v1/paymentsSanctum + originList all payments for the authenticated user
GET/api/v1/payments/{id}Sanctum + originPayment detail
POST/api/v1/paymentsSanctum + originCreate a payment record
POST/api/v1/payments/{id}/manual-proofSanctum + originUpload a bank transfer proof (multipart/form-data)
GET/api/v1/payments/public-status/{id}PublicPublic payment result lookup (requires ?token= query param)
GET/api/v1/production-sync/exportSanctum + originExport data for production sync

Explore Further

Authentication

How to obtain a Sanctum token, attach it to requests, and satisfy the token.origin middleware.

Catalog

Filtering proyectos and plantas — available query parameters and response fields.

Checkout

Initiate a Transbank, MercadoPago, or manual payment flow from POST /api/v1/checkout.

Payments

Retrieve payment records, upload manual proofs, and check public payment status.

Build docs developers (and LLMs) love