{
    "openapi": "3.0.3",
    "info": {
        "title": "Equinos.co API Documentation",
        "description": "# 📚 Introducción\n\nBienvenido a la documentación de la **API de Equinos.co**. Esta API REST proporciona acceso completo a todas las funcionalidades de la plataforma, incluyendo:\n\n- 🛒 **Marketplace**: Publicaciones, categorías, órdenes, carrito y más\n- 🎓 **Escuelas**: Gestión de estudiantes, clases, horarios, pagos y certificados\n- 🐴 **Criaderos**: Ejemplares, servicios de cría, contratos, CRM y reportes\n- ⚙️ **Core**: Notificaciones, perfil de usuario, configuración y preferencias\n- 👨‍💼 **Admin**: Dashboard, usuarios, organizaciones y configuración del sistema\n\n## 🔐 Autenticación\n\nLa mayoría de los endpoints requieren autenticación mediante **Bearer Token** de Firebase.\n\n### Cómo obtener tu token\n\n1. Inicia sesión en tu cuenta de Equinos.co (https://equinos.app)\n2. El token se obtiene automáticamente mediante Firebase Authentication\n3. Incluye el token en el header `Authorization` de todas las peticiones:\n\n```\nAuthorization: Bearer {TU_TOKEN_FIREBASE}\n```\n\n### Ejemplo de petición\n\n```bash\ncurl -X GET \"https://api.equinos.co/api/user/modules\" \\\n  -H \"Authorization: Bearer {TU_TOKEN_FIREBASE}\" \\\n  -H \"Accept: application/json\"\n```\n\n## 🌐 Base URL\n\n**Producción:** `https://api.equinos.co`\n\nTodos los endpoints están prefijados con `/api/`.\n\n## 📖 Uso de esta documentación\n\n- Explora los endpoints usando el menú lateral\n- Cada endpoint incluye ejemplos de petición y respuesta\n- Prueba los endpoints directamente desde la documentación\n- Descarga la colección de Postman para usar en tu cliente favorito",
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "http://localhost"
        }
    ],
    "tags": [
        {
            "name": "Endpoints",
            "description": ""
        },
        {
            "name": "⚙️ Core / Configuración",
            "description": "\nAPIs para gestionar configuración del sistema"
        },
        {
            "name": "⚙️ Core / Notificaciones",
            "description": "\nAPIs para gestionar notificaciones del usuario"
        },
        {
            "name": "⚙️ Core / Perfil",
            "description": "\nAPIs para gestionar el perfil del usuario"
        },
        {
            "name": "⚙️ Core / Preferencias",
            "description": "\nAPIs para gestionar preferencias de notificaciones"
        },
        {
            "name": "🌐 Público / Waitlist",
            "description": "\nEndpoint público para registro en lista de espera.\nNo requiere autenticación."
        },
        {
            "name": "🎓 Escuelas / Asistencia",
            "description": "\nAPIs para gestionar asistencia de estudiantes.\nIncluye registro diario y reportes de asistencia."
        },
        {
            "name": "🎓 Escuelas / Caballos",
            "description": "\nAPIs para gestionar caballos de una escuela.\nIncluye información de uso y disponibilidad."
        },
        {
            "name": "🎓 Escuelas / Certificados",
            "description": "\nAPIs para gestionar certificados de estudiantes.\nIncluye generación de PDFs y verificación pública."
        },
        {
            "name": "🎓 Escuelas / Clases",
            "description": "\nAPIs para gestionar tipos de clases de una escuela.\nRequiere autenticación y permisos classes.view/create/edit/delete."
        },
        {
            "name": "🎓 Escuelas / Competiciones",
            "description": "\nAPIs para gestionar competiciones y resultados de estudiantes.\nRequiere autenticación y permisos competitions.view/create/edit/delete."
        },
        {
            "name": "🎓 Escuelas / Dashboard",
            "description": "\nAPIs para el dashboard de una escuela.\nIncluye estadísticas, clases del día y pagos pendientes."
        },
        {
            "name": "🎓 Escuelas / Estudiantes",
            "description": "\nAPIs para gestionar estudiantes de una escuela.\nRequiere autenticación y permisos students.view/create/edit/delete."
        },
        {
            "name": "🎓 Escuelas / Gestión",
            "description": "\nAPIs para gestionar escuelas de equitación.\nRequiere autenticación y acceso al módulo de escuelas."
        },
        {
            "name": "🎓 Escuelas / Horarios",
            "description": "\nAPIs para gestionar horarios de clases.\nIncluye vista semanal y gestión de horarios."
        },
        {
            "name": "🎓 Escuelas / Inscripciones",
            "description": "\nAPIs para gestionar inscripciones de estudiantes en clases.\nVincula estudiantes con clases, horarios y caballos asignados."
        },
        {
            "name": "🎓 Escuelas / Insignias",
            "description": "\nAPIs para gestionar insignias y logros de estudiantes.\nIncluye definición de badges y asignación a estudiantes."
        },
        {
            "name": "🎓 Escuelas / Instructores",
            "description": "\nAPIs para gestionar instructores de una escuela.\nRequiere autenticación y permisos instructors.view/create/edit/delete."
        },
        {
            "name": "🎓 Escuelas / Niveles",
            "description": "\nAPIs para gestionar niveles de habilidad y sus criterios de evaluación.\nPermite definir la estructura de progresión de estudiantes."
        },
        {
            "name": "🎓 Escuelas / Pagos",
            "description": "\nAPIs para gestionar pagos y cobros de una escuela.\nIncluye generación de cuotas mensuales y reportes."
        },
        {
            "name": "🎓 Escuelas / Portal",
            "description": "\nAPIs para el portal de acceso de estudiantes.\nPermite a los estudiantes ver su dashboard, clases, horarios, asistencia y pagos."
        },
        {
            "name": "🎓 Escuelas / Progreso",
            "description": "\nAPIs para gestionar el progreso y habilidades de estudiantes.\nIncluye evaluación de criterios, actualización de niveles y notas del instructor."
        },
        {
            "name": "🎓 Escuelas / Reportes",
            "description": "\nAPIs para generar reportes de una escuela.\nIncluye asistencia, finanzas, estudiantes, instructores, caballos y competiciones."
        },
        {
            "name": "🎓 Escuelas / Timeline",
            "description": "\nAPIs para gestionar el timeline/historial de eventos de un estudiante.\nRegistra logros, cambios de nivel, notas y otros eventos importantes."
        },
        {
            "name": "🐴 Criaderos / Cartera",
            "description": "\nAPIs para gestionar cartera y cuentas por cobrar.\nIncluye seguimiento de pagos pendientes y resúmenes."
        },
        {
            "name": "🐴 Criaderos / Clientes",
            "description": "\nAPIs para gestionar clientes del criadero.\nIncluye conversiones, promociones y gestión de interacciones."
        },
        {
            "name": "🐴 Criaderos / Contratos",
            "description": "\nAPIs para gestionar contratos de servicios.\nIncluye generación, envío para firma y seguimiento."
        },
        {
            "name": "🐴 Criaderos / Dashboard",
            "description": "\nAPIs para el dashboard del CRM del criadero.\nMuestra estadísticas de clientes, prospectos y tareas."
        },
        {
            "name": "🐴 Criaderos / Ejemplares",
            "description": "\nAPIs para gestionar ejemplares (caballos) de un criadero.\nIncluye información de pedigree, descendencia y árbol genealógico."
        },
        {
            "name": "🐴 Criaderos / Etiquetas",
            "description": "\nAPIs para gestionar etiquetas de clientes.\nPermite clasificar y segmentar clientes por categorías personalizadas."
        },
        {
            "name": "🐴 Criaderos / Firma",
            "description": "\nAPIs públicas para firma de contratos.\nPermite a clientes ver, firmar o rechazar contratos mediante token."
        },
        {
            "name": "🐴 Criaderos / Gastos",
            "description": "\nAPIs para registrar y gestionar gastos del criadero.\nCategorización y seguimiento de gastos operativos."
        },
        {
            "name": "🐴 Criaderos / Gestión",
            "description": "\nAPIs para gestionar criaderos (studs).\nRequiere autenticación y acceso al módulo de criaderos."
        },
        {
            "name": "🐴 Criaderos / Ingresos",
            "description": "\nAPIs para registrar ingresos adicionales del criadero.\nCategorización y seguimiento de ingresos no vinculados a servicios."
        },
        {
            "name": "🐴 Criaderos / Media",
            "description": "\nAPIs para gestionar fotos y videos de ejemplares.\nIncluye subida, reordenamiento y eliminación de medios."
        },
        {
            "name": "🐴 Criaderos / Médico",
            "description": "\nAPIs para gestionar el historial médico de ejemplares.\nIncluye vacunas, desparasitaciones, herraje y otros registros."
        },
        {
            "name": "🐴 Criaderos / Nacimientos",
            "description": "\nAPIs para registrar y gestionar nacimientos.\nIncluye datos del potro, estadísticas y creación automática de ejemplar."
        },
        {
            "name": "🐴 Criaderos / Pagos",
            "description": "\nAPIs para registrar y gestionar pagos recibidos.\nVincula pagos con cuentas por cobrar y genera reportes."
        },
        {
            "name": "🐴 Criaderos / Pedigree",
            "description": "\nAPIs para gestionar pedigrees desde el módulo de criaderos.\nIncluye vinculación con pedigree global, verificación y documentos."
        },
        {
            "name": "🐴 Criaderos / Plantillas",
            "description": "\nAPIs para gestionar plantillas de contratos.\nPermite crear y personalizar contratos reutilizables."
        },
        {
            "name": "🐴 Criaderos / Preñeces",
            "description": "\nAPIs para gestionar y dar seguimiento a preñeces.\nIncluye registro de ecografías, fecha estimada de parto y estado."
        },
        {
            "name": "🐴 Criaderos / Prospectos",
            "description": "\nAPIs para gestionar prospectos de ventas.\nIncluye pipeline de ventas, seguimiento de etapas y conversiones."
        },
        {
            "name": "🐴 Criaderos / Reportes",
            "description": "\nAPIs para generar reportes financieros del criadero.\nIncluye dashboard, pérdidas/ganancias y flujo de caja."
        },
        {
            "name": "🐴 Criaderos / Reservas",
            "description": "\nAPIs para gestionar reservas de servicios de cría.\nIncluye programación, resultados y seguimiento de montas."
        },
        {
            "name": "🐴 Criaderos / Servicios",
            "description": "\nAPIs para gestionar servicios de cría ofrecidos por el criadero.\nDefine sementales disponibles, precios y condiciones."
        },
        {
            "name": "🐴 Criaderos / Tareas",
            "description": "\nAPIs para gestionar tareas relacionadas con clientes.\nIncluye asignación, seguimiento y completado de tareas."
        },
        {
            "name": "👨‍💼 Admin / Campos",
            "description": "\nAPIs para gestionar campos personalizados (Admin)"
        },
        {
            "name": "👨‍💼 Admin / Categorías",
            "description": "\nAPIs para gestionar categorías (Admin)"
        },
        {
            "name": "👨‍💼 Admin / Comisiones",
            "description": "\nAPIs para gestionar tiers de comisión (Admin)"
        },
        {
            "name": "👨‍💼 Admin / Configuración",
            "description": "\nAPIs para configurar pasarela de pagos del marketplace.\nGestiona credenciales de ePayco y otras configuraciones."
        },
        {
            "name": "👨‍💼 Admin / Códigos",
            "description": "\nAPIs para gestionar códigos de acceso (Admin)"
        },
        {
            "name": "👨‍💼 Admin / Dashboard",
            "description": "\nAPIs para el dashboard de administración"
        },
        {
            "name": "👨‍💼 Admin / Módulos",
            "description": "\nAPIs para gestionar accesos a módulos.\nIncluye asignación de permisos, invitaciones y revocación."
        },
        {
            "name": "👨‍💼 Admin / Organizaciones",
            "description": "\nAPIs para gestionar organizaciones (Admin)"
        },
        {
            "name": "👨‍💼 Admin / Pedigree",
            "description": "\nAPIs para gestionar entradas de pedigree global desde el panel admin.\nPermite crear, editar, fusionar entradas y gestionar el árbol genealógico."
        },
        {
            "name": "👨‍💼 Admin / Publicaciones",
            "description": "\nAPIs para gestionar publicaciones (Admin)"
        },
        {
            "name": "👨‍💼 Admin / Reportes",
            "description": "\nAPIs para gestionar reportes y moderación (Admin)"
        },
        {
            "name": "👨‍💼 Admin / Tipos",
            "description": "\nAPIs para gestionar tipos de publicación (Admin)"
        },
        {
            "name": "👨‍💼 Admin / Usuarios",
            "description": "\nAPIs para gestionar usuarios (Admin)"
        },
        {
            "name": "👨‍💼 Admin / Usuarios Marketplace",
            "description": "\nAPIs para gestionar usuarios del marketplace (Admin)"
        },
        {
            "name": "👨‍💼 Admin / Waitlist",
            "description": "\nAPIs para gestionar waitlist (Admin)"
        },
        {
            "name": "👨‍💼 Admin / Órdenes",
            "description": "\nAPIs para gestionar órdenes (Admin)"
        },
        {
            "name": "🛒 Marketplace / Acceso",
            "description": "\nAPIs para verificar acceso al marketplace"
        },
        {
            "name": "🛒 Marketplace / Búsqueda",
            "description": "\nAPIs para búsqueda en el marketplace"
        },
        {
            "name": "🛒 Marketplace / Carrito",
            "description": "\nAPIs para gestionar el carrito de compras"
        },
        {
            "name": "🛒 Marketplace / Categorías",
            "description": "\nAPIs para obtener la estructura completa del marketplace.\nRetorna tipos de publicación con sus categorías y subcategorías."
        },
        {
            "name": "🛒 Marketplace / Contacto",
            "description": "\nAPIs para gestionar solicitudes de contacto del marketplace"
        },
        {
            "name": "🛒 Marketplace / Favoritos",
            "description": "\nAPIs para gestionar favoritos"
        },
        {
            "name": "🛒 Marketplace / Publicaciones",
            "description": "\nAPIs para obtener campos personalizados por tipo de publicación.\nRetorna la estructura de formularios dinámicos para crear publicaciones."
        },
        {
            "name": "🛒 Marketplace / Tipos",
            "description": "\nAPIs para gestionar tipos de publicación"
        },
        {
            "name": "🛒 Marketplace / Vendedor",
            "description": "\nAPIs para gestionar perfil de vendedor"
        },
        {
            "name": "🛒 Marketplace / Órdenes",
            "description": "\nAPIs para gestionar órdenes"
        }
    ],
    "components": {
        "securitySchemes": {
            "default": {
                "type": "http",
                "scheme": "bearer",
                "description": "El token se obtiene mediante Firebase Authentication al iniciar sesión en Equinos.co. Incluye el token en el header `Authorization: Bearer {TU_TOKEN_FIREBASE}`."
            }
        }
    },
    "security": [
        {
            "default": []
        }
    ],
    "paths": {
        "/api/health": {
            "get": {
                "summary": "",
                "operationId": "getApiHealth",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string"
                                        },
                                        "timestamp": {
                                            "type": "string"
                                        },
                                        "service": {
                                            "type": "string"
                                        },
                                        "version": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "status",
                                        "timestamp",
                                        "service",
                                        "version"
                                    ],
                                    "example": {
                                        "status": "ok",
                                        "timestamp": "2024-12-31T10:00:00Z",
                                        "service": "Equinos API",
                                        "version": "1.0.0"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Endpoints"
                ]
            }
        },
        "/api/test-firebase": {
            "get": {
                "summary": "",
                "operationId": "getApiTestFirebase",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "firebase_connected": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "status",
                                        "message",
                                        "firebase_connected"
                                    ],
                                    "example": {
                                        "status": "ok",
                                        "message": "Firebase Service is configured correctly",
                                        "firebase_connected": true
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "firebase_connected": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "status",
                                        "message",
                                        "firebase_connected"
                                    ],
                                    "example": {
                                        "status": "error",
                                        "message": "...",
                                        "firebase_connected": false
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Endpoints"
                ]
            }
        },
        "/api/test/dashboard": {
            "get": {
                "summary": "",
                "operationId": "getApiTestDashboard",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "users": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "active": {
                                                    "type": "integer"
                                                },
                                                "new_this_month": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "active",
                                                "new_this_month"
                                            ]
                                        },
                                        "publications": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "active": {
                                                    "type": "integer"
                                                },
                                                "pending": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "active",
                                                "pending"
                                            ]
                                        },
                                        "organizations": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "verified": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "verified"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "users",
                                        "publications",
                                        "organizations"
                                    ],
                                    "example": {
                                        "users": {
                                            "total": 150,
                                            "active": 145,
                                            "new_this_month": 10
                                        },
                                        "publications": {
                                            "total": 450,
                                            "active": 420,
                                            "pending": 15
                                        },
                                        "organizations": {
                                            "total": 50,
                                            "verified": 45
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Endpoints"
                ]
            }
        },
        "/api/contact": {
            "post": {
                "summary": "Send contact form email",
                "operationId": "sendContactFormEmail",
                "description": "",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "subject": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "name",
                                                "email",
                                                "subject"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Contact form submitted successfully",
                                        "data": {
                                            "name": "Juan Pérez",
                                            "email": "juan@ejemplo.com",
                                            "subject": "Consulta general"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "Validation error",
                                        "errors": {
                                            "name": [
                                                "El nombre es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "error"
                                    ],
                                    "example": {
                                        "message": "Failed to submit contact form",
                                        "error": "..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Endpoints"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "b"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 255 characters.",
                                        "example": "zbailey@example.net"
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "i"
                                    },
                                    "message": {
                                        "type": "string",
                                        "description": "Must not be greater than 5000 characters.",
                                        "example": "y"
                                    }
                                },
                                "required": [
                                    "name",
                                    "email",
                                    "subject",
                                    "message"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/auth/me": {
            "get": {
                "summary": "",
                "operationId": "getApiAuthMe",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "email": {
                                            "type": "string"
                                        },
                                        "display_name": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "email",
                                        "display_name",
                                        "status"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "email": "usuario@ejemplo.com",
                                        "display_name": "Juan Pérez",
                                        "status": "active"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Unauthenticated"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Endpoints"
                ]
            }
        },
        "/api/email-preview/suborder-created": {
            "get": {
                "summary": "Preview: Email de nueva sub-orden para vendedor",
                "operationId": "previewEmailDeNuevaSubOrdenParaVendedor",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "HTML email preview",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "HTML content"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Endpoints"
                ]
            }
        },
        "/api/email-preview/status-updated": {
            "get": {
                "summary": "Preview: Email de actualización de estado para comprador",
                "operationId": "previewEmailDeActualizacinDeEstadoParaComprador",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "HTML email preview",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "HTML content"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Endpoints"
                ]
            }
        },
        "/api/email-preview/tracking-added": {
            "get": {
                "summary": "Preview: Email de tracking agregado para comprador",
                "operationId": "previewEmailDeTrackingAgregadoParaComprador",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "HTML email preview",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "HTML content"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Endpoints"
                ]
            }
        },
        "/api/email-preview/contact-form": {
            "get": {
                "summary": "Preview: Email de formulario de contacto",
                "operationId": "previewEmailDeFormularioDeContacto",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "HTML email preview",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "HTML content"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Endpoints"
                ]
            }
        },
        "/api/email-preview/waitlist-confirmation": {
            "get": {
                "summary": "Preview: Email de confirmación de waitlist",
                "operationId": "previewEmailDeConfirmacinDeWaitlist",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "HTML email preview",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "HTML content"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Endpoints"
                ]
            }
        },
        "/api/email-preview/waitlist-notification": {
            "get": {
                "summary": "Preview: Email de notificación de waitlist (para admin)",
                "operationId": "previewEmailDeNotificacinDeWaitlistparaAdmin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "HTML email preview",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "HTML content"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Endpoints"
                ]
            }
        },
        "/api/email-preview/marketplace-contact": {
            "get": {
                "summary": "Preview: Email de contacto de marketplace",
                "operationId": "previewEmailDeContactoDeMarketplace",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "HTML email preview",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "HTML content"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "Endpoints"
                ]
            }
        },
        "/api/admin/settings": {
            "get": {
                "summary": "Get all settings",
                "operationId": "getAllSettings",
                "description": "Get all system settings grouped by category.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "settings": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "features": {
                                            "type": "object",
                                            "properties": {
                                                "marketplace": {
                                                    "type": "object",
                                                    "properties": {
                                                        "enabled": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "enabled"
                                                    ]
                                                },
                                                "blog": {
                                                    "type": "object",
                                                    "properties": {
                                                        "enabled": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "enabled"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "marketplace",
                                                "blog"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "settings",
                                        "features"
                                    ],
                                    "example": {
                                        "settings": [],
                                        "features": {
                                            "marketplace": {
                                                "enabled": true
                                            },
                                            "blog": {
                                                "enabled": false
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Configuración"
                ]
            }
        },
        "/api/admin/settings/group/{group}": {
            "get": {
                "summary": "Get settings by group",
                "operationId": "getSettingsByGroup",
                "description": "Get settings for a specific group.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Configuración"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "group",
                    "description": "Setting group name.",
                    "example": "features",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/settings/initialize": {
            "post": {
                "summary": "Initialize default settings",
                "operationId": "initializeDefaultSettings",
                "description": "Initialize system with default settings.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Settings initialized successfully"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Configuración"
                ]
            }
        },
        "/api/admin/settings/features/{feature}/toggle": {
            "post": {
                "summary": "Toggle a feature",
                "operationId": "toggleAFeature",
                "description": "Enable or disable a feature.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "feature": {
                                            "type": "string"
                                        },
                                        "enabled": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "feature",
                                        "enabled"
                                    ],
                                    "example": {
                                        "message": "Feature toggled successfully",
                                        "feature": "marketplace",
                                        "enabled": true
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Configuración"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "Enable or disable.",
                                        "example": true
                                    }
                                },
                                "required": [
                                    "enabled"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "feature",
                    "description": "Feature name.",
                    "example": "marketplace",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/settings/marketplace": {
            "put": {
                "summary": "Update marketplace settings",
                "operationId": "updateMarketplaceSettings",
                "description": "Update marketplace-specific settings.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "settings": {
                                            "type": "object",
                                            "properties": {
                                                "enabled": {
                                                    "type": "boolean"
                                                },
                                                "maintenance_message": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "enabled",
                                                "maintenance_message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "settings"
                                    ],
                                    "example": {
                                        "message": "Marketplace settings updated successfully",
                                        "settings": {
                                            "enabled": true,
                                            "maintenance_message": ""
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Configuración"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "enabled": {
                                        "type": "boolean",
                                        "description": "Enable or disable marketplace.",
                                        "example": true
                                    },
                                    "maintenance_message": {
                                        "type": "string",
                                        "description": "Maintenance message.",
                                        "example": "En mantenimiento",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/settings/{key}": {
            "get": {
                "summary": "Get a specific setting",
                "operationId": "getASpecificSetting",
                "description": "Get value of a specific setting by key.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "key": {
                                            "type": "string"
                                        },
                                        "value": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "key",
                                        "value"
                                    ],
                                    "example": {
                                        "key": "marketplace.enabled",
                                        "value": true
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Configuración"
                ]
            },
            "put": {
                "summary": "Update a setting",
                "operationId": "updateASetting",
                "description": "Update a specific setting value.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "key": {
                                            "type": "string"
                                        },
                                        "value": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "key",
                                        "value"
                                    ],
                                    "example": {
                                        "message": "Setting updated successfully",
                                        "key": "marketplace.enabled",
                                        "value": true
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Configuración"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "value": {
                                        "type": "required",
                                        "description": "Setting value.",
                                        "example": "true"
                                    },
                                    "group": {
                                        "type": "string",
                                        "description": "Setting group.",
                                        "example": "features"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "key",
                    "description": "Setting key.",
                    "example": "marketplace.enabled",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/notifications": {
            "get": {
                "summary": "Listar notificaciones del usuario autenticado",
                "operationId": "listarNotificacionesDelUsuarioAutenticado",
                "description": "Get paginated list of notifications for the authenticated user.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "unread_only",
                        "description": "Only show unread notifications.",
                        "example": true,
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "description": "Only show unread notifications.",
                            "example": true
                        }
                    },
                    {
                        "in": "query",
                        "name": "category",
                        "description": "Filter by category.",
                        "example": "orders",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by category.",
                            "example": "orders"
                        }
                    },
                    {
                        "in": "query",
                        "name": "priority",
                        "description": "Filter by priority.",
                        "example": "high",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by priority.",
                            "example": "high"
                        }
                    },
                    {
                        "in": "query",
                        "name": "archived",
                        "description": "Filter by archived status (true, false).",
                        "example": "false",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by archived status (true, false).",
                            "example": "false"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [],
                                        "current_page": 1,
                                        "total": 50
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Notificaciones"
                ]
            }
        },
        "/api/notifications/unread-count": {
            "get": {
                "summary": "Obtener contador de notificaciones no leídas",
                "operationId": "obtenerContadorDeNotificacionesNoLedas",
                "description": "Get count of unread notifications for the authenticated user.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "count": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "count"
                                    ],
                                    "example": {
                                        "count": 5
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Notificaciones"
                ]
            }
        },
        "/api/notifications/stats": {
            "get": {
                "summary": "Obtener estadísticas de notificaciones",
                "operationId": "obtenerEstadsticasDeNotificaciones",
                "description": "Get notification statistics for the authenticated user.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "unread": {
                                                    "type": "integer"
                                                },
                                                "by_category": {
                                                    "type": "object",
                                                    "properties": []
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "unread",
                                                "by_category"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "total": 50,
                                            "unread": 5,
                                            "by_category": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Notificaciones"
                ]
            }
        },
        "/api/notifications/mark-all-read": {
            "post": {
                "summary": "Marcar todas las notificaciones como leídas",
                "operationId": "marcarTodasLasNotificacionesComoLedas",
                "description": "Mark all notifications as read for the authenticated user.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "count": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "count"
                                    ],
                                    "example": {
                                        "message": "Todas las notificaciones marcadas como leídas",
                                        "count": 15
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Notificaciones"
                ]
            }
        },
        "/api/notifications/{id}": {
            "get": {
                "summary": "Obtener una notificación específica",
                "operationId": "obtenerUnaNotificacinEspecfica",
                "description": "Get full details of a notification.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Notificaciones"
                ]
            },
            "delete": {
                "summary": "Eliminar notificación",
                "operationId": "eliminarNotificacin",
                "description": "Delete a notification.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Notificación eliminada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Notificaciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of the notification.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/notifications/{id}/read": {
            "post": {
                "summary": "Marcar notificación como leída",
                "operationId": "marcarNotificacinComoLeda",
                "description": "Mark a notification as read.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "notification": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "notification"
                                    ],
                                    "example": {
                                        "message": "Notificación marcada como leída",
                                        "notification": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Notificaciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of the notification.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/notifications/{id}/unread": {
            "post": {
                "summary": "Marcar notificación como no leída",
                "operationId": "marcarNotificacinComoNoLeda",
                "description": "Mark a notification as unread.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "notification": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "notification"
                                    ],
                                    "example": {
                                        "message": "Notificación marcada como no leída",
                                        "notification": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Notificaciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of the notification.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/notifications/{id}/archive": {
            "post": {
                "summary": "Archivar notificación",
                "operationId": "archivarNotificacin",
                "description": "Archive a notification.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "notification": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "notification"
                                    ],
                                    "example": {
                                        "message": "Notificación archivada",
                                        "notification": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Notificaciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of the notification.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/notifications/{id}/unarchive": {
            "post": {
                "summary": "Desarchivar notificación",
                "operationId": "desarchivarNotificacin",
                "description": "Unarchive a notification.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "notification": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "notification"
                                    ],
                                    "example": {
                                        "message": "Notificación desarchivada",
                                        "notification": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Notificaciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of the notification.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/user/profile": {
            "get": {
                "summary": "Obtener perfil del usuario autenticado",
                "operationId": "obtenerPerfilDelUsuarioAutenticado",
                "description": "Get profile of the authenticated user including marketplace tier and validation.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "user": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "marketplace": {
                                                    "type": "object",
                                                    "properties": {
                                                        "tier": {
                                                            "type": "string"
                                                        },
                                                        "can_publish": {
                                                            "type": "boolean"
                                                        },
                                                        "is_complete": {
                                                            "type": "boolean"
                                                        }
                                                    },
                                                    "required": [
                                                        "tier",
                                                        "can_publish",
                                                        "is_complete"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "user",
                                                "marketplace"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "user": [],
                                            "marketplace": {
                                                "tier": "basic",
                                                "can_publish": true,
                                                "is_complete": true
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Perfil"
                ]
            },
            "put": {
                "summary": "Actualizar perfil del usuario",
                "operationId": "actualizarPerfilDelUsuario",
                "description": "Update profile of the authenticated user.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "user": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "is_complete": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "user",
                                                "is_complete"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Perfil actualizado exitosamente",
                                        "data": {
                                            "user": [],
                                            "is_complete": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Perfil"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "display_name": {
                                        "type": "string",
                                        "description": "Display name.",
                                        "example": "Juan Pérez"
                                    },
                                    "phone_number": {
                                        "type": "string",
                                        "description": "Phone number.",
                                        "example": "+57 300 123 4567",
                                        "nullable": true
                                    },
                                    "marketplace_whatsapp": {
                                        "type": "string",
                                        "description": "WhatsApp for marketplace.",
                                        "example": "+57 300 123 4567",
                                        "nullable": true
                                    },
                                    "marketplace_address": {
                                        "type": "string",
                                        "description": "Address.",
                                        "example": "Calle 123 #45-67",
                                        "nullable": true
                                    },
                                    "marketplace_city": {
                                        "type": "string",
                                        "description": "City.",
                                        "example": "Bogotá",
                                        "nullable": true
                                    },
                                    "marketplace_department": {
                                        "type": "string",
                                        "description": "Department.",
                                        "example": "Cundinamarca",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/marketplace/user/validate-publish": {
            "post": {
                "summary": "Validar si puede publicar",
                "operationId": "validarSiPuedePublicar",
                "description": "Validate if the user can publish in the marketplace.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "as_type",
                        "description": "Type to publish as.",
                        "example": "individual",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Type to publish as.",
                            "example": "individual"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "can_publish": {
                                                    "type": "boolean"
                                                },
                                                "missing_fields": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "can_publish",
                                                "missing_fields"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "can_publish": true,
                                            "missing_fields": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Perfil"
                ]
            }
        },
        "/api/marketplace/user/publish-options": {
            "get": {
                "summary": "Obtener opciones de publicación disponibles",
                "operationId": "obtenerOpcionesDePublicacinDisponibles",
                "description": "Get available publishing options for the user based on their tier.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "available_types": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                },
                                                "limits": {
                                                    "type": "object",
                                                    "properties": []
                                                }
                                            },
                                            "required": [
                                                "available_types",
                                                "limits"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "available_types": [
                                                "individual",
                                                "business"
                                            ],
                                            "limits": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Perfil"
                ]
            }
        },
        "/api/user/modules": {
            "get": {
                "summary": "Obtener módulos disponibles para el usuario autenticado",
                "operationId": "obtenerMdulosDisponiblesParaElUsuarioAutenticado",
                "description": "Get available modules for the authenticated user (used for post-login redirection).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "modules": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "preferred": {
                                                    "type": "object",
                                                    "properties": {
                                                        "module": {
                                                            "type": "string"
                                                        },
                                                        "entity_id": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "module",
                                                        "entity_id"
                                                    ]
                                                },
                                                "has_access": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "modules",
                                                "preferred",
                                                "has_access"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "modules": [],
                                            "preferred": {
                                                "module": "criaderos",
                                                "entity_id": "..."
                                            },
                                            "has_access": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Perfil"
                ]
            }
        },
        "/api/public/subdomain/check/{subdomain}": {
            "get": {
                "summary": "Verificar si un subdomain está disponible",
                "operationId": "verificarSiUnSubdomainEstDisponible",
                "description": "Check if a subdomain is available for use.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "exclude_id",
                        "description": "Organization ID to exclude from check.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Organization ID to exclude from check.",
                            "example": "architecto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "available": {
                                            "type": "boolean"
                                        },
                                        "subdomain": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "available",
                                        "subdomain"
                                    ],
                                    "example": {
                                        "available": true,
                                        "subdomain": "mi-escuela",
                                        "reason": null
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Perfil"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "subdomain",
                    "description": "Subdomain to check.",
                    "example": "mi-escuela",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/public/org/{subdomain}": {
            "get": {
                "summary": "Obtener datos públicos de una organización por subdomain",
                "operationId": "obtenerDatosPblicosDeUnaOrganizacinPorSubdomain",
                "description": "Get public organization data by subdomain (no authentication required).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "subdomain": {
                                                    "type": "string"
                                                },
                                                "public_url": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "subdomain",
                                                "public_url"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "id": "...",
                                            "name": "Mi Escuela",
                                            "subdomain": "mi-escuela",
                                            "public_url": "https://mi-escuela.equinos.co"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Perfil"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "subdomain",
                    "description": "Subdomain.",
                    "example": "mi-escuela",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/organizations/{organizationId}/subdomain": {
            "put": {
                "summary": "Actualizar el subdomain de una organización",
                "operationId": "actualizarElSubdomainDeUnaOrganizacin",
                "description": "Update the subdomain for an organization.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "subdomain": {
                                                    "type": "string"
                                                },
                                                "public_url": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "subdomain",
                                                "public_url"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "subdomain": "mi-escuela",
                                            "public_url": "https://mi-escuela.equinos.co"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Perfil"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "subdomain": {
                                        "type": "string",
                                        "description": "Subdomain (3-63 chars, alphanumeric and hyphens).",
                                        "example": "mi-escuela"
                                    }
                                },
                                "required": [
                                    "subdomain"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "organizationId",
                    "description": "",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "organization_id",
                    "description": "UUID of the organization.",
                    "example": "550e8400-e29b-41d4-a716-446655440018",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/notification-preferences": {
            "get": {
                "summary": "Obtener preferencias del usuario",
                "operationId": "obtenerPreferenciasDelUsuario",
                "description": "Get notification preferences for the authenticated user.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Preferencias"
                ]
            },
            "put": {
                "summary": "Actualizar preferencias del usuario",
                "operationId": "actualizarPreferenciasDelUsuario",
                "description": "Update notification preferences for the authenticated user.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "preferences": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "preferences"
                                    ],
                                    "example": {
                                        "message": "Preferencias actualizadas",
                                        "preferences": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Preferencias"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "orders_web": {
                                        "type": "boolean",
                                        "description": "Enable web notifications for orders.",
                                        "example": true
                                    },
                                    "orders_email": {
                                        "type": "boolean",
                                        "description": "Enable email notifications for orders.",
                                        "example": true
                                    },
                                    "orders_sms": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "orders_push": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "publications_web": {
                                        "type": "boolean",
                                        "description": "Enable web notifications for publications.",
                                        "example": true
                                    },
                                    "publications_email": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "publications_sms": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "publications_push": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "system_web": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "system_email": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "system_sms": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "system_push": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "quiet_hours_start": {
                                        "type": "string",
                                        "description": "Quiet hours start time (H:i).",
                                        "example": "22:00",
                                        "nullable": true
                                    },
                                    "quiet_hours_end": {
                                        "type": "string",
                                        "description": "Quiet hours end time (H:i).",
                                        "example": "08:00",
                                        "nullable": true
                                    },
                                    "email_digest": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "email_digest_time": {
                                        "type": "string",
                                        "description": "Must be a valid date in the format <code>H:i</code>.",
                                        "example": "14:38"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/notification-preferences/reset": {
            "post": {
                "summary": "Restaurar preferencias por defecto",
                "operationId": "restaurarPreferenciasPorDefecto",
                "description": "Reset notification preferences to default values.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "preferences": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "preferences"
                                    ],
                                    "example": {
                                        "message": "Preferencias restauradas a valores por defecto",
                                        "preferences": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "⚙️ Core / Preferencias"
                ]
            }
        },
        "/api/waitlist": {
            "post": {
                "summary": "Registrar en lista de espera",
                "operationId": "registrarEnListaDeEspera",
                "description": "Permite a los usuarios registrarse en la lista de espera de Equinos.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "email",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "¡Registro exitoso! Te contactaremos pronto.",
                                        "data": {
                                            "id": "9d4e5f6a-7b8c-9d0e-1f2a-3b4c5d6e7f8a",
                                            "name": "Juan Pérez",
                                            "email": "juan@example.com",
                                            "status": "pending"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Este email ya está registrado en la lista de espera"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🌐 Público / Waitlist"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre completo del usuario.",
                                        "example": "Juan Pérez"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email del usuario.",
                                        "example": "juan@example.com"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "Rol del usuario (criador, escuela, veterinario, consumidor).",
                                        "example": "criador"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "optional Teléfono del usuario.",
                                        "example": "+57 300 1234567",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "name",
                                    "email",
                                    "role"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/schools/{school_id}/attendance": {
            "get": {
                "summary": "Listar asistencia",
                "operationId": "listarAsistencia",
                "description": "Obtiene la asistencia de estudiantes para una fecha específica.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "date",
                        "description": "Fecha (Y-m-d).",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Fecha (Y-m-d).",
                            "example": "2024-12-31"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "date": {
                                                    "type": "string"
                                                },
                                                "schedules": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "date",
                                                "schedules"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "date": "2024-12-31",
                                            "schedules": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Asistencia"
                ]
            },
            "post": {
                "summary": "Registrar asistencia",
                "operationId": "registrarAsistencia",
                "description": "Registra la asistencia de estudiantes para una clase.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "schedule_id": null,
                                            "student_id": null,
                                            "date": null,
                                            "status": null,
                                            "check_in": null,
                                            "check_out": null,
                                            "notes": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Asistencia"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "date": {
                                        "type": "string",
                                        "description": "Fecha (Y-m-d).",
                                        "example": "2024-12-31"
                                    },
                                    "schedule_id": {
                                        "type": "string",
                                        "description": "UUID del horario.",
                                        "example": "550e8400-e29b-41d4-a716-446655440001"
                                    },
                                    "attendance": {
                                        "type": "array",
                                        "description": "Array de registros de asistencia.",
                                        "example": [
                                            "architecto"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "date",
                                    "schedule_id",
                                    "attendance"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/attendance/{attendance_id}": {
            "put": {
                "summary": "Actualizar asistencia",
                "operationId": "actualizarAsistencia",
                "description": "Actualiza un registro de asistencia existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "schedule_id": null,
                                            "student_id": null,
                                            "date": null,
                                            "status": null,
                                            "check_in": null,
                                            "check_out": null,
                                            "notes": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Asistencia"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (present, absent, late, excused).",
                                        "example": "present"
                                    },
                                    "horse_id": {
                                        "type": "string",
                                        "description": "UUID del caballo asignado.",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "performance_rating": {
                                        "type": "integer",
                                        "description": "Calificación (1-5).",
                                        "example": 4,
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notas adicionales.",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "attendance_id",
                    "description": "The ID of the attendance.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "attendance",
                    "description": "UUID del registro de asistencia.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/attendance/report": {
            "get": {
                "summary": "Reporte de asistencia",
                "operationId": "attendanceReport",
                "description": "Genera un reporte de asistencia para un período.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "start_date",
                        "description": "Fecha inicio (Y-m-d).",
                        "example": "2024-12-01",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Fecha inicio (Y-m-d).",
                            "example": "2024-12-01"
                        }
                    },
                    {
                        "in": "query",
                        "name": "end_date",
                        "description": "Fecha fin (Y-m-d).",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Fecha fin (Y-m-d).",
                            "example": "2024-12-31"
                        }
                    },
                    {
                        "in": "query",
                        "name": "student_id",
                        "description": "Filtrar por estudiante.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por estudiante.",
                            "example": "architecto"
                        }
                    },
                    {
                        "in": "query",
                        "name": "class_id",
                        "description": "Filtrar por clase.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por clase.",
                            "example": "architecto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "period": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start_date": {
                                                            "type": "string"
                                                        },
                                                        "end_date": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "start_date",
                                                        "end_date"
                                                    ]
                                                },
                                                "stats": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "present": {
                                                            "type": "integer"
                                                        },
                                                        "absent": {
                                                            "type": "integer"
                                                        },
                                                        "late": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "present",
                                                        "absent",
                                                        "late"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "period",
                                                "stats"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "period": {
                                                "start_date": "2024-12-01",
                                                "end_date": "2024-12-31"
                                            },
                                            "stats": {
                                                "total": 100,
                                                "present": 85,
                                                "absent": 10,
                                                "late": 5
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Asistencia"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/horses": {
            "get": {
                "summary": "Listar caballos",
                "operationId": "listarCaballos",
                "description": "Obtiene la lista paginada de caballos de una escuela.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filtrar por estado (active, resting, injured, retired).",
                        "example": "active",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por estado (active, resting, injured, retired).",
                            "example": "active"
                        }
                    },
                    {
                        "in": "query",
                        "name": "level",
                        "description": "Filtrar por nivel (beginner, intermediate, advanced, all).",
                        "example": "beginner",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por nivel (beginner, intermediate, advanced, all).",
                            "example": "beginner"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Elementos por página.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Elementos por página.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "school_id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "breed": {
                                                        "type": "string"
                                                    },
                                                    "age": {
                                                        "type": "integer"
                                                    },
                                                    "color": {
                                                        "type": "string"
                                                    },
                                                    "gender": {
                                                        "type": "string"
                                                    },
                                                    "temperament": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": "string"
                                                    },
                                                    "updated_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "school_id",
                                                    "name",
                                                    "breed",
                                                    "age",
                                                    "color",
                                                    "gender",
                                                    "temperament",
                                                    "status",
                                                    "created_at",
                                                    "updated_at"
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": "string"
                                                },
                                                "last": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "to": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "019b25c5-f4b8-7122-99fc-caefd1fe81a8",
                                                "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "name": "Tornado",
                                                "breed": "Paso Fino Colombiano",
                                                "age": 11,
                                                "height_cm": null,
                                                "color": "Moro",
                                                "gender": "female",
                                                "temperament": "Tranquilo, ideal para clases",
                                                "skill_level": null,
                                                "health_status": null,
                                                "photo": null,
                                                "notes": null,
                                                "status": "active",
                                                "created_at": "2025-12-16T06:08:08+00:00",
                                                "updated_at": "2025-12-16T06:08:08+00:00"
                                            },
                                            {
                                                "id": "019b25c5-f4b8-7122-99fc-caefd1fe81a8",
                                                "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "name": "Tornado",
                                                "breed": "Paso Fino Colombiano",
                                                "age": 11,
                                                "height_cm": null,
                                                "color": "Moro",
                                                "gender": "female",
                                                "temperament": "Tranquilo, ideal para clases",
                                                "skill_level": null,
                                                "health_status": null,
                                                "photo": null,
                                                "notes": null,
                                                "status": "active",
                                                "created_at": "2025-12-16T06:08:08+00:00",
                                                "updated_at": "2025-12-16T06:08:08+00:00"
                                            }
                                        ],
                                        "links": {
                                            "first": "/?page=1",
                                            "last": "/?page=1",
                                            "prev": null,
                                            "next": null
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "from": 1,
                                            "last_page": 1,
                                            "links": [
                                                {
                                                    "url": null,
                                                    "label": "&laquo; Previous",
                                                    "page": null,
                                                    "active": false
                                                },
                                                {
                                                    "url": "/?page=1",
                                                    "label": "1",
                                                    "page": 1,
                                                    "active": true
                                                },
                                                {
                                                    "url": null,
                                                    "label": "Next &raquo;",
                                                    "page": null,
                                                    "active": false
                                                }
                                            ],
                                            "path": "/",
                                            "per_page": 20,
                                            "to": 2,
                                            "total": 2
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Caballos"
                ]
            },
            "post": {
                "summary": "Crear caballo",
                "operationId": "crearCaballo",
                "description": "Crea un nuevo caballo para la escuela.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "school_id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "breed": {
                                                    "type": "string"
                                                },
                                                "age": {
                                                    "type": "integer"
                                                },
                                                "color": {
                                                    "type": "string"
                                                },
                                                "gender": {
                                                    "type": "string"
                                                },
                                                "temperament": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": "string"
                                                },
                                                "updated_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "school_id",
                                                "name",
                                                "breed",
                                                "age",
                                                "color",
                                                "gender",
                                                "temperament",
                                                "status",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "019b25c5-f4b8-7122-99fc-caefd1fe81a8",
                                            "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                            "name": "Tornado",
                                            "breed": "Paso Fino Colombiano",
                                            "age": 11,
                                            "height_cm": null,
                                            "color": "Moro",
                                            "gender": "female",
                                            "temperament": "Tranquilo, ideal para clases",
                                            "skill_level": null,
                                            "health_status": null,
                                            "photo": null,
                                            "notes": null,
                                            "status": "active",
                                            "created_at": "2025-12-16T06:08:08+00:00",
                                            "updated_at": "2025-12-16T06:08:08+00:00"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "breed": {
                                                    "type": "string"
                                                },
                                                "age": {
                                                    "type": "integer"
                                                },
                                                "gender": {
                                                    "type": "string"
                                                },
                                                "level": {
                                                    "type": "string"
                                                },
                                                "max_classes_per_day": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "breed",
                                                "age",
                                                "gender",
                                                "level",
                                                "max_classes_per_day"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "550e8400-e29b-41d4-a716-446655440001",
                                            "name": "Tornado",
                                            "breed": "Pura Sangre",
                                            "age": 8,
                                            "gender": "male",
                                            "level": "intermediate",
                                            "max_classes_per_day": 4
                                        },
                                        "message": "Caballo creado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "name": [
                                                "El campo nombre es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Caballos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre del caballo.",
                                        "example": "Tornado"
                                    },
                                    "breed": {
                                        "type": "string",
                                        "description": "Raza.",
                                        "example": "Pura Sangre",
                                        "nullable": true
                                    },
                                    "age": {
                                        "type": "integer",
                                        "description": "Edad.",
                                        "example": 8,
                                        "nullable": true
                                    },
                                    "gender": {
                                        "type": "string",
                                        "description": "Género (male, female).",
                                        "example": "male",
                                        "nullable": true
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "z",
                                        "nullable": true
                                    },
                                    "height": {
                                        "type": "number",
                                        "description": "Must be at least 0. Must not be greater than 3.",
                                        "example": 3,
                                        "nullable": true
                                    },
                                    "level": {
                                        "type": "string",
                                        "description": "Nivel (beginner, intermediate, advanced, all).",
                                        "example": "intermediate",
                                        "nullable": true
                                    },
                                    "specialties": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "temperament": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "max_classes_per_day": {
                                        "type": "integer",
                                        "description": "Máximo de clases por día.",
                                        "example": 4,
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/horses/{horse_id}": {
            "get": {
                "summary": "Obtener caballo",
                "operationId": "obtenerCaballo",
                "description": "Obtiene los detalles de un caballo específico.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "school_id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "breed": {
                                                    "type": "string"
                                                },
                                                "age": {
                                                    "type": "integer"
                                                },
                                                "color": {
                                                    "type": "string"
                                                },
                                                "gender": {
                                                    "type": "string"
                                                },
                                                "temperament": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": "string"
                                                },
                                                "updated_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "school_id",
                                                "name",
                                                "breed",
                                                "age",
                                                "color",
                                                "gender",
                                                "temperament",
                                                "status",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "019b25c5-f4b8-7122-99fc-caefd1fe81a8",
                                            "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                            "name": "Tornado",
                                            "breed": "Paso Fino Colombiano",
                                            "age": 11,
                                            "height_cm": null,
                                            "color": "Moro",
                                            "gender": "female",
                                            "temperament": "Tranquilo, ideal para clases",
                                            "skill_level": null,
                                            "health_status": null,
                                            "photo": null,
                                            "notes": null,
                                            "status": "active",
                                            "created_at": "2025-12-16T06:08:08+00:00",
                                            "updated_at": "2025-12-16T06:08:08+00:00"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Caballos"
                ]
            },
            "put": {
                "summary": "Actualizar caballo",
                "operationId": "actualizarCaballo",
                "description": "Actualiza los datos de un caballo existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "max_classes_per_day": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "status",
                                                "max_classes_per_day"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "550e8400-e29b-41d4-a716-446655440001",
                                            "name": "Tornado",
                                            "status": "active",
                                            "max_classes_per_day": 4
                                        },
                                        "message": "Caballo actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Caballo no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "status": [
                                                "El estado seleccionado no es válido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Caballos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre del caballo.",
                                        "example": "Tornado"
                                    },
                                    "breed": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "age": {
                                        "type": "integer",
                                        "description": "Must be at least 0.",
                                        "example": 84,
                                        "nullable": true
                                    },
                                    "gender": {
                                        "type": "string",
                                        "description": "",
                                        "example": "male",
                                        "enum": [
                                            "male",
                                            "female"
                                        ],
                                        "nullable": true
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "z",
                                        "nullable": true
                                    },
                                    "height": {
                                        "type": "number",
                                        "description": "Must be at least 0. Must not be greater than 3.",
                                        "example": 3,
                                        "nullable": true
                                    },
                                    "photo": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "level": {
                                        "type": "string",
                                        "description": "",
                                        "example": "all",
                                        "enum": [
                                            "beginner",
                                            "intermediate",
                                            "advanced",
                                            "all"
                                        ],
                                        "nullable": true
                                    },
                                    "specialties": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "temperament": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "y",
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (active, resting, injured, retired).",
                                        "example": "active"
                                    },
                                    "max_classes_per_day": {
                                        "type": "integer",
                                        "description": "Máximo de clases por día.",
                                        "example": 4,
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar caballo",
                "operationId": "eliminarCaballo",
                "description": "Elimina un caballo de la escuela.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Caballo eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Caballos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse_id",
                    "description": "The ID of the horse.",
                    "example": "019b25c5-f4b8-7122-99fc-caefd1fe81a8",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID del caballo.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/horses/{horse_id}/usage": {
            "get": {
                "summary": "Uso del caballo",
                "operationId": "usoDelCaballo",
                "description": "Obtiene el uso de un caballo en una fecha específica.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "date",
                        "description": "Fecha (Y-m-d).",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Fecha (Y-m-d).",
                            "example": "2024-12-31"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "horse": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name"
                                                    ]
                                                },
                                                "usage": {
                                                    "type": "object",
                                                    "properties": {
                                                        "date": {
                                                            "type": "string"
                                                        },
                                                        "classes_today": {
                                                            "type": "integer"
                                                        },
                                                        "available_slots": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "date",
                                                        "classes_today",
                                                        "available_slots"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "horse",
                                                "usage"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "horse": {
                                                "id": "...",
                                                "name": "Tornado"
                                            },
                                            "usage": {
                                                "date": "2024-12-31",
                                                "classes_today": 3,
                                                "available_slots": 1
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Caballos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse_id",
                    "description": "The ID of the horse.",
                    "example": "019b25c5-f4b8-7122-99fc-caefd1fe81a8",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID del caballo.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/certificates": {
            "get": {
                "summary": "Lista los certificados de una escuela",
                "operationId": "listaLosCertificadosDeUnaEscuela",
                "description": "Obtiene la lista paginada de certificados emitidos por una escuela.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "type",
                        "description": "Filtrar por tipo.",
                        "example": "level_completion",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por tipo.",
                            "example": "level_completion"
                        }
                    },
                    {
                        "in": "query",
                        "name": "student_id",
                        "description": "Filtrar por estudiante.",
                        "example": "550e8400-e29b-41d4-a716-446655440002",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por estudiante.",
                            "example": "550e8400-e29b-41d4-a716-446655440002"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Elementos por página.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Elementos por página.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [],
                                        "meta": {
                                            "current_page": 1,
                                            "total": 50
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Certificados"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/certificates": {
            "get": {
                "summary": "Lista los certificados de un estudiante",
                "operationId": "listaLosCertificadosDeUnEstudiante",
                "description": "Obtiene todos los certificados de un estudiante específico.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Certificados"
                ]
            },
            "post": {
                "summary": "Crea un nuevo certificado",
                "operationId": "creaUnNuevoCertificado",
                "description": "Emite un nuevo certificado para un estudiante.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Certificado emitido exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Certificados"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "Tipo (level_completion, course_completion, achievement, participation).",
                                        "example": "level_completion"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Título del certificado.",
                                        "example": "Certificado de Nivel Intermedio"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "skill_level_id": {
                                        "type": "string",
                                        "description": "UUID del nivel de habilidad.",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "competition_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the schools_competitions table.",
                                        "example": "add3503c-ebff-3875-93af-b8c6a695762b",
                                        "nullable": true
                                    },
                                    "expires_at": {
                                        "type": "date",
                                        "description": "Fecha de expiración.",
                                        "example": "2026-12-31",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "type",
                                    "title"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/certificates/{certificate_id}": {
            "get": {
                "summary": "Obtiene un certificado específico",
                "operationId": "obtieneUnCertificadoEspecfico",
                "description": "Obtiene los detalles completos de un certificado.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Certificados"
                ]
            },
            "delete": {
                "summary": "Elimina un certificado",
                "operationId": "eliminaUnCertificado",
                "description": "Elimina un certificado de la escuela.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Certificado eliminado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Certificados"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "certificate_id",
                    "description": "The ID of the certificate.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "certificate",
                    "description": "UUID del certificado.",
                    "example": "550e8400-e29b-41d4-a716-446655440003",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/certificates/{certificate_id}/download": {
            "get": {
                "summary": "Descarga el PDF del certificado",
                "operationId": "descargaElPDFDelCertificado",
                "description": "Descarga el certificado en formato PDF.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "application/pdf"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Certificados"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "certificate_id",
                    "description": "The ID of the certificate.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "certificate",
                    "description": "UUID del certificado.",
                    "example": "550e8400-e29b-41d4-a716-446655440003",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/certificates/{certificate_id}/preview": {
            "get": {
                "summary": "Genera preview del certificado (sin descargar)",
                "operationId": "generaPreviewDelCertificadosinDescargar",
                "description": "Muestra una vista previa del certificado en el navegador.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "application/pdf"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Certificados"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "certificate_id",
                    "description": "The ID of the certificate.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "certificate",
                    "description": "UUID del certificado.",
                    "example": "550e8400-e29b-41d4-a716-446655440003",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/certificates/verify/{code}": {
            "get": {
                "summary": "Verificación pública de certificado",
                "operationId": "verificacinPblicaDeCertificado",
                "description": "Verifica un certificado usando su código de verificación (público, no requiere autenticación).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "valid": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "title": {
                                                    "type": "string"
                                                },
                                                "student": {
                                                    "type": "string"
                                                },
                                                "school": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "title",
                                                "student",
                                                "school"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "valid",
                                        "data"
                                    ],
                                    "example": {
                                        "valid": true,
                                        "data": {
                                            "title": "Certificado de Nivel Intermedio",
                                            "student": "Juan Pérez",
                                            "school": "Escuela El Refugio"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Certificados"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "code",
                    "description": "Código de verificación del certificado.",
                    "example": "ABC123XYZ",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/classes": {
            "get": {
                "summary": "List classes",
                "operationId": "listClasses",
                "description": "Get list of class types for a school.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "type",
                        "description": "Filter by type (individual, group).",
                        "example": "group",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by type (individual, group).",
                            "example": "group"
                        }
                    },
                    {
                        "in": "query",
                        "name": "level",
                        "description": "Filter by level (beginner, intermediate, advanced).",
                        "example": "beginner",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by level (beginner, intermediate, advanced).",
                            "example": "beginner"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "school_id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "description": {
                                                        "type": "string"
                                                    },
                                                    "level": {
                                                        "type": "string"
                                                    },
                                                    "duration_minutes": {
                                                        "type": "integer"
                                                    },
                                                    "price": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": "string"
                                                    },
                                                    "updated_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "school_id",
                                                    "name",
                                                    "description",
                                                    "level",
                                                    "duration_minutes",
                                                    "price",
                                                    "status",
                                                    "created_at",
                                                    "updated_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "019b25c5-f97f-7299-a3cc-8730f4b22185",
                                                "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "name": "Chalanería Básica",
                                                "description": "Clase de Chalanería Básica para estudiantes de nivel beginner",
                                                "level": "beginner",
                                                "capacity": null,
                                                "duration_minutes": 60,
                                                "price": "80000.00",
                                                "currency": null,
                                                "status": "active",
                                                "created_at": "2025-12-16T06:08:10+00:00",
                                                "updated_at": "2025-12-16T06:08:10+00:00"
                                            },
                                            {
                                                "id": "019b25c5-f97f-7299-a3cc-8730f4b22185",
                                                "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "name": "Chalanería Básica",
                                                "description": "Clase de Chalanería Básica para estudiantes de nivel beginner",
                                                "level": "beginner",
                                                "capacity": null,
                                                "duration_minutes": 60,
                                                "price": "80000.00",
                                                "currency": null,
                                                "status": "active",
                                                "created_at": "2025-12-16T06:08:10+00:00",
                                                "updated_at": "2025-12-16T06:08:10+00:00"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Clases"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID of the school.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/classes/{class_id}": {
            "get": {
                "summary": "",
                "operationId": "getApiSchoolsSchool_idClassesClass_id",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "schedules": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "enrollments_count": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "schedules",
                                                "enrollments_count"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Clase de Salto Nivel 1",
                                            "schedules": [],
                                            "enrollments_count": 10
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Clase no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Clases"
                ]
            },
            "put": {
                "summary": "Actualizar clase",
                "operationId": "actualizarClase",
                "description": "Actualiza los datos de una clase existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "550e8400-e29b-41d4-a716-446655440001",
                                            "name": "Clase de Salto Nivel 2",
                                            "status": "active"
                                        },
                                        "message": "Clase actualizada exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Clase no encontrada"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "max_students": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "max_students"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "max_students": [
                                                "El máximo de estudiantes debe ser mayor a 0"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Clases"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre de la clase.",
                                        "example": "Clase de Salto Nivel 2"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "group",
                                        "enum": [
                                            "individual",
                                            "group"
                                        ]
                                    },
                                    "level": {
                                        "type": "string",
                                        "description": "",
                                        "example": "professional",
                                        "enum": [
                                            "beginner",
                                            "intermediate",
                                            "advanced",
                                            "professional"
                                        ]
                                    },
                                    "discipline": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "v",
                                        "nullable": true
                                    },
                                    "max_students": {
                                        "type": "integer",
                                        "description": "Must be at least 1. Must not be greater than 50.",
                                        "example": 1
                                    },
                                    "duration_minutes": {
                                        "type": "integer",
                                        "description": "Must be at least 15. Must not be greater than 240.",
                                        "example": 5
                                    },
                                    "price": {
                                        "type": "number",
                                        "description": "Must be at least 0.",
                                        "example": 9,
                                        "nullable": true
                                    },
                                    "price_type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "package",
                                        "enum": [
                                            "per_class",
                                            "monthly",
                                            "package"
                                        ],
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (active, inactive).",
                                        "example": "active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar clase",
                "operationId": "eliminarClase",
                "description": "Elimina una clase de la escuela.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Clase eliminada exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Clase no encontrada"
                                    }
                                }
                            }
                        }
                    },
                    "409": {
                        "description": "conflict",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "No se puede eliminar, tiene horarios asignados"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Clases"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "class_id",
                    "description": "The ID of the class.",
                    "example": "019b25c5-f97f-7299-a3cc-8730f4b22185",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/competitions": {
            "get": {
                "summary": "Listar competiciones",
                "operationId": "listarCompeticiones",
                "description": "Obtiene la lista paginada de competiciones de una escuela.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filtrar por estado (upcoming, ongoing, completed, cancelled).",
                        "example": "upcoming",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por estado (upcoming, ongoing, completed, cancelled).",
                            "example": "upcoming"
                        }
                    },
                    {
                        "in": "query",
                        "name": "type",
                        "description": "Filtrar por tipo.",
                        "example": "dressage",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por tipo.",
                            "example": "dressage"
                        }
                    },
                    {
                        "in": "query",
                        "name": "search",
                        "description": "Buscar por nombre o ubicación.",
                        "example": "Nacional",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Buscar por nombre o ubicación.",
                            "example": "Nacional"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Elementos por página.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Elementos por página.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": []
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": "string"
                                                },
                                                "last": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "to": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": null,
                                                "school_id": null,
                                                "name": null,
                                                "description": null,
                                                "date": null,
                                                "location": null,
                                                "categories": null,
                                                "status": null,
                                                "created_at": null,
                                                "updated_at": null
                                            },
                                            {
                                                "id": null,
                                                "school_id": null,
                                                "name": null,
                                                "description": null,
                                                "date": null,
                                                "location": null,
                                                "categories": null,
                                                "status": null,
                                                "created_at": null,
                                                "updated_at": null
                                            }
                                        ],
                                        "links": {
                                            "first": "/?page=1",
                                            "last": "/?page=1",
                                            "prev": null,
                                            "next": null
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "from": 1,
                                            "last_page": 1,
                                            "links": [
                                                {
                                                    "url": null,
                                                    "label": "&laquo; Previous",
                                                    "page": null,
                                                    "active": false
                                                },
                                                {
                                                    "url": "/?page=1",
                                                    "label": "1",
                                                    "page": 1,
                                                    "active": true
                                                },
                                                {
                                                    "url": null,
                                                    "label": "Next &raquo;",
                                                    "page": null,
                                                    "active": false
                                                }
                                            ],
                                            "path": "/",
                                            "per_page": 20,
                                            "to": 2,
                                            "total": 2
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Competiciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/competitions/{competition_id}": {
            "get": {
                "summary": "Obtener competición",
                "operationId": "obtenerCompeticin",
                "description": "Obtiene los detalles de una competición específica.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "school_id": null,
                                            "name": null,
                                            "description": null,
                                            "date": null,
                                            "location": null,
                                            "categories": null,
                                            "status": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Competiciones"
                ]
            },
            "put": {
                "summary": "Actualizar competición",
                "operationId": "actualizarCompeticin",
                "description": "Actualiza los datos de una competición existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "school_id": null,
                                            "name": null,
                                            "description": null,
                                            "date": null,
                                            "location": null,
                                            "categories": null,
                                            "status": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Competiciones"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre de la competición.",
                                        "example": "Campeonato Nacional"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "n"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:06"
                                    },
                                    "location": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "g",
                                        "nullable": true
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (upcoming, ongoing, completed, cancelled).",
                                        "example": "completed"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar competición",
                "operationId": "eliminarCompeticin",
                "description": "Elimina una competición de la escuela.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Competición eliminada exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Competición no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Competiciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "competition_id",
                    "description": "The ID of the competition.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "competition",
                    "description": "UUID de la competición.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/competitions/{competition_id}/results": {
            "get": {
                "summary": "Obtener resultados de una competición",
                "operationId": "obtenerResultadosDeUnaCompeticin",
                "description": "Obtiene todos los resultados de una competición.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "student_id": {
                                                        "type": "string"
                                                    },
                                                    "position": {
                                                        "type": "integer"
                                                    },
                                                    "score": {
                                                        "type": "number"
                                                    },
                                                    "student": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "full_name": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "full_name"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "student_id",
                                                    "position",
                                                    "score",
                                                    "student"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "student_id": "...",
                                                "position": 1,
                                                "score": 95.5,
                                                "student": {
                                                    "id": "...",
                                                    "full_name": "Juan Pérez"
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Competiciones"
                ]
            },
            "post": {
                "summary": "Agregar resultado a una competición",
                "operationId": "agregarResultadoAUnaCompeticin",
                "description": "Agrega un resultado de estudiante a una competición.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "student_id": {
                                                    "type": "string"
                                                },
                                                "position": {
                                                    "type": "integer"
                                                },
                                                "score": {
                                                    "type": "number"
                                                },
                                                "student": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "full_name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "full_name"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "student_id",
                                                "position",
                                                "score",
                                                "student"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "student_id": "...",
                                            "position": 1,
                                            "score": 95.5,
                                            "student": {
                                                "id": "...",
                                                "full_name": "Juan Pérez"
                                            }
                                        },
                                        "message": "Resultado agregado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "student_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "student_id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "student_id": [
                                                "El estudiante no existe"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Competiciones"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "student_id": {
                                        "type": "string",
                                        "description": "UUID del estudiante.",
                                        "example": "550e8400-e29b-41d4-a716-446655440002"
                                    },
                                    "position": {
                                        "type": "integer",
                                        "description": "Posición en la competición.",
                                        "example": 1,
                                        "nullable": true
                                    },
                                    "score": {
                                        "type": "number",
                                        "description": "Puntuación.",
                                        "example": 95.5,
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notas adicionales.",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "student_id"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "competition_id",
                    "description": "The ID of the competition.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "competition",
                    "description": "UUID de la competición.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/dashboard": {
            "get": {
                "summary": "Dashboard de la escuela",
                "operationId": "dashboardDeLaEscuela",
                "description": "Obtiene estadísticas generales, datos del día y finanzas.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "stats": {
                                                    "type": "object",
                                                    "properties": {
                                                        "students": {
                                                            "type": "object",
                                                            "properties": {
                                                                "total": {
                                                                    "type": "integer"
                                                                },
                                                                "active": {
                                                                    "type": "integer"
                                                                }
                                                            },
                                                            "required": [
                                                                "total",
                                                                "active"
                                                            ]
                                                        },
                                                        "instructors": {
                                                            "type": "object",
                                                            "properties": {
                                                                "total": {
                                                                    "type": "integer"
                                                                },
                                                                "active": {
                                                                    "type": "integer"
                                                                }
                                                            },
                                                            "required": [
                                                                "total",
                                                                "active"
                                                            ]
                                                        },
                                                        "horses": {
                                                            "type": "object",
                                                            "properties": {
                                                                "total": {
                                                                    "type": "integer"
                                                                },
                                                                "active": {
                                                                    "type": "integer"
                                                                }
                                                            },
                                                            "required": [
                                                                "total",
                                                                "active"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "students",
                                                        "instructors",
                                                        "horses"
                                                    ]
                                                },
                                                "today": {
                                                    "type": "object",
                                                    "properties": {
                                                        "classes_count": {
                                                            "type": "integer"
                                                        },
                                                        "students_expected": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "classes_count",
                                                        "students_expected"
                                                    ]
                                                },
                                                "finances": {
                                                    "type": "object",
                                                    "properties": {
                                                        "month_income": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "month_income"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "stats",
                                                "today",
                                                "finances"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "stats": {
                                                "students": {
                                                    "total": 50,
                                                    "active": 45
                                                },
                                                "instructors": {
                                                    "total": 5,
                                                    "active": 5
                                                },
                                                "horses": {
                                                    "total": 12,
                                                    "active": 10
                                                }
                                            },
                                            "today": {
                                                "classes_count": 8,
                                                "students_expected": 32
                                            },
                                            "finances": {
                                                "month_income": 5000000
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Dashboard"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/dashboard/today-classes": {
            "get": {
                "summary": "",
                "operationId": "getApiSchoolsSchool_idDashboardTodayClasses",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "class_name": {
                                                        "type": "string"
                                                    },
                                                    "start_time": {
                                                        "type": "string"
                                                    },
                                                    "instructor": {
                                                        "type": "string"
                                                    },
                                                    "enrolled_count": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "class_name",
                                                    "start_time",
                                                    "instructor",
                                                    "enrolled_count"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "class_name": "Clase de Salto Nivel 1",
                                                "start_time": "09:00",
                                                "instructor": "María García",
                                                "enrolled_count": 5
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Escuela no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Dashboard"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/dashboard/upcoming-payments": {
            "get": {
                "summary": "",
                "operationId": "getApiSchoolsSchool_idDashboardUpcomingPayments",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "student": {
                                                        "type": "object",
                                                        "properties": {
                                                            "name": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "name"
                                                        ]
                                                    },
                                                    "amount": {
                                                        "type": "integer"
                                                    },
                                                    "due_date": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "student",
                                                    "amount",
                                                    "due_date"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "student": {
                                                    "name": "Juan Pérez"
                                                },
                                                "amount": 500000,
                                                "due_date": "2025-01-15"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Escuela no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Dashboard"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students": {
            "get": {
                "summary": "Listar estudiantes",
                "operationId": "listarEstudiantes",
                "description": "Obtiene la lista paginada de estudiantes de una escuela.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "search",
                        "description": "Buscar por nombre.",
                        "example": "Juan",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Buscar por nombre.",
                            "example": "Juan"
                        }
                    },
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filtrar por estado (active, inactive).",
                        "example": "active",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por estado (active, inactive).",
                            "example": "active"
                        }
                    },
                    {
                        "in": "query",
                        "name": "level",
                        "description": "Filtrar por nivel (beginner, intermediate, advanced).",
                        "example": "intermediate",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por nivel (beginner, intermediate, advanced).",
                            "example": "intermediate"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Elementos por página.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Elementos por página.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "school_id": {
                                                        "type": "string"
                                                    },
                                                    "code": {
                                                        "type": "string"
                                                    },
                                                    "first_name": {
                                                        "type": "string"
                                                    },
                                                    "last_name": {
                                                        "type": "string"
                                                    },
                                                    "full_name": {
                                                        "type": "string"
                                                    },
                                                    "birth_date": {
                                                        "type": "string"
                                                    },
                                                    "age": {
                                                        "type": "integer"
                                                    },
                                                    "gender": {
                                                        "type": "string"
                                                    },
                                                    "phone": {
                                                        "type": "string"
                                                    },
                                                    "email": {
                                                        "type": "string"
                                                    },
                                                    "emergency_contact": {
                                                        "type": "object",
                                                        "properties": {
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "phone": {
                                                                "type": "string"
                                                            },
                                                            "relationship": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "name",
                                                            "phone",
                                                            "relationship"
                                                        ]
                                                    },
                                                    "level": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "enrollment_date": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": "string"
                                                    },
                                                    "updated_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "school_id",
                                                    "code",
                                                    "first_name",
                                                    "last_name",
                                                    "full_name",
                                                    "birth_date",
                                                    "age",
                                                    "gender",
                                                    "phone",
                                                    "email",
                                                    "emergency_contact",
                                                    "level",
                                                    "status",
                                                    "enrollment_date",
                                                    "created_at",
                                                    "updated_at"
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": "string"
                                                },
                                                "last": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "to": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "019b25c6-0536-70db-8ddd-de8445e18870",
                                                "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "user_id": null,
                                                "code": "EST-0001",
                                                "first_name": "Ana María",
                                                "last_name": "López",
                                                "full_name": "Ana María López",
                                                "birth_date": "2002-12-20",
                                                "age": 23,
                                                "gender": "male",
                                                "document_type": null,
                                                "document_number": null,
                                                "phone": "+57 300 4237384",
                                                "email": "ana-maria.lopez@email.com",
                                                "address": null,
                                                "emergency_contact": {
                                                    "name": "Contacto de Ana María",
                                                    "phone": "+57 300 1200440",
                                                    "relationship": "Padre/Madre"
                                                },
                                                "medical_info": null,
                                                "photo": null,
                                                "level": "intermediate",
                                                "status": "active",
                                                "enrollment_date": "2024-09-16",
                                                "notes": null,
                                                "created_at": "2025-12-16T06:08:13+00:00",
                                                "updated_at": "2025-12-16T06:08:13+00:00"
                                            },
                                            {
                                                "id": "019b25c6-0536-70db-8ddd-de8445e18870",
                                                "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "user_id": null,
                                                "code": "EST-0001",
                                                "first_name": "Ana María",
                                                "last_name": "López",
                                                "full_name": "Ana María López",
                                                "birth_date": "2002-12-20",
                                                "age": 23,
                                                "gender": "male",
                                                "document_type": null,
                                                "document_number": null,
                                                "phone": "+57 300 4237384",
                                                "email": "ana-maria.lopez@email.com",
                                                "address": null,
                                                "emergency_contact": {
                                                    "name": "Contacto de Ana María",
                                                    "phone": "+57 300 1200440",
                                                    "relationship": "Padre/Madre"
                                                },
                                                "medical_info": null,
                                                "photo": null,
                                                "level": "intermediate",
                                                "status": "active",
                                                "enrollment_date": "2024-09-16",
                                                "notes": null,
                                                "created_at": "2025-12-16T06:08:13+00:00",
                                                "updated_at": "2025-12-16T06:08:13+00:00"
                                            }
                                        ],
                                        "links": {
                                            "first": "/?page=1",
                                            "last": "/?page=1",
                                            "prev": null,
                                            "next": null
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "from": 1,
                                            "last_page": 1,
                                            "links": [
                                                {
                                                    "url": null,
                                                    "label": "&laquo; Previous",
                                                    "page": null,
                                                    "active": false
                                                },
                                                {
                                                    "url": "/?page=1",
                                                    "label": "1",
                                                    "page": 1,
                                                    "active": true
                                                },
                                                {
                                                    "url": null,
                                                    "label": "Next &raquo;",
                                                    "page": null,
                                                    "active": false
                                                }
                                            ],
                                            "path": "/",
                                            "per_page": 20,
                                            "to": 2,
                                            "total": 2
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Estudiantes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}": {
            "get": {
                "summary": "Obtener estudiante",
                "operationId": "obtenerEstudiante",
                "description": "Obtiene los detalles de un estudiante específico.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "first_name": {
                                                    "type": "string"
                                                },
                                                "last_name": {
                                                    "type": "string"
                                                },
                                                "enrollments": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "first_name",
                                                "last_name",
                                                "enrollments"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "first_name": "Juan",
                                            "last_name": "Pérez",
                                            "enrollments": []
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Estudiante no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Estudiantes"
                ]
            },
            "put": {
                "summary": "Actualizar estudiante",
                "operationId": "actualizarEstudiante",
                "description": "Actualiza los datos de un estudiante existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "school_id": {
                                                    "type": "string"
                                                },
                                                "code": {
                                                    "type": "string"
                                                },
                                                "first_name": {
                                                    "type": "string"
                                                },
                                                "last_name": {
                                                    "type": "string"
                                                },
                                                "full_name": {
                                                    "type": "string"
                                                },
                                                "birth_date": {
                                                    "type": "string"
                                                },
                                                "age": {
                                                    "type": "integer"
                                                },
                                                "gender": {
                                                    "type": "string"
                                                },
                                                "phone": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "emergency_contact": {
                                                    "type": "object",
                                                    "properties": {
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "phone": {
                                                            "type": "string"
                                                        },
                                                        "relationship": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "name",
                                                        "phone",
                                                        "relationship"
                                                    ]
                                                },
                                                "level": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "enrollment_date": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": "string"
                                                },
                                                "updated_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "school_id",
                                                "code",
                                                "first_name",
                                                "last_name",
                                                "full_name",
                                                "birth_date",
                                                "age",
                                                "gender",
                                                "phone",
                                                "email",
                                                "emergency_contact",
                                                "level",
                                                "status",
                                                "enrollment_date",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "019b25c6-0536-70db-8ddd-de8445e18870",
                                            "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                            "user_id": null,
                                            "code": "EST-0001",
                                            "first_name": "Ana María",
                                            "last_name": "López",
                                            "full_name": "Ana María López",
                                            "birth_date": "2002-12-20",
                                            "age": 23,
                                            "gender": "male",
                                            "document_type": null,
                                            "document_number": null,
                                            "phone": "+57 300 4237384",
                                            "email": "ana-maria.lopez@email.com",
                                            "address": null,
                                            "emergency_contact": {
                                                "name": "Contacto de Ana María",
                                                "phone": "+57 300 1200440",
                                                "relationship": "Padre/Madre"
                                            },
                                            "medical_info": null,
                                            "photo": null,
                                            "level": "intermediate",
                                            "status": "active",
                                            "enrollment_date": "2024-09-16",
                                            "notes": null,
                                            "created_at": "2025-12-16T06:08:13+00:00",
                                            "updated_at": "2025-12-16T06:08:13+00:00"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Estudiantes"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "Nombre del estudiante.",
                                        "example": "Juan"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Apellido del estudiante.",
                                        "example": "Pérez"
                                    },
                                    "birth_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:38:45",
                                        "nullable": true
                                    },
                                    "gender": {
                                        "type": "string",
                                        "description": "",
                                        "example": "female",
                                        "enum": [
                                            "male",
                                            "female",
                                            "other"
                                        ],
                                        "nullable": true
                                    },
                                    "document_type": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "gzmiyvdljnikhway",
                                        "nullable": true
                                    },
                                    "document_number": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "k",
                                        "nullable": true
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "c",
                                        "nullable": true
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 255 characters.",
                                        "example": "antonio24@example.net",
                                        "nullable": true
                                    },
                                    "address": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "emergency_contact": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "medical_info": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "photo": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "w",
                                        "nullable": true
                                    },
                                    "level": {
                                        "type": "string",
                                        "description": "",
                                        "example": "intermediate",
                                        "enum": [
                                            "beginner",
                                            "intermediate",
                                            "advanced",
                                            "professional"
                                        ],
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (active, inactive, suspended).",
                                        "example": "active"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar estudiante",
                "operationId": "eliminarEstudiante",
                "description": "Elimina un estudiante de la escuela.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Estudiante eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Estudiantes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/credentials": {
            "get": {
                "summary": "Check if student has portal credentials",
                "operationId": "checkIfStudentHasPortalCredentials",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "has_credentials": {
                                                    "type": "boolean"
                                                },
                                                "has_email": {
                                                    "type": "boolean"
                                                },
                                                "email": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "has_credentials",
                                                "has_email",
                                                "email"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "has_credentials": true,
                                            "has_email": true,
                                            "email": "estudiante@example.com"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Estudiante no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Estudiantes"
                ]
            },
            "post": {
                "summary": "Create or reset student credentials for portal access",
                "operationId": "createOrResetStudentCredentialsForPortalAccess",
                "description": "Crea o restablece las credenciales de acceso al portal para un estudiante.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "has_credentials": {
                                                    "type": "boolean"
                                                },
                                                "email": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "has_credentials",
                                                "email"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Contraseña actualizada exitosamente",
                                        "data": {
                                            "has_credentials": true,
                                            "email": "estudiante@example.com"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "no email",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "El estudiante debe tener un email registrado para crear credenciales"
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Error al gestionar credenciales: ..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Estudiantes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "password": {
                                        "type": "string",
                                        "description": "Contraseña (mínimo 6 caracteres).",
                                        "example": "password123"
                                    },
                                    "send_email": {
                                        "type": "boolean",
                                        "description": "Enviar email con credenciales.",
                                        "example": true
                                    }
                                },
                                "required": [
                                    "password"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools": {
            "get": {
                "summary": "Listar escuelas del usuario",
                "operationId": "listarEscuelasDelUsuario",
                "description": "Obtiene todas las escuelas a las que el usuario tiene acceso.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "organization_id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "slug": {
                                                        "type": "string"
                                                    },
                                                    "description": {
                                                        "type": "string"
                                                    },
                                                    "address": {
                                                        "type": "object",
                                                        "properties": {
                                                            "city": {
                                                                "type": "string"
                                                            },
                                                            "street": {
                                                                "type": "string"
                                                            },
                                                            "country": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "city",
                                                            "street",
                                                            "country"
                                                        ]
                                                    },
                                                    "phone": {
                                                        "type": "string"
                                                    },
                                                    "email": {
                                                        "type": "string"
                                                    },
                                                    "settings": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object"
                                                        }
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": "string"
                                                    },
                                                    "updated_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "organization_id",
                                                    "name",
                                                    "slug",
                                                    "description",
                                                    "address",
                                                    "phone",
                                                    "email",
                                                    "settings",
                                                    "status",
                                                    "created_at",
                                                    "updated_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "organization_id": "0199d51e-d220-7347-843b-226c20f74ecc",
                                                "name": "Criadero La Perlina",
                                                "slug": "escuela-chalaneria-el-paso",
                                                "description": "Criaderio Prueba",
                                                "logo": null,
                                                "address": {
                                                    "city": "Medellin",
                                                    "street": "cll 123",
                                                    "country": "Colombia",
                                                    "department": null
                                                },
                                                "phone": "3145678943",
                                                "email": "laperlina@gmail.com",
                                                "website": null,
                                                "social_media": null,
                                                "settings": [],
                                                "status": "active",
                                                "created_at": "2025-12-16T06:08:07+00:00",
                                                "updated_at": "2025-12-24T04:50:23+00:00"
                                            },
                                            {
                                                "id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "organization_id": "0199d51e-d220-7347-843b-226c20f74ecc",
                                                "name": "Criadero La Perlina",
                                                "slug": "escuela-chalaneria-el-paso",
                                                "description": "Criaderio Prueba",
                                                "logo": null,
                                                "address": {
                                                    "city": "Medellin",
                                                    "street": "cll 123",
                                                    "country": "Colombia",
                                                    "department": null
                                                },
                                                "phone": "3145678943",
                                                "email": "laperlina@gmail.com",
                                                "website": null,
                                                "social_media": null,
                                                "settings": [],
                                                "status": "active",
                                                "created_at": "2025-12-16T06:08:07+00:00",
                                                "updated_at": "2025-12-24T04:50:23+00:00"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Gestión"
                ]
            }
        },
        "/api/schools/{school_id}": {
            "get": {
                "summary": "Obtener escuela",
                "operationId": "obtenerEscuela",
                "description": "Obtiene los detalles de una escuela específica.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "organization_id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "slug": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": "string"
                                                },
                                                "address": {
                                                    "type": "object",
                                                    "properties": {
                                                        "city": {
                                                            "type": "string"
                                                        },
                                                        "street": {
                                                            "type": "string"
                                                        },
                                                        "country": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "city",
                                                        "street",
                                                        "country"
                                                    ]
                                                },
                                                "phone": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "settings": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": "string"
                                                },
                                                "updated_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "organization_id",
                                                "name",
                                                "slug",
                                                "description",
                                                "address",
                                                "phone",
                                                "email",
                                                "settings",
                                                "status",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                            "organization_id": "0199d51e-d220-7347-843b-226c20f74ecc",
                                            "name": "Criadero La Perlina",
                                            "slug": "escuela-chalaneria-el-paso",
                                            "description": "Criaderio Prueba",
                                            "logo": null,
                                            "address": {
                                                "city": "Medellin",
                                                "street": "cll 123",
                                                "country": "Colombia",
                                                "department": null
                                            },
                                            "phone": "3145678943",
                                            "email": "laperlina@gmail.com",
                                            "website": null,
                                            "social_media": null,
                                            "settings": [],
                                            "status": "active",
                                            "created_at": "2025-12-16T06:08:07+00:00",
                                            "updated_at": "2025-12-24T04:50:23+00:00"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Gestión"
                ]
            },
            "put": {
                "summary": "Actualizar escuela",
                "operationId": "actualizarEscuela",
                "description": "Actualiza los datos de una escuela existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "organization_id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "slug": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": "string"
                                                },
                                                "address": {
                                                    "type": "object",
                                                    "properties": {
                                                        "city": {
                                                            "type": "string"
                                                        },
                                                        "street": {
                                                            "type": "string"
                                                        },
                                                        "country": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "city",
                                                        "street",
                                                        "country"
                                                    ]
                                                },
                                                "phone": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                },
                                                "settings": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": "string"
                                                },
                                                "updated_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "organization_id",
                                                "name",
                                                "slug",
                                                "description",
                                                "address",
                                                "phone",
                                                "email",
                                                "settings",
                                                "status",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                            "organization_id": "0199d51e-d220-7347-843b-226c20f74ecc",
                                            "name": "Criadero La Perlina",
                                            "slug": "escuela-chalaneria-el-paso",
                                            "description": "Criaderio Prueba",
                                            "logo": null,
                                            "address": {
                                                "city": "Medellin",
                                                "street": "cll 123",
                                                "country": "Colombia",
                                                "department": null
                                            },
                                            "phone": "3145678943",
                                            "email": "laperlina@gmail.com",
                                            "website": null,
                                            "social_media": null,
                                            "settings": [],
                                            "status": "active",
                                            "created_at": "2025-12-16T06:08:07+00:00",
                                            "updated_at": "2025-12-24T04:50:23+00:00"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Gestión"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre de la escuela.",
                                        "example": "Escuela El Refugio"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Descripción.",
                                        "example": "Centro de equitación",
                                        "nullable": true
                                    },
                                    "logo": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "v",
                                        "nullable": true
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "d",
                                        "nullable": true
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 255 characters.",
                                        "example": "jermaine.tillman@example.org",
                                        "nullable": true
                                    },
                                    "address": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "website": {
                                        "type": "string",
                                        "description": "Must be a valid URL. Must not be greater than 255 characters.",
                                        "example": "h",
                                        "nullable": true
                                    },
                                    "social_media": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "settings": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (active, inactive, suspended).",
                                        "example": "active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar escuela",
                "operationId": "eliminarEscuela",
                "description": "Elimina una escuela y todos sus datos asociados.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Escuela eliminada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Gestión"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/upload": {
            "post": {
                "summary": "Subir imagen para la escuela",
                "operationId": "subirImagenParaLaEscuela",
                "description": "Sube una imagen a Cloudinary para la escuela.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "url": {
                                                    "type": "string"
                                                },
                                                "public_id": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "url",
                                                "public_id"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "url": "https://res.cloudinary.com/...",
                                            "public_id": "schools/uploads/..."
                                        },
                                        "message": "Imagen subida exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "image": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "image"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "image": [
                                                "El archivo debe ser una imagen válida"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "error"
                                    ],
                                    "example": {
                                        "message": "Error al subir la imagen",
                                        "error": "..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Gestión"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "image": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Imagen (jpeg, png, jpg, gif, webp, máximo 5MB)."
                                    }
                                },
                                "required": [
                                    "image"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/schedules": {
            "get": {
                "summary": "Listar horarios",
                "operationId": "listarHorarios",
                "description": "Obtiene todos los horarios de clases de la escuela.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "class_id": {
                                                        "type": "string"
                                                    },
                                                    "instructor_id": {
                                                        "type": "string"
                                                    },
                                                    "day_of_week": {
                                                        "type": "integer"
                                                    },
                                                    "start_time": {
                                                        "type": "string"
                                                    },
                                                    "end_time": {
                                                        "type": "string"
                                                    },
                                                    "location": {
                                                        "type": "string"
                                                    },
                                                    "max_students": {
                                                        "type": "integer"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": "string"
                                                    },
                                                    "updated_at": {
                                                        "type": "string"
                                                    },
                                                    "school_class": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "school_id": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            },
                                                            "description": {
                                                                "type": "string"
                                                            },
                                                            "level": {
                                                                "type": "string"
                                                            },
                                                            "duration_minutes": {
                                                                "type": "integer"
                                                            },
                                                            "price": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "created_at": {
                                                                "type": "string"
                                                            },
                                                            "updated_at": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "school_id",
                                                            "name",
                                                            "description",
                                                            "level",
                                                            "duration_minutes",
                                                            "price",
                                                            "status",
                                                            "created_at",
                                                            "updated_at"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "class_id",
                                                    "instructor_id",
                                                    "day_of_week",
                                                    "start_time",
                                                    "end_time",
                                                    "location",
                                                    "max_students",
                                                    "status",
                                                    "created_at",
                                                    "updated_at",
                                                    "school_class"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "019b25c5-fe5b-7382-975a-89d8bb75a46f",
                                                "class_id": "019b25c5-f97f-7299-a3cc-8730f4b22185",
                                                "instructor_id": "019b25c5-f2d3-7245-9380-c663824e1b34",
                                                "day_of_week": 2,
                                                "start_time": "08:00:00",
                                                "end_time": "09:00:00",
                                                "location": "Pista 2",
                                                "max_students": 8,
                                                "status": "active",
                                                "created_at": "2025-12-16T06:08:11+00:00",
                                                "updated_at": "2025-12-16T06:08:11+00:00",
                                                "school_class": {
                                                    "id": "019b25c5-f97f-7299-a3cc-8730f4b22185",
                                                    "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                    "name": "Chalanería Básica",
                                                    "description": "Clase de Chalanería Básica para estudiantes de nivel beginner",
                                                    "level": "beginner",
                                                    "capacity": null,
                                                    "duration_minutes": 60,
                                                    "price": "80000.00",
                                                    "currency": null,
                                                    "status": "active",
                                                    "created_at": "2025-12-16T06:08:10+00:00",
                                                    "updated_at": "2025-12-16T06:08:10+00:00"
                                                }
                                            },
                                            {
                                                "id": "019b25c5-fe5b-7382-975a-89d8bb75a46f",
                                                "class_id": "019b25c5-f97f-7299-a3cc-8730f4b22185",
                                                "instructor_id": "019b25c5-f2d3-7245-9380-c663824e1b34",
                                                "day_of_week": 2,
                                                "start_time": "08:00:00",
                                                "end_time": "09:00:00",
                                                "location": "Pista 2",
                                                "max_students": 8,
                                                "status": "active",
                                                "created_at": "2025-12-16T06:08:11+00:00",
                                                "updated_at": "2025-12-16T06:08:11+00:00",
                                                "school_class": {
                                                    "id": "019b25c5-f97f-7299-a3cc-8730f4b22185",
                                                    "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                    "name": "Chalanería Básica",
                                                    "description": "Clase de Chalanería Básica para estudiantes de nivel beginner",
                                                    "level": "beginner",
                                                    "capacity": null,
                                                    "duration_minutes": 60,
                                                    "price": "80000.00",
                                                    "currency": null,
                                                    "status": "active",
                                                    "created_at": "2025-12-16T06:08:10+00:00",
                                                    "updated_at": "2025-12-16T06:08:10+00:00"
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Horarios"
                ]
            },
            "post": {
                "summary": "Crear horario",
                "operationId": "crearHorario",
                "description": "Crea un nuevo horario de clase.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "class_id": {
                                                    "type": "string"
                                                },
                                                "instructor_id": {
                                                    "type": "string"
                                                },
                                                "day_of_week": {
                                                    "type": "integer"
                                                },
                                                "start_time": {
                                                    "type": "string"
                                                },
                                                "end_time": {
                                                    "type": "string"
                                                },
                                                "location": {
                                                    "type": "string"
                                                },
                                                "max_students": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": "string"
                                                },
                                                "updated_at": {
                                                    "type": "string"
                                                },
                                                "school_class": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "school_id": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        },
                                                        "description": {
                                                            "type": "string"
                                                        },
                                                        "level": {
                                                            "type": "string"
                                                        },
                                                        "duration_minutes": {
                                                            "type": "integer"
                                                        },
                                                        "price": {
                                                            "type": "string"
                                                        },
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "created_at": {
                                                            "type": "string"
                                                        },
                                                        "updated_at": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "school_id",
                                                        "name",
                                                        "description",
                                                        "level",
                                                        "duration_minutes",
                                                        "price",
                                                        "status",
                                                        "created_at",
                                                        "updated_at"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "class_id",
                                                "instructor_id",
                                                "day_of_week",
                                                "start_time",
                                                "end_time",
                                                "location",
                                                "max_students",
                                                "status",
                                                "created_at",
                                                "updated_at",
                                                "school_class"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "019b25c5-fe5b-7382-975a-89d8bb75a46f",
                                            "class_id": "019b25c5-f97f-7299-a3cc-8730f4b22185",
                                            "instructor_id": "019b25c5-f2d3-7245-9380-c663824e1b34",
                                            "day_of_week": 2,
                                            "start_time": "08:00:00",
                                            "end_time": "09:00:00",
                                            "location": "Pista 2",
                                            "max_students": 8,
                                            "status": "active",
                                            "created_at": "2025-12-16T06:08:11+00:00",
                                            "updated_at": "2025-12-16T06:08:11+00:00",
                                            "school_class": {
                                                "id": "019b25c5-f97f-7299-a3cc-8730f4b22185",
                                                "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "name": "Chalanería Básica",
                                                "description": "Clase de Chalanería Básica para estudiantes de nivel beginner",
                                                "level": "beginner",
                                                "capacity": null,
                                                "duration_minutes": 60,
                                                "price": "80000.00",
                                                "currency": null,
                                                "status": "active",
                                                "created_at": "2025-12-16T06:08:10+00:00",
                                                "updated_at": "2025-12-16T06:08:10+00:00"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "day_of_week": {
                                                    "type": "integer"
                                                },
                                                "start_time": {
                                                    "type": "string"
                                                },
                                                "end_time": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "day_of_week",
                                                "start_time",
                                                "end_time"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "day_of_week": 1,
                                            "start_time": "09:00",
                                            "end_time": "10:00"
                                        },
                                        "message": "Horario creado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "end_time": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "end_time"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "end_time": [
                                                "La hora de fin debe ser posterior a la hora de inicio"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Horarios"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "class_id": {
                                        "type": "string",
                                        "description": "UUID de la clase.",
                                        "example": "550e8400-e29b-41d4-a716-446655440001"
                                    },
                                    "instructor_id": {
                                        "type": "string",
                                        "description": "UUID del instructor.",
                                        "example": "550e8400-e29b-41d4-a716-446655440002"
                                    },
                                    "day_of_week": {
                                        "type": "integer",
                                        "description": "Día de la semana (0=Domingo, 6=Sábado).",
                                        "example": 1
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Hora de inicio (H:i).",
                                        "example": "09:00"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "Hora de fin (H:i).",
                                        "example": "10:00"
                                    },
                                    "location": {
                                        "type": "string",
                                        "description": "Ubicación.",
                                        "example": "Pista Principal",
                                        "nullable": true
                                    },
                                    "max_students": {
                                        "type": "integer",
                                        "description": "Máximo de estudiantes.",
                                        "example": 8,
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "class_id",
                                    "instructor_id",
                                    "day_of_week",
                                    "start_time",
                                    "end_time"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/schedules/weekly": {
            "get": {
                "summary": "Vista semanal",
                "operationId": "vistaSemanal",
                "description": "Obtiene los horarios organizados por semana.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "week",
                        "description": "Fecha de inicio de semana (Y-m-d).",
                        "example": "2024-12-30",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Fecha de inicio de semana (Y-m-d).",
                            "example": "2024-12-30"
                        }
                    },
                    {
                        "in": "query",
                        "name": "instructor_id",
                        "description": "Filtrar por instructor.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por instructor.",
                            "example": "architecto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "week_start": {
                                                    "type": "string"
                                                },
                                                "week_end": {
                                                    "type": "string"
                                                },
                                                "schedules": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "week_start",
                                                "week_end",
                                                "schedules"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "week_start": "2024-12-30",
                                            "week_end": "2025-01-05",
                                            "schedules": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Horarios"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/schedules/{schedule_id}": {
            "put": {
                "summary": "Actualizar horario",
                "operationId": "actualizarHorario",
                "description": "Actualiza los datos de un horario existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "start_time": {
                                                    "type": "string"
                                                },
                                                "end_time": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "start_time",
                                                "end_time",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "start_time": "10:00",
                                            "end_time": "11:00",
                                            "status": "active"
                                        },
                                        "message": "Horario actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Horario no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Horarios"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "class_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the schools_classes table.",
                                        "example": "6ff8f7f6-1eb3-3525-be4a-3932c805afed"
                                    },
                                    "instructor_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the schools_instructors table.",
                                        "example": "6b72fe4a-5b40-307c-bc24-f79acf9a1bb9"
                                    },
                                    "day_of_week": {
                                        "type": "integer",
                                        "description": "Must be at least 0. Must not be greater than 6.",
                                        "example": 3
                                    },
                                    "start_time": {
                                        "type": "string",
                                        "description": "Hora de inicio (H:i).",
                                        "example": "10:00"
                                    },
                                    "end_time": {
                                        "type": "string",
                                        "description": "Hora de fin (H:i).",
                                        "example": "11:00"
                                    },
                                    "location": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "max_students": {
                                        "type": "integer",
                                        "description": "Must be at least 1.",
                                        "example": 43,
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (active, cancelled).",
                                        "example": "active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar horario",
                "operationId": "eliminarHorario",
                "description": "Elimina un horario de clase.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Horario eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Horario no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Horarios"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "schedule_id",
                    "description": "The ID of the schedule.",
                    "example": "019b25c5-fe5b-7382-975a-89d8bb75a46f",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "schedule",
                    "description": "UUID del horario.",
                    "example": "550e8400-e29b-41d4-a716-446655440003",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/enrollments": {
            "get": {
                "summary": "Listar inscripciones",
                "operationId": "listarInscripciones",
                "description": "Obtiene la lista paginada de inscripciones de una escuela.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "student_id",
                        "description": "Filtrar por estudiante.",
                        "example": "550e8400-e29b-41d4-a716-446655440001",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por estudiante.",
                            "example": "550e8400-e29b-41d4-a716-446655440001"
                        }
                    },
                    {
                        "in": "query",
                        "name": "class_id",
                        "description": "Filtrar por clase.",
                        "example": "550e8400-e29b-41d4-a716-446655440002",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por clase.",
                            "example": "550e8400-e29b-41d4-a716-446655440002"
                        }
                    },
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filtrar por estado (active, paused, cancelled, completed).",
                        "example": "active",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por estado (active, paused, cancelled, completed).",
                            "example": "active"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Elementos por página.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Elementos por página.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [],
                                        "meta": {
                                            "current_page": 1,
                                            "total": 50
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Inscripciones"
                ]
            },
            "post": {
                "summary": "Crear inscripción",
                "operationId": "crearInscripcin",
                "description": "Crea una nueva inscripción de estudiante en una clase.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Inscripción creada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Inscripciones"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "student_id": {
                                        "type": "string",
                                        "description": "UUID del estudiante.",
                                        "example": "550e8400-e29b-41d4-a716-446655440001"
                                    },
                                    "class_id": {
                                        "type": "string",
                                        "description": "UUID de la clase.",
                                        "example": "550e8400-e29b-41d4-a716-446655440002"
                                    },
                                    "schedule_id": {
                                        "type": "string",
                                        "description": "UUID del horario.",
                                        "example": "550e8400-e29b-41d4-a716-446655440003"
                                    },
                                    "horse_id": {
                                        "type": "string",
                                        "description": "UUID del caballo asignado.",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "start_date": {
                                        "type": "date",
                                        "description": "Fecha de inicio.",
                                        "example": "2025-01-01"
                                    },
                                    "end_date": {
                                        "type": "date",
                                        "description": "Fecha de fin.",
                                        "example": "2025-12-31",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "student_id",
                                    "class_id",
                                    "schedule_id",
                                    "start_date"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/enrollments/{enrollment_id}": {
            "get": {
                "summary": "Obtener inscripción",
                "operationId": "obtenerInscripcin",
                "description": "Obtiene los detalles de una inscripción específica.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "attendance_rate": {
                                                    "type": "number"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "attendance_rate"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "attendance_rate": 95.5
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Inscripciones"
                ]
            },
            "put": {
                "summary": "Actualizar inscripción",
                "operationId": "actualizarInscripcin",
                "description": "Actualiza los datos de una inscripción existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Inscripción actualizada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Inscripciones"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "schedule_id": {
                                        "type": "string",
                                        "description": "UUID del horario.",
                                        "example": "architecto"
                                    },
                                    "horse_id": {
                                        "type": "string",
                                        "description": "UUID del caballo asignado.",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "end_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:38:58",
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (active, paused, cancelled, completed).",
                                        "example": "active"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Cancelar inscripción",
                "operationId": "cancelarInscripcin",
                "description": "Cancela una inscripción (marca como cancelled).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Inscripción cancelada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Inscripciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "enrollment_id",
                    "description": "The ID of the enrollment.",
                    "example": "019b25c6-17ce-7338-be9c-6c16811961f6",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "enrollment",
                    "description": "UUID de la inscripción.",
                    "example": "550e8400-e29b-41d4-a716-446655440004",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/badges": {
            "get": {
                "summary": "Lista todos los badges de una escuela",
                "operationId": "listaTodosLosBadgesDeUnaEscuela",
                "description": "Obtiene todos los badges definidos para una escuela.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "category",
                        "description": "Filtrar por categoría.",
                        "example": "attendance",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por categoría.",
                            "example": "attendance"
                        }
                    },
                    {
                        "in": "query",
                        "name": "active_only",
                        "description": "Solo badges activos.",
                        "example": true,
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "description": "Solo badges activos.",
                            "example": true
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Insignias"
                ]
            },
            "post": {
                "summary": "Crea un nuevo badge",
                "operationId": "creaUnNuevoBadge",
                "description": "Crea un nuevo badge para la escuela.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Badge creado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Insignias"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "code": {
                                        "type": "string",
                                        "description": "Código único del badge.",
                                        "example": "first_class"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre del badge.",
                                        "example": "Primera Clase"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Icono.",
                                        "example": "star"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Must not be greater than 7 characters.",
                                        "example": "dljnikh",
                                        "nullable": true
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "Categoría (attendance, classes, competition, level, custom).",
                                        "example": "classes"
                                    },
                                    "criteria": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": {
                                            "type": {
                                                "type": "string",
                                                "description": "",
                                                "example": "architecto",
                                                "nullable": true
                                            },
                                            "value": {
                                                "type": "string",
                                                "description": "",
                                                "example": null,
                                                "nullable": true
                                            }
                                        },
                                        "nullable": true
                                    },
                                    "is_automatic": {
                                        "type": "boolean",
                                        "description": "Si se otorga automáticamente.",
                                        "example": true
                                    },
                                    "points": {
                                        "type": "integer",
                                        "description": "Puntos que otorga.",
                                        "example": 10,
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "code",
                                    "name",
                                    "icon",
                                    "category"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/badges/seed-defaults": {
            "post": {
                "summary": "Inicializa badges predeterminados para una escuela",
                "operationId": "inicializaBadgesPredeterminadosParaUnaEscuela",
                "description": "Crea los badges predeterminados del sistema para una escuela.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "7 badges predeterminados creados",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Insignias"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/badges/{badge_id}": {
            "get": {
                "summary": "Obtiene un badge específico",
                "operationId": "obtieneUnBadgeEspecfico",
                "description": "Obtiene los detalles de un badge incluyendo estudiantes que lo tienen.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "students_count": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "students_count"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "students_count": 15
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Insignias"
                ]
            },
            "put": {
                "summary": "Actualiza un badge",
                "operationId": "actualizaUnBadge",
                "description": "Actualiza los datos de un badge existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Badge actualizado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Insignias"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre del badge.",
                                        "example": "Primera Clase"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "v"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Must not be greater than 7 characters.",
                                        "example": "dljnikh",
                                        "nullable": true
                                    },
                                    "category": {
                                        "type": "string",
                                        "description": "",
                                        "example": "competition",
                                        "enum": [
                                            "attendance",
                                            "classes",
                                            "competition",
                                            "level",
                                            "custom"
                                        ]
                                    },
                                    "criteria": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "is_automatic": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Si está activo.",
                                        "example": true
                                    },
                                    "points": {
                                        "type": "integer",
                                        "description": "Must be at least 0.",
                                        "example": 87,
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Elimina un badge",
                "operationId": "eliminaUnBadge",
                "description": "Elimina un badge (solo si no ha sido otorgado a estudiantes).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Badge eliminado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Insignias"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "badge_id",
                    "description": "The ID of the badge.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "badge",
                    "description": "UUID del badge.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/badges": {
            "get": {
                "summary": "Lista los badges de un estudiante",
                "operationId": "listaLosBadgesDeUnEstudiante",
                "description": "Obtiene todos los badges de un estudiante (obtenidos y disponibles).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "total_earned": {
                                                    "type": "integer"
                                                },
                                                "total_available": {
                                                    "type": "integer"
                                                },
                                                "total_points": {
                                                    "type": "integer"
                                                },
                                                "earned": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "not_earned": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "total_earned",
                                                "total_available",
                                                "total_points",
                                                "earned",
                                                "not_earned"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "total_earned": 5,
                                            "total_available": 10,
                                            "total_points": 150,
                                            "earned": [],
                                            "not_earned": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Insignias"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/badges/{badge_id}/award": {
            "post": {
                "summary": "Otorga un badge a un estudiante manualmente",
                "operationId": "otorgaUnBadgeAUnEstudianteManualmente",
                "description": "Otorga un badge a un estudiante de forma manual.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Badge 'Primera Clase' otorgado a Juan Pérez"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Insignias"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "notes": {
                                        "type": "string",
                                        "description": "Notas adicionales.",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "badge_id",
                    "description": "The ID of the badge.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "badge",
                    "description": "UUID del badge.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/badges/{badge_id}/revoke": {
            "delete": {
                "summary": "Revoca un badge de un estudiante",
                "operationId": "revocaUnBadgeDeUnEstudiante",
                "description": "Revoca un badge previamente otorgado a un estudiante.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Badge 'Primera Clase' revocado de Juan Pérez"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Insignias"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "badge_id",
                    "description": "The ID of the badge.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "badge",
                    "description": "UUID del badge.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/badges/check-automatic": {
            "post": {
                "summary": "Verifica y otorga badges automáticos a un estudiante",
                "operationId": "verificaYOtorgaBadgesAutomticosAUnEstudiante",
                "description": "Verifica los criterios de badges automáticos y otorga los que correspondan.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "checked": {
                                                    "type": "integer"
                                                },
                                                "awarded": {
                                                    "type": "integer"
                                                },
                                                "badges": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "checked",
                                                "awarded",
                                                "badges"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "checked": 10,
                                            "awarded": 2,
                                            "badges": []
                                        },
                                        "message": "2 badge(s) otorgado(s) automáticamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Insignias"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/instructors": {
            "get": {
                "summary": "List instructors",
                "operationId": "listInstructors",
                "description": "Get paginated list of instructors for a school.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filter by status (active, inactive).",
                        "example": "active",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by status (active, inactive).",
                            "example": "active"
                        }
                    },
                    {
                        "in": "query",
                        "name": "specialty",
                        "description": "Filter by specialty.",
                        "example": "dressage",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by specialty.",
                            "example": "dressage"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "school_id": {
                                                        "type": "string"
                                                    },
                                                    "code": {
                                                        "type": "string"
                                                    },
                                                    "first_name": {
                                                        "type": "string"
                                                    },
                                                    "last_name": {
                                                        "type": "string"
                                                    },
                                                    "full_name": {
                                                        "type": "string"
                                                    },
                                                    "phone": {
                                                        "type": "string"
                                                    },
                                                    "email": {
                                                        "type": "string"
                                                    },
                                                    "specialties": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "certifications": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object"
                                                        }
                                                    },
                                                    "experience_years": {
                                                        "type": "integer"
                                                    },
                                                    "hourly_rate": {
                                                        "type": "string"
                                                    },
                                                    "availability": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "day": {
                                                                    "type": "integer"
                                                                },
                                                                "end": {
                                                                    "type": "string"
                                                                },
                                                                "start": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "day",
                                                                "end",
                                                                "start"
                                                            ]
                                                        }
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": "string"
                                                    },
                                                    "updated_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "school_id",
                                                    "code",
                                                    "first_name",
                                                    "last_name",
                                                    "full_name",
                                                    "phone",
                                                    "email",
                                                    "specialties",
                                                    "certifications",
                                                    "experience_years",
                                                    "hourly_rate",
                                                    "availability",
                                                    "status",
                                                    "created_at",
                                                    "updated_at"
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": "string"
                                                },
                                                "last": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "to": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "019b25c5-f1df-7342-b25b-3fd92a500f6b",
                                                "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "user_id": null,
                                                "code": "INS-0001",
                                                "first_name": "Juan Carlos",
                                                "last_name": "Pérez",
                                                "full_name": "Juan Carlos Pérez",
                                                "birth_date": null,
                                                "age": null,
                                                "gender": null,
                                                "document_type": null,
                                                "document_number": null,
                                                "phone": "+57 300 8180099",
                                                "email": "juan-carlos@escuelaelpaso.com",
                                                "address": null,
                                                "photo": null,
                                                "specialties": [
                                                    "chalanería",
                                                    "paso fino"
                                                ],
                                                "certifications": [],
                                                "experience_years": 11,
                                                "bio": null,
                                                "hourly_rate": "54000.00",
                                                "availability": [
                                                    {
                                                        "day": 1,
                                                        "end": "18:00",
                                                        "start": "08:00"
                                                    },
                                                    {
                                                        "day": 2,
                                                        "end": "18:00",
                                                        "start": "08:00"
                                                    },
                                                    {
                                                        "day": 3,
                                                        "end": "18:00",
                                                        "start": "08:00"
                                                    },
                                                    {
                                                        "day": 4,
                                                        "end": "18:00",
                                                        "start": "08:00"
                                                    },
                                                    {
                                                        "day": 5,
                                                        "end": "18:00",
                                                        "start": "08:00"
                                                    },
                                                    {
                                                        "day": 6,
                                                        "end": "12:00",
                                                        "start": "08:00"
                                                    }
                                                ],
                                                "hire_date": null,
                                                "salary": null,
                                                "salary_currency": null,
                                                "status": "active",
                                                "notes": null,
                                                "created_at": "2025-12-16T06:08:08+00:00",
                                                "updated_at": "2025-12-16T06:08:08+00:00"
                                            },
                                            {
                                                "id": "019b25c5-f1df-7342-b25b-3fd92a500f6b",
                                                "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "user_id": null,
                                                "code": "INS-0001",
                                                "first_name": "Juan Carlos",
                                                "last_name": "Pérez",
                                                "full_name": "Juan Carlos Pérez",
                                                "birth_date": null,
                                                "age": null,
                                                "gender": null,
                                                "document_type": null,
                                                "document_number": null,
                                                "phone": "+57 300 8180099",
                                                "email": "juan-carlos@escuelaelpaso.com",
                                                "address": null,
                                                "photo": null,
                                                "specialties": [
                                                    "chalanería",
                                                    "paso fino"
                                                ],
                                                "certifications": [],
                                                "experience_years": 11,
                                                "bio": null,
                                                "hourly_rate": "54000.00",
                                                "availability": [
                                                    {
                                                        "day": 1,
                                                        "end": "18:00",
                                                        "start": "08:00"
                                                    },
                                                    {
                                                        "day": 2,
                                                        "end": "18:00",
                                                        "start": "08:00"
                                                    },
                                                    {
                                                        "day": 3,
                                                        "end": "18:00",
                                                        "start": "08:00"
                                                    },
                                                    {
                                                        "day": 4,
                                                        "end": "18:00",
                                                        "start": "08:00"
                                                    },
                                                    {
                                                        "day": 5,
                                                        "end": "18:00",
                                                        "start": "08:00"
                                                    },
                                                    {
                                                        "day": 6,
                                                        "end": "12:00",
                                                        "start": "08:00"
                                                    }
                                                ],
                                                "hire_date": null,
                                                "salary": null,
                                                "salary_currency": null,
                                                "status": "active",
                                                "notes": null,
                                                "created_at": "2025-12-16T06:08:08+00:00",
                                                "updated_at": "2025-12-16T06:08:08+00:00"
                                            }
                                        ],
                                        "links": {
                                            "first": "/?page=1",
                                            "last": "/?page=1",
                                            "prev": null,
                                            "next": null
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "from": 1,
                                            "last_page": 1,
                                            "links": [
                                                {
                                                    "url": null,
                                                    "label": "&laquo; Previous",
                                                    "page": null,
                                                    "active": false
                                                },
                                                {
                                                    "url": "/?page=1",
                                                    "label": "1",
                                                    "page": 1,
                                                    "active": true
                                                },
                                                {
                                                    "url": null,
                                                    "label": "Next &raquo;",
                                                    "page": null,
                                                    "active": false
                                                }
                                            ],
                                            "path": "/",
                                            "per_page": 20,
                                            "to": 2,
                                            "total": 2
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Instructores"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID of the school.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/instructors/{instructor_id}": {
            "get": {
                "summary": "",
                "operationId": "getApiSchoolsSchool_idInstructorsInstructor_id",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "schedules": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "schedules_count": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "schedules",
                                                "schedules_count"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "María García",
                                            "schedules": [],
                                            "schedules_count": 5
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Instructor no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Instructores"
                ]
            },
            "put": {
                "summary": "Actualizar instructor",
                "operationId": "actualizarInstructor",
                "description": "Actualiza los datos de un instructor existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "first_name": {
                                                    "type": "string"
                                                },
                                                "last_name": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "first_name",
                                                "last_name",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "first_name": "Juan",
                                            "last_name": "Pérez",
                                            "status": "active"
                                        },
                                        "message": "Instructor actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Instructor no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Instructores"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "first_name": {
                                        "type": "string",
                                        "description": "Nombre.",
                                        "example": "Juan"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Apellido.",
                                        "example": "Pérez"
                                    },
                                    "document_type": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "gzmiyvdljnikhway",
                                        "nullable": true
                                    },
                                    "document_number": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "k",
                                        "nullable": true
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "c",
                                        "nullable": true
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 255 characters.",
                                        "example": "antonio24@example.net",
                                        "nullable": true
                                    },
                                    "specialties": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "certifications": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "experience_years": {
                                        "type": "integer",
                                        "description": "Must be at least 0.",
                                        "example": 61,
                                        "nullable": true
                                    },
                                    "bio": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "photo": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "hourly_rate": {
                                        "type": "number",
                                        "description": "Must be at least 0.",
                                        "example": 84,
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (active, inactive).",
                                        "example": "active"
                                    },
                                    "availability": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar instructor",
                "operationId": "eliminarInstructor",
                "description": "Elimina un instructor de la escuela.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Instructor eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Instructor no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Instructores"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "instructor_id",
                    "description": "The ID of the instructor.",
                    "example": "019b25c5-f1df-7342-b25b-3fd92a500f6b",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/instructors/{instructor_id}/availability": {
            "get": {
                "summary": "",
                "operationId": "getApiSchoolsSchool_idInstructorsInstructor_idAvailability",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "instructor": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name"
                                                    ]
                                                },
                                                "schedules": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "availability": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "instructor",
                                                "schedules",
                                                "availability"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "instructor": {
                                                "id": "...",
                                                "name": "María García"
                                            },
                                            "schedules": [],
                                            "availability": []
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Instructor no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Instructores"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "instructor_id",
                    "description": "The ID of the instructor.",
                    "example": "019b25c5-f1df-7342-b25b-3fd92a500f6b",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/skill-levels": {
            "get": {
                "summary": "Lista los niveles de habilidad de una escuela",
                "operationId": "listaLosNivelesDeHabilidadDeUnaEscuela",
                "description": "Obtiene todos los niveles de habilidad definidos para una escuela.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "discipline",
                        "description": "Filtrar por disciplina.",
                        "example": "dressage",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por disciplina.",
                            "example": "dressage"
                        }
                    },
                    {
                        "in": "query",
                        "name": "active_only",
                        "description": "Solo niveles activos.",
                        "example": true,
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "description": "Solo niveles activos.",
                            "example": true
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Niveles"
                ]
            },
            "post": {
                "summary": "Crea un nuevo nivel de habilidad",
                "operationId": "creaUnNuevoNivelDeHabilidad",
                "description": "Crea un nuevo nivel de habilidad para la escuela.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Nivel de habilidad creado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Niveles"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "discipline": {
                                        "type": "string",
                                        "description": "Disciplina.",
                                        "example": "dressage"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre del nivel.",
                                        "example": "Nivel Intermedio"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Descripción.",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "v",
                                        "nullable": true
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Must not be greater than 7 characters.",
                                        "example": "dljnikh",
                                        "nullable": true
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "Orden de visualización.",
                                        "example": 2,
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "discipline",
                                    "name"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/skill-levels/disciplines": {
            "get": {
                "summary": "Lista las disciplinas disponibles",
                "operationId": "listaLasDisciplinasDisponibles",
                "description": "Obtiene la lista de disciplinas con niveles definidos.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "string"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            "dressage",
                                            "jumping"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Niveles"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/skill-levels/{skillLevel_id}": {
            "get": {
                "summary": "Obtiene un nivel de habilidad específico",
                "operationId": "obtieneUnNivelDeHabilidadEspecfico",
                "description": "Obtiene los detalles de un nivel incluyendo criterios.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Niveles"
                ]
            },
            "put": {
                "summary": "Actualiza un nivel de habilidad",
                "operationId": "actualizaUnNivelDeHabilidad",
                "description": "Actualiza los datos de un nivel existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Nivel de habilidad actualizado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Niveles"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "discipline": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "b"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre del nivel.",
                                        "example": "Nivel Intermedio"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "v",
                                        "nullable": true
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Must not be greater than 7 characters.",
                                        "example": "dljnikh",
                                        "nullable": true
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "",
                                        "example": 16,
                                        "nullable": true
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "Si está activo.",
                                        "example": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Elimina un nivel de habilidad",
                "operationId": "eliminaUnNivelDeHabilidad",
                "description": "Elimina un nivel (solo si no tiene evaluaciones).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Nivel de habilidad eliminado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Niveles"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "skillLevel_id",
                    "description": "The ID of the skillLevel.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "skill_level",
                    "description": "UUID del nivel.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/skill-levels/{skillLevel_id}/criteria": {
            "get": {
                "summary": "Lista los criterios de un nivel",
                "operationId": "listaLosCriteriosDeUnNivel",
                "description": "Obtiene todos los criterios de evaluación de un nivel.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Niveles"
                ]
            },
            "post": {
                "summary": "Crea un nuevo criterio",
                "operationId": "creaUnNuevoCriterio",
                "description": "Crea un nuevo criterio de evaluación para un nivel.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Criterio creado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Niveles"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre del criterio.",
                                        "example": "Postura"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "max_score": {
                                        "type": "integer",
                                        "description": "Puntuación máxima (1-10).",
                                        "example": 5,
                                        "nullable": true
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "",
                                        "example": 16,
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "skillLevel_id",
                    "description": "The ID of the skillLevel.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "skill_level",
                    "description": "UUID del nivel.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/skill-levels/{skillLevel_id}/criteria/{criteria_id}": {
            "put": {
                "summary": "Actualiza un criterio",
                "operationId": "actualizaUnCriterio",
                "description": "Actualiza los datos de un criterio existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Criterio actualizado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Niveles"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre del criterio.",
                                        "example": "Postura"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "max_score": {
                                        "type": "integer",
                                        "description": "Must be at least 1. Must not be greater than 10.",
                                        "example": 6,
                                        "nullable": true
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "",
                                        "example": 16,
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Elimina un criterio",
                "operationId": "eliminaUnCriterio",
                "description": "Elimina un criterio (solo si no tiene evaluaciones).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Criterio eliminado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Niveles"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "skillLevel_id",
                    "description": "The ID of the skillLevel.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "criteria_id",
                    "description": "The ID of the criteria.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "skill_level",
                    "description": "UUID del nivel.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "criteria",
                    "description": "UUID del criterio.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/skill-levels/{skillLevel_id}/criteria/reorder": {
            "post": {
                "summary": "Reordena los criterios de un nivel",
                "operationId": "reordenaLosCriteriosDeUnNivel",
                "description": "Reordena los criterios de evaluación de un nivel.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Criterios reordenados",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Niveles"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "criteria": {
                                        "type": "array",
                                        "description": "Array de criterios con id y order.",
                                        "example": [
                                            "architecto"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "criteria"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "skillLevel_id",
                    "description": "The ID of the skillLevel.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "skill_level",
                    "description": "UUID del nivel.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/payments": {
            "get": {
                "summary": "Listar pagos",
                "operationId": "listarPagos",
                "description": "Obtiene la lista paginada de pagos de una escuela.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "student_id",
                        "description": "Filtrar por estudiante.",
                        "example": "550e8400-e29b-41d4-a716-446655440001",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por estudiante.",
                            "example": "550e8400-e29b-41d4-a716-446655440001"
                        }
                    },
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filtrar por estado (pending, paid, overdue).",
                        "example": "pending",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por estado (pending, paid, overdue).",
                            "example": "pending"
                        }
                    },
                    {
                        "in": "query",
                        "name": "start_date",
                        "description": "Filtrar desde fecha.",
                        "example": "2024-12-01",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar desde fecha.",
                            "example": "2024-12-01"
                        }
                    },
                    {
                        "in": "query",
                        "name": "end_date",
                        "description": "Filtrar hasta fecha.",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar hasta fecha.",
                            "example": "2024-12-31"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Elementos por página.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Elementos por página.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "school_id": {
                                                        "type": "string"
                                                    },
                                                    "student_id": {
                                                        "type": "string"
                                                    },
                                                    "amount": {
                                                        "type": "string"
                                                    },
                                                    "payment_method": {
                                                        "type": "string"
                                                    },
                                                    "concept": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": "string"
                                                    },
                                                    "updated_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "school_id",
                                                    "student_id",
                                                    "amount",
                                                    "payment_method",
                                                    "concept",
                                                    "status",
                                                    "created_at",
                                                    "updated_at"
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": "string"
                                                },
                                                "last": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "to": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "019b25c6-72d7-72ac-9a8f-71fe3b0bcd96",
                                                "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "student_id": "019b25c6-0536-70db-8ddd-de8445e18870",
                                                "amount": "120157.00",
                                                "currency": null,
                                                "payment_method": "transfer",
                                                "payment_date": null,
                                                "reference_number": null,
                                                "concept": "Mensualidad November 2025",
                                                "period_start": null,
                                                "period_end": null,
                                                "status": "paid",
                                                "notes": null,
                                                "created_at": "2025-12-16T06:08:41+00:00",
                                                "updated_at": "2025-12-16T06:08:41+00:00"
                                            },
                                            {
                                                "id": "019b25c6-72d7-72ac-9a8f-71fe3b0bcd96",
                                                "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                                "student_id": "019b25c6-0536-70db-8ddd-de8445e18870",
                                                "amount": "120157.00",
                                                "currency": null,
                                                "payment_method": "transfer",
                                                "payment_date": null,
                                                "reference_number": null,
                                                "concept": "Mensualidad November 2025",
                                                "period_start": null,
                                                "period_end": null,
                                                "status": "paid",
                                                "notes": null,
                                                "created_at": "2025-12-16T06:08:41+00:00",
                                                "updated_at": "2025-12-16T06:08:41+00:00"
                                            }
                                        ],
                                        "links": {
                                            "first": "/?page=1",
                                            "last": "/?page=1",
                                            "prev": null,
                                            "next": null
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "from": 1,
                                            "last_page": 1,
                                            "links": [
                                                {
                                                    "url": null,
                                                    "label": "&laquo; Previous",
                                                    "page": null,
                                                    "active": false
                                                },
                                                {
                                                    "url": "/?page=1",
                                                    "label": "1",
                                                    "page": 1,
                                                    "active": true
                                                },
                                                {
                                                    "url": null,
                                                    "label": "Next &raquo;",
                                                    "page": null,
                                                    "active": false
                                                }
                                            ],
                                            "path": "/",
                                            "per_page": 20,
                                            "to": 2,
                                            "total": 2
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Pagos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/payments/pending": {
            "get": {
                "summary": "Pagos pendientes",
                "operationId": "pagosPendientes",
                "description": "Obtiene todos los pagos pendientes de la escuela.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "summary": {
                                            "type": "object",
                                            "properties": {
                                                "total_pending": {
                                                    "type": "integer"
                                                },
                                                "total_amount": {
                                                    "type": "integer"
                                                },
                                                "overdue_count": {
                                                    "type": "integer"
                                                },
                                                "overdue_amount": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total_pending",
                                                "total_amount",
                                                "overdue_count",
                                                "overdue_amount"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "summary"
                                    ],
                                    "example": {
                                        "data": [],
                                        "summary": {
                                            "total_pending": 10,
                                            "total_amount": 5000000,
                                            "overdue_count": 2,
                                            "overdue_amount": 1000000
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Pagos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/payments/report": {
            "get": {
                "summary": "Reporte de pagos",
                "operationId": "reporteDePagos",
                "description": "Genera un reporte de pagos para un período.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "start_date",
                        "description": "Fecha inicio (Y-m-d).",
                        "example": "2024-12-01",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Fecha inicio (Y-m-d).",
                            "example": "2024-12-01"
                        }
                    },
                    {
                        "in": "query",
                        "name": "end_date",
                        "description": "Fecha fin (Y-m-d).",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Fecha fin (Y-m-d).",
                            "example": "2024-12-31"
                        }
                    },
                    {
                        "in": "query",
                        "name": "group_by",
                        "description": "Agrupar por (day, week, month).",
                        "example": "month",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Agrupar por (day, week, month).",
                            "example": "month"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "period": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start_date": {
                                                            "type": "string"
                                                        },
                                                        "end_date": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "start_date",
                                                        "end_date"
                                                    ]
                                                },
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_payments": {
                                                            "type": "integer"
                                                        },
                                                        "total_amount": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total_payments",
                                                        "total_amount"
                                                    ]
                                                },
                                                "by_period": {
                                                    "type": "object",
                                                    "properties": []
                                                }
                                            },
                                            "required": [
                                                "period",
                                                "summary",
                                                "by_period"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "period": {
                                                "start_date": "2024-12-01",
                                                "end_date": "2024-12-31"
                                            },
                                            "summary": {
                                                "total_payments": 100,
                                                "total_amount": 50000000
                                            },
                                            "by_period": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Pagos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/payments/generate-monthly": {
            "post": {
                "summary": "Generar mensualidades",
                "operationId": "generarMensualidades",
                "description": "Genera automáticamente los cobros mensuales para estudiantes activos.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "created": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "created"
                                    ],
                                    "example": {
                                        "message": "Se generaron 25 cobros para December 2024",
                                        "created": 25
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Pagos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "month": {
                                        "type": "string",
                                        "description": "Mes en formato Y-m.",
                                        "example": "2024-12"
                                    },
                                    "due_day": {
                                        "type": "integer",
                                        "description": "Día de vencimiento (1-28).",
                                        "example": 5
                                    }
                                },
                                "required": [
                                    "month",
                                    "due_day"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/payments/{payment_id}": {
            "get": {
                "summary": "Obtener pago",
                "operationId": "obtenerPago",
                "description": "Obtiene los detalles de un pago específico.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "school_id": {
                                                    "type": "string"
                                                },
                                                "student_id": {
                                                    "type": "string"
                                                },
                                                "amount": {
                                                    "type": "string"
                                                },
                                                "payment_method": {
                                                    "type": "string"
                                                },
                                                "concept": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": "string"
                                                },
                                                "updated_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "school_id",
                                                "student_id",
                                                "amount",
                                                "payment_method",
                                                "concept",
                                                "status",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "019b25c6-72d7-72ac-9a8f-71fe3b0bcd96",
                                            "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                            "student_id": "019b25c6-0536-70db-8ddd-de8445e18870",
                                            "amount": "120157.00",
                                            "currency": null,
                                            "payment_method": "transfer",
                                            "payment_date": null,
                                            "reference_number": null,
                                            "concept": "Mensualidad November 2025",
                                            "period_start": null,
                                            "period_end": null,
                                            "status": "paid",
                                            "notes": null,
                                            "created_at": "2025-12-16T06:08:41+00:00",
                                            "updated_at": "2025-12-16T06:08:41+00:00"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Pagos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "payment_id",
                    "description": "The ID of the payment.",
                    "example": "019b25c6-72d7-72ac-9a8f-71fe3b0bcd96",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "payment",
                    "description": "UUID del pago.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/payments/{payment_id}/pay": {
            "post": {
                "summary": "Registrar pago",
                "operationId": "registrarPago",
                "description": "Marca un pago como pagado y registra los detalles del pago.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "school_id": {
                                                    "type": "string"
                                                },
                                                "student_id": {
                                                    "type": "string"
                                                },
                                                "amount": {
                                                    "type": "string"
                                                },
                                                "payment_method": {
                                                    "type": "string"
                                                },
                                                "concept": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": "string"
                                                },
                                                "updated_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "school_id",
                                                "student_id",
                                                "amount",
                                                "payment_method",
                                                "concept",
                                                "status",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "019b25c6-72d7-72ac-9a8f-71fe3b0bcd96",
                                            "school_id": "019b25c5-eeec-72b3-aacd-919e8c992006",
                                            "student_id": "019b25c6-0536-70db-8ddd-de8445e18870",
                                            "amount": "120157.00",
                                            "currency": null,
                                            "payment_method": "transfer",
                                            "payment_date": null,
                                            "reference_number": null,
                                            "concept": "Mensualidad November 2025",
                                            "period_start": null,
                                            "period_end": null,
                                            "status": "paid",
                                            "notes": null,
                                            "created_at": "2025-12-16T06:08:41+00:00",
                                            "updated_at": "2025-12-16T06:08:41+00:00"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Pagos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "payment_method": {
                                        "type": "string",
                                        "description": "Método (cash, transfer, card, epayco).",
                                        "example": "cash"
                                    },
                                    "paid_date": {
                                        "type": "date",
                                        "description": "Fecha de pago.",
                                        "example": "2024-12-31",
                                        "nullable": true
                                    },
                                    "receipt_number": {
                                        "type": "string",
                                        "description": "Número de recibo.",
                                        "example": "REC-001",
                                        "nullable": true
                                    },
                                    "transaction_id": {
                                        "type": "string",
                                        "description": "ID de transacción.",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notas adicionales.",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "payment_method"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "payment_id",
                    "description": "The ID of the payment.",
                    "example": "019b25c6-72d7-72ac-9a8f-71fe3b0bcd96",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "payment",
                    "description": "UUID del pago.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/student-portal/dashboard": {
            "get": {
                "summary": "Get the authenticated student's profile and dashboard data",
                "operationId": "getTheAuthenticatedStudentsProfileAndDashboardData",
                "description": "Obtiene el dashboard del estudiante autenticado con clases próximas, pagos y estadísticas.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "student": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "school": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "upcoming_classes": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "pending_payments": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "attendance_stats": {
                                                    "type": "object",
                                                    "properties": []
                                                }
                                            },
                                            "required": [
                                                "student",
                                                "school",
                                                "upcoming_classes",
                                                "pending_payments",
                                                "attendance_stats"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "student": [],
                                            "school": [],
                                            "upcoming_classes": [],
                                            "pending_payments": [],
                                            "attendance_stats": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Portal"
                ]
            }
        },
        "/api/student-portal/classes": {
            "get": {
                "summary": "Get student's enrolled classes",
                "operationId": "getStudentsEnrolledClasses",
                "description": "Obtiene todas las clases en las que está inscrito el estudiante autenticado.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Portal"
                ]
            }
        },
        "/api/student-portal/schedule": {
            "get": {
                "summary": "Get student's schedule (weekly view)",
                "operationId": "getStudentsScheduleweeklyView",
                "description": "Obtiene el horario semanal del estudiante autenticado.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "monday": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "tuesday": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "wednesday": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "monday",
                                                "tuesday",
                                                "wednesday"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "monday": [],
                                            "tuesday": [],
                                            "wednesday": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Portal"
                ]
            }
        },
        "/api/student-portal/attendance": {
            "get": {
                "summary": "Get student's attendance history",
                "operationId": "getStudentsAttendanceHistory",
                "description": "Obtiene el historial de asistencia del estudiante autenticado.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "month",
                        "description": "Mes (1-12).",
                        "example": 12,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Mes (1-12).",
                            "example": 12
                        }
                    },
                    {
                        "in": "query",
                        "name": "year",
                        "description": "Año.",
                        "example": 2024,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Año.",
                            "example": 2024
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "records": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "stats": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "present": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "present"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "records",
                                                "stats"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "records": [],
                                            "stats": {
                                                "total": 20,
                                                "present": 18
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Portal"
                ]
            }
        },
        "/api/student-portal/payments": {
            "get": {
                "summary": "Get student's payments",
                "operationId": "getStudentsPayments",
                "description": "Obtiene los pagos del estudiante autenticado.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filtrar por estado (pending, paid, overdue).",
                        "example": "pending",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por estado (pending, paid, overdue).",
                            "example": "pending"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Elementos por página.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Elementos por página.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "summary": {
                                            "type": "object",
                                            "properties": {
                                                "total_pending": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total_pending"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "summary",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [],
                                        "summary": {
                                            "total_pending": 500000
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "total": 10
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Portal"
                ]
            }
        },
        "/api/student-portal/profile": {
            "get": {
                "summary": "Get student's profile",
                "operationId": "getStudentsProfile",
                "description": "Obtiene el perfil completo del estudiante autenticado.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "first_name": {
                                                    "type": "string"
                                                },
                                                "school": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "parents": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "first_name",
                                                "school",
                                                "parents"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "first_name": "Juan",
                                            "school": [],
                                            "parents": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Portal"
                ]
            }
        },
        "/api/schools/{school_id}/students/{student_id}/progress": {
            "get": {
                "summary": "Obtiene el progreso general de un estudiante",
                "operationId": "obtieneElProgresoGeneralDeUnEstudiante",
                "description": "Obtiene el progreso general de un estudiante en todos los niveles.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "stats": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_levels": {
                                                            "type": "integer"
                                                        },
                                                        "completed_levels": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total_levels",
                                                        "completed_levels"
                                                    ]
                                                },
                                                "by_discipline": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "levels": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "stats",
                                                "by_discipline",
                                                "levels"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "stats": {
                                                "total_levels": 10,
                                                "completed_levels": 3
                                            },
                                            "by_discipline": [],
                                            "levels": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Progreso"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/progress/levels/{skillLevel_id}": {
            "get": {
                "summary": "Obtiene las evaluaciones de un estudiante en un nivel específico",
                "operationId": "obtieneLasEvaluacionesDeUnEstudianteEnUnNivelEspecfico",
                "description": "Obtiene el progreso detallado de un estudiante en un nivel específico.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "level": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "progress": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "criteria": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "level",
                                                "progress",
                                                "criteria"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "level": [],
                                            "progress": [],
                                            "criteria": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Progreso"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "skillLevel_id",
                    "description": "The ID of the skillLevel.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "skill_level",
                    "description": "UUID del nivel.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/progress/evaluate": {
            "post": {
                "summary": "Evalúa a un estudiante",
                "operationId": "evalaAUnEstudiante",
                "description": "Registra evaluaciones de criterios para un estudiante.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Evaluaciones registradas exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Progreso"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "evaluations": {
                                        "type": "array",
                                        "description": "Array de evaluaciones.",
                                        "example": [
                                            "architecto"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "evaluations"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/progress/criteria/{criteria_id}/history": {
            "get": {
                "summary": "Obtiene el historial de evaluaciones de un criterio",
                "operationId": "obtieneElHistorialDeEvaluacionesDeUnCriterio",
                "description": "Obtiene el historial completo de evaluaciones de un criterio específico.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "criteria": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "history": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "criteria",
                                                "history"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "criteria": [],
                                            "history": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Progreso"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "criteria_id",
                    "description": "The ID of the criteria.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "criteria",
                    "description": "UUID del criterio.",
                    "example": "550e8400-e29b-41d4-a716-446655440003",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/progress/radar-chart": {
            "get": {
                "summary": "Obtiene datos para el gráfico de radar",
                "operationId": "obtieneDatosParaElGraficoDeRadar",
                "description": "Obtiene datos formateados para un gráfico de radar del progreso.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "discipline",
                        "description": "Filtrar por disciplina.",
                        "example": "dressage",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por disciplina.",
                            "example": "dressage"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Progreso"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/progress/radar-chart/{discipline}": {
            "get": {
                "summary": "Obtiene datos para el gráfico de radar por disciplina",
                "operationId": "obtieneDatosRadarChartPorDisciplina",
                "description": "Obtiene datos formateados para un gráfico de radar del progreso.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "discipline",
                        "description": "Filtrar por disciplina.",
                        "example": "dressage",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por disciplina.",
                            "example": "dressage"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Progreso"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "discipline",
                    "description": "",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/reports/attendance": {
            "get": {
                "summary": "Reporte de asistencia",
                "operationId": "schoolAttendanceReport",
                "description": "Genera un reporte detallado de asistencia de estudiantes.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "period",
                        "description": "Período (week, month, quarter, year).",
                        "example": "month",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Período (week, month, quarter, year).",
                            "example": "month"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_classes": {
                                                            "type": "integer"
                                                        },
                                                        "average_rate": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "required": [
                                                        "total_classes",
                                                        "average_rate"
                                                    ]
                                                },
                                                "by_day": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "by_class": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "trend": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "summary",
                                                "by_day",
                                                "by_class",
                                                "trend"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "summary": {
                                                "total_classes": 50,
                                                "average_rate": 85.5
                                            },
                                            "by_day": [],
                                            "by_class": [],
                                            "trend": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Reportes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/reports/financial": {
            "get": {
                "summary": "Reporte financiero",
                "operationId": "reporteFinanciero",
                "description": "Genera un reporte financiero con ingresos, pendientes y tendencias.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "period",
                        "description": "Período (week, month, quarter, year).",
                        "example": "month",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Período (week, month, quarter, year).",
                            "example": "month"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_income": {
                                                            "type": "integer"
                                                        },
                                                        "total_pending": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total_income",
                                                        "total_pending"
                                                    ]
                                                },
                                                "income_trend": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "by_payment_method": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "summary",
                                                "income_trend",
                                                "by_payment_method"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "summary": {
                                                "total_income": 5000000,
                                                "total_pending": 1000000
                                            },
                                            "income_trend": [],
                                            "by_payment_method": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Reportes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/reports/students": {
            "get": {
                "summary": "Reporte de estudiantes",
                "operationId": "reporteDeEstudiantes",
                "description": "Genera un reporte de estudiantes con estadísticas y tendencias.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "period",
                        "description": "Período (week, month, quarter, year).",
                        "example": "year",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Período (week, month, quarter, year).",
                            "example": "year"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_students": {
                                                            "type": "integer"
                                                        },
                                                        "active_students": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total_students",
                                                        "active_students"
                                                    ]
                                                },
                                                "by_level": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "enrollment_trend": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "summary",
                                                "by_level",
                                                "enrollment_trend"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "summary": {
                                                "total_students": 100,
                                                "active_students": 85
                                            },
                                            "by_level": [],
                                            "enrollment_trend": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Reportes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/reports/instructors": {
            "get": {
                "summary": "Reporte de instructores",
                "operationId": "reporteDeInstructores",
                "description": "Genera un reporte de instructores con carga de trabajo y disponibilidad.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "period",
                        "description": "Período (week, month, quarter, year).",
                        "example": "month",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Período (week, month, quarter, year).",
                            "example": "month"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_instructors": {
                                                            "type": "integer"
                                                        },
                                                        "average_load": {
                                                            "type": "number"
                                                        }
                                                    },
                                                    "required": [
                                                        "total_instructors",
                                                        "average_load"
                                                    ]
                                                },
                                                "workload": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "availability": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "summary",
                                                "workload",
                                                "availability"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "summary": {
                                                "total_instructors": 5,
                                                "average_load": 12.5
                                            },
                                            "workload": [],
                                            "availability": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Reportes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/reports/horses": {
            "get": {
                "summary": "Reporte de caballos",
                "operationId": "reporteDeCaballos",
                "description": "Genera un reporte de caballos con uso y estado.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "period",
                        "description": "Período (week, month, quarter, year).",
                        "example": "month",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Período (week, month, quarter, year).",
                            "example": "month"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_horses": {
                                                            "type": "integer"
                                                        },
                                                        "active_horses": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total_horses",
                                                        "active_horses"
                                                    ]
                                                },
                                                "by_status": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "usage": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "summary",
                                                "by_status",
                                                "usage"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "summary": {
                                                "total_horses": 12,
                                                "active_horses": 10
                                            },
                                            "by_status": [],
                                            "usage": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Reportes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/reports/competitions": {
            "get": {
                "summary": "Reporte de competiciones",
                "operationId": "reporteDeCompeticiones",
                "description": "Genera un reporte de competiciones y resultados.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "period",
                        "description": "Período (week, month, quarter, year, all).",
                        "example": "year",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Período (week, month, quarter, year, all).",
                            "example": "year"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_competitions": {
                                                            "type": "integer"
                                                        },
                                                        "medals_gold": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total_competitions",
                                                        "medals_gold"
                                                    ]
                                                },
                                                "results_trend": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "top_students": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "summary",
                                                "results_trend",
                                                "top_students"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "summary": {
                                                "total_competitions": 10,
                                                "medals_gold": 5
                                            },
                                            "results_trend": [],
                                            "top_students": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Reportes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/timeline": {
            "get": {
                "summary": "Obtiene el timeline de un estudiante",
                "operationId": "obtieneElTimelineDeUnEstudiante",
                "description": "Obtiene el timeline/historial de eventos de un estudiante.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "type",
                        "description": "Filtrar por tipo de evento.",
                        "example": "badge",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por tipo de evento.",
                            "example": "badge"
                        }
                    },
                    {
                        "in": "query",
                        "name": "year",
                        "description": "Filtrar por año.",
                        "example": 2024,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Filtrar por año.",
                            "example": 2024
                        }
                    },
                    {
                        "in": "query",
                        "name": "from",
                        "description": "Filtrar desde fecha.",
                        "example": "2024-01-01",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar desde fecha.",
                            "example": "2024-01-01"
                        }
                    },
                    {
                        "in": "query",
                        "name": "to",
                        "description": "Filtrar hasta fecha.",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar hasta fecha.",
                            "example": "2024-12-31"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Elementos por página.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Elementos por página.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "grouped": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "grouped",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [],
                                        "grouped": [],
                                        "meta": {
                                            "current_page": 1,
                                            "total": 50
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Timeline"
                ]
            },
            "post": {
                "summary": "Crea un evento personalizado en el timeline",
                "operationId": "creaUnEventoPersonalizadoEnElTimeline",
                "description": "Crea un evento personalizado en el timeline de un estudiante.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Evento agregado al timeline"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Timeline"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "Tipo (milestone, custom).",
                                        "example": "milestone"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Título del evento.",
                                        "example": "Primera competencia"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Descripción.",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "v",
                                        "nullable": true
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Must not be greater than 7 characters.",
                                        "example": "dljnikh",
                                        "nullable": true
                                    },
                                    "occurred_at": {
                                        "type": "date",
                                        "description": "Fecha del evento.",
                                        "example": "2024-12-31",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "type",
                                    "title"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/timeline/stats": {
            "get": {
                "summary": "Obtiene estadísticas del timeline",
                "operationId": "obtieneEstadsticasDelTimeline",
                "description": "Obtiene estadísticas del timeline de un estudiante.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "stats": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_events": {
                                                            "type": "integer"
                                                        },
                                                        "badges_earned": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total_events",
                                                        "badges_earned"
                                                    ]
                                                },
                                                "by_type": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "by_month": {
                                                    "type": "object",
                                                    "properties": []
                                                }
                                            },
                                            "required": [
                                                "stats",
                                                "by_type",
                                                "by_month"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "stats": {
                                                "total_events": 50,
                                                "badges_earned": 10
                                            },
                                            "by_type": [],
                                            "by_month": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Timeline"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/timeline/recent": {
            "get": {
                "summary": "Obtiene los hitos más recientes",
                "operationId": "obtieneLosHitosMsRecientes",
                "description": "Obtiene los eventos más recientes del timeline.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "limit",
                        "description": "Límite de eventos.",
                        "example": 5,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Límite de eventos.",
                            "example": 5
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Timeline"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/timeline/years": {
            "get": {
                "summary": "Obtiene los años disponibles en el timeline",
                "operationId": "obtieneLosAosDisponiblesEnElTimeline",
                "description": "Obtiene la lista de años con eventos en el timeline.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "integer"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            2024,
                                            2023
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Timeline"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/schools/{school_id}/students/{student_id}/timeline/{timeline_id}": {
            "delete": {
                "summary": "Elimina un evento del timeline",
                "operationId": "eliminaUnEventoDelTimeline",
                "description": "Elimina un evento personalizado del timeline (solo eventos personalizados).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Evento eliminado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🎓 Escuelas / Timeline"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "school_id",
                    "description": "The ID of the school.",
                    "example": "019b25c5-eeec-72b3-aacd-919e8c992006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student_id",
                    "description": "The ID of the student.",
                    "example": "019b25c6-0536-70db-8ddd-de8445e18870",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "timeline_id",
                    "description": "The ID of the timeline.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "school",
                    "description": "UUID de la escuela.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "student",
                    "description": "UUID del estudiante.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "timeline",
                    "description": "UUID del evento.",
                    "example": "550e8400-e29b-41d4-a716-446655440004",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/receivables": {
            "get": {
                "summary": "Get all receivables for a stud",
                "operationId": "getAllReceivablesForAStud",
                "description": "Get paginated list of receivables with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filter by status (pending, paid, overdue).",
                        "example": "pending",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by status (pending, paid, overdue).",
                            "example": "pending"
                        }
                    },
                    {
                        "in": "query",
                        "name": "type",
                        "description": "Filter by type (sale, breeding_service, boarding).",
                        "example": "sale",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by type (sale, breeding_service, boarding).",
                            "example": "sale"
                        }
                    },
                    {
                        "in": "query",
                        "name": "overdue",
                        "description": "Only show overdue receivables.",
                        "example": true,
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "description": "Only show overdue receivables.",
                            "example": true
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "currency": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "paid_amount": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "currency",
                                                    "status",
                                                    "paid_amount"
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": "string"
                                                },
                                                "last": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "to": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "client_name": null,
                                                "client_email": null,
                                                "client_phone": null,
                                                "description": null,
                                                "type": null,
                                                "amount": null,
                                                "currency": "COP",
                                                "due_date": null,
                                                "notes": null,
                                                "source_type": null,
                                                "source_id": null,
                                                "status": "pending",
                                                "paid_amount": "0.00",
                                                "balance": null,
                                                "created_at": null,
                                                "updated_at": null
                                            },
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "client_name": null,
                                                "client_email": null,
                                                "client_phone": null,
                                                "description": null,
                                                "type": null,
                                                "amount": null,
                                                "currency": "COP",
                                                "due_date": null,
                                                "notes": null,
                                                "source_type": null,
                                                "source_id": null,
                                                "status": "pending",
                                                "paid_amount": "0.00",
                                                "balance": null,
                                                "created_at": null,
                                                "updated_at": null
                                            }
                                        ],
                                        "links": {
                                            "first": "/?page=1",
                                            "last": "/?page=1",
                                            "prev": null,
                                            "next": null
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "from": 1,
                                            "last_page": 1,
                                            "links": [
                                                {
                                                    "url": null,
                                                    "label": "&laquo; Previous",
                                                    "page": null,
                                                    "active": false
                                                },
                                                {
                                                    "url": "/?page=1",
                                                    "label": "1",
                                                    "page": 1,
                                                    "active": true
                                                },
                                                {
                                                    "url": null,
                                                    "label": "Next &raquo;",
                                                    "page": null,
                                                    "active": false
                                                }
                                            ],
                                            "path": "/",
                                            "per_page": 20,
                                            "to": 2,
                                            "total": 2
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Cartera"
                ]
            },
            "post": {
                "summary": "Create a new receivable",
                "operationId": "createANewReceivable",
                "description": "Crea una nueva cuenta por cobrar.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "currency": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "paid_amount": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "currency",
                                                "status",
                                                "paid_amount"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "client_name": null,
                                            "client_email": null,
                                            "client_phone": null,
                                            "description": null,
                                            "type": null,
                                            "amount": null,
                                            "currency": "COP",
                                            "due_date": null,
                                            "notes": null,
                                            "source_type": null,
                                            "source_id": null,
                                            "status": "pending",
                                            "paid_amount": "0.00",
                                            "balance": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "client_name": {
                                                    "type": "string"
                                                },
                                                "amount": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "client_name",
                                                "amount",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "client_name": "Juan Pérez",
                                            "amount": 5000000,
                                            "status": "pending"
                                        },
                                        "message": "Cuenta por cobrar creada exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "amount": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "amount"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "errors"
                                    ],
                                    "example": {
                                        "errors": {
                                            "amount": [
                                                "El monto debe ser mayor a 0"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Cartera"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_name": {
                                        "type": "string",
                                        "description": "Nombre del cliente.",
                                        "example": "Juan Pérez"
                                    },
                                    "client_email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 200 characters.",
                                        "example": "zbailey@example.net",
                                        "nullable": true
                                    },
                                    "client_phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "iyvdljnikhwaykcm",
                                        "nullable": true
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Descripción.",
                                        "example": "Venta de caballo"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "Tipo (sale, breeding_service, boarding, other).",
                                        "example": "sale"
                                    },
                                    "source_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID.",
                                        "example": "d9be5934-80e7-34a9-a136-841b5f0aea83",
                                        "nullable": true
                                    },
                                    "source_type": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "amount": {
                                        "type": "number",
                                        "description": "Monto.",
                                        "example": 5000000
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "cps",
                                        "nullable": true
                                    },
                                    "due_date": {
                                        "type": "date",
                                        "description": "Fecha de vencimiento.",
                                        "example": "2025-01-15"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "client_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the core_users table.",
                                        "example": "a4855dc5-0acb-33c3-b921-f4291f719ca0",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "client_name",
                                    "description",
                                    "type",
                                    "amount",
                                    "due_date"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/receivables/summary": {
            "get": {
                "summary": "Get receivables summary/dashboard",
                "operationId": "getReceivablesSummarydashboard",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "overdue": {
                                                    "type": "integer"
                                                },
                                                "due_soon": {
                                                    "type": "integer"
                                                },
                                                "by_status": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "by_type": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "overdue",
                                                "due_soon",
                                                "by_status",
                                                "by_type"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "total": 50000000,
                                            "overdue": 10000000,
                                            "due_soon": 5000000,
                                            "by_status": [],
                                            "by_type": []
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Criadero no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Cartera"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/receivables/{receivable}": {
            "get": {
                "summary": "Get a specific receivable",
                "operationId": "getASpecificReceivable",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": {\"id\": \"...\", \"total_amount\": 5000000, \"balance\": 3000000, \"status\": \"partially_paid\", \"client\": {...}, \"payments\": []}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Cuenta por cobrar no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Cartera"
                ]
            },
            "put": {
                "summary": "Update a receivable",
                "operationId": "updateAReceivable",
                "description": "Actualiza una cuenta por cobrar existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "amount": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "amount",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "amount": 6000000,
                                            "status": "paid"
                                        },
                                        "message": "Cuenta por cobrar actualizada exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Cuenta por cobrar no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Cartera"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_name": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "b"
                                    },
                                    "client_email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 200 characters.",
                                        "example": "zbailey@example.net",
                                        "nullable": true
                                    },
                                    "client_phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "iyvdljnikhwaykcm",
                                        "nullable": true
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "Aut adipisci quidem nostrum qui commodi incidunt iure."
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "breeding_service",
                                        "enum": [
                                            "sale",
                                            "breeding_service",
                                            "boarding",
                                            "other"
                                        ]
                                    },
                                    "amount": {
                                        "type": "number",
                                        "description": "Monto.",
                                        "example": 6000000
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "sit"
                                    },
                                    "due_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:40:05"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (pending, partially_paid, paid, overdue, cancelled).",
                                        "example": "paid"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a receivable",
                "operationId": "deleteAReceivable",
                "description": "Elimina una cuenta por cobrar.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Receivable deleted successfully"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Cuenta por cobrar no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Cartera"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "receivable",
                    "description": "The receivable.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/receivables/{receivable}/mark-paid": {
            "post": {
                "summary": "Mark a receivable as fully paid",
                "operationId": "markAReceivableAsFullyPaid",
                "description": "Marca una cuenta por cobrar como completamente pagada.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "paid_amount": {
                                                    "type": "integer"
                                                },
                                                "balance": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "paid_amount",
                                                "balance"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "status": "paid",
                                            "paid_amount": 5000000,
                                            "balance": 0
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Cuenta por cobrar no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Cartera"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "receivable",
                    "description": "UUID of the receivable.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/clients": {
            "get": {
                "summary": "List all clients for a stud",
                "operationId": "listAllClientsForAStud",
                "description": "Get paginated list of clients with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "type",
                        "description": "Filter by type (prospect, lead, customer, vip).",
                        "example": "customer",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by type (prospect, lead, customer, vip).",
                            "example": "customer"
                        }
                    },
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filter by status (active, inactive).",
                        "example": "active",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by status (active, inactive).",
                            "example": "active"
                        }
                    },
                    {
                        "in": "query",
                        "name": "search",
                        "description": "Search by name, email or phone.",
                        "example": "Juan",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Search by name, email or phone.",
                            "example": "Juan"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "type",
                                                    "status"
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": "string"
                                                },
                                                "last": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "to": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "name": null,
                                                "email": null,
                                                "phone": null,
                                                "address": null,
                                                "document_type": null,
                                                "document_number": null,
                                                "type": "prospect",
                                                "status": "active",
                                                "source": null,
                                                "notes": null,
                                                "metadata": null,
                                                "created_at": null,
                                                "updated_at": null
                                            },
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "name": null,
                                                "email": null,
                                                "phone": null,
                                                "address": null,
                                                "document_type": null,
                                                "document_number": null,
                                                "type": "prospect",
                                                "status": "active",
                                                "source": null,
                                                "notes": null,
                                                "metadata": null,
                                                "created_at": null,
                                                "updated_at": null
                                            }
                                        ],
                                        "links": {
                                            "first": "/?page=1",
                                            "last": "/?page=1",
                                            "prev": null,
                                            "next": null
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "from": 1,
                                            "last_page": 1,
                                            "links": [
                                                {
                                                    "url": null,
                                                    "label": "&laquo; Previous",
                                                    "page": null,
                                                    "active": false
                                                },
                                                {
                                                    "url": "/?page=1",
                                                    "label": "1",
                                                    "page": 1,
                                                    "active": true
                                                },
                                                {
                                                    "url": null,
                                                    "label": "Next &raquo;",
                                                    "page": null,
                                                    "active": false
                                                }
                                            ],
                                            "path": "/",
                                            "per_page": 20,
                                            "to": 2,
                                            "total": 2
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ]
            },
            "post": {
                "summary": "Create a new client",
                "operationId": "createANewClient",
                "description": "Crea un nuevo cliente para el criadero.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "type",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "name": null,
                                            "email": null,
                                            "phone": null,
                                            "address": null,
                                            "document_type": null,
                                            "document_number": null,
                                            "type": "prospect",
                                            "status": "active",
                                            "source": null,
                                            "notes": null,
                                            "metadata": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "first_name": {
                                                    "type": "string"
                                                },
                                                "last_name": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "first_name",
                                                "last_name",
                                                "type"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "first_name": "Juan",
                                            "last_name": "Pérez",
                                            "type": "prospect"
                                        },
                                        "message": "Cliente creado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "first_name": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "first_name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "first_name": [
                                                "El campo nombre es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "Tipo (prospect, lead, customer, vip).",
                                        "example": "prospect"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "",
                                        "example": "active",
                                        "enum": [
                                            "active",
                                            "inactive",
                                            "blacklisted"
                                        ]
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "Nombre.",
                                        "example": "Juan"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Apellido.",
                                        "example": "Pérez"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email.",
                                        "example": "juan@example.com",
                                        "nullable": true
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Teléfono.",
                                        "example": "+57 300 1234567",
                                        "nullable": true
                                    },
                                    "whatsapp": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "d",
                                        "nullable": true
                                    },
                                    "document_type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "nit",
                                        "enum": [
                                            "cc",
                                            "nit",
                                            "passport"
                                        ],
                                        "nullable": true
                                    },
                                    "document_number": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "l",
                                        "nullable": true
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "j"
                                    },
                                    "department": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "k",
                                        "nullable": true
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "",
                                        "example": "event",
                                        "enum": [
                                            "web",
                                            "referral",
                                            "social",
                                            "event"
                                        ],
                                        "nullable": true
                                    },
                                    "referrer_id": {
                                        "type": "string",
                                        "description": "The <code>id</code> of an existing record in the studs_clients table.",
                                        "example": null,
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "metadata": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "The <code>id</code> of an existing record in the core_users table.",
                                        "example": null,
                                        "nullable": true
                                    },
                                    "tags": {
                                        "type": "array",
                                        "description": "The <code>id</code> of an existing record in the studs_client_tags table.",
                                        "example": null,
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "first_name",
                                    "last_name"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/clients/stats": {
            "get": {
                "summary": "Get client statistics",
                "operationId": "getClientStatistics",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "by_type": {
                                                    "type": "object",
                                                    "properties": {
                                                        "prospects": {
                                                            "type": "integer"
                                                        },
                                                        "leads": {
                                                            "type": "integer"
                                                        },
                                                        "customers": {
                                                            "type": "integer"
                                                        },
                                                        "vip": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "prospects",
                                                        "leads",
                                                        "customers",
                                                        "vip"
                                                    ]
                                                },
                                                "by_status": {
                                                    "type": "object",
                                                    "properties": {
                                                        "active": {
                                                            "type": "integer"
                                                        },
                                                        "inactive": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "active",
                                                        "inactive"
                                                    ]
                                                },
                                                "total_revenue": {
                                                    "type": "integer"
                                                },
                                                "average_spent": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "by_type",
                                                "by_status",
                                                "total_revenue",
                                                "average_spent"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "total": 50,
                                            "by_type": {
                                                "prospects": 10,
                                                "leads": 15,
                                                "customers": 20,
                                                "vip": 5
                                            },
                                            "by_status": {
                                                "active": 45,
                                                "inactive": 5
                                            },
                                            "total_revenue": 50000000,
                                            "average_spent": 1000000
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Criadero no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/clients/{client_id}": {
            "get": {
                "summary": "Show a specific client",
                "operationId": "showASpecificClient",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "tags": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "total_spent": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "type",
                                                "tags",
                                                "total_spent"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Juan Pérez",
                                            "type": "customer",
                                            "tags": [],
                                            "total_spent": 10000000
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Cliente no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ]
            },
            "put": {
                "summary": "Update a client",
                "operationId": "updateAClient",
                "description": "Actualiza los datos de un cliente existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "first_name": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "first_name",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "first_name": "Juan",
                                            "status": "active"
                                        },
                                        "message": "Cliente actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Cliente no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "customer",
                                        "enum": [
                                            "prospect",
                                            "lead",
                                            "customer",
                                            "vip"
                                        ]
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (active, inactive, blacklisted).",
                                        "example": "active"
                                    },
                                    "first_name": {
                                        "type": "string",
                                        "description": "Nombre.",
                                        "example": "Juan"
                                    },
                                    "last_name": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "n"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 200 characters.",
                                        "example": "ashly64@example.com",
                                        "nullable": true
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "v",
                                        "nullable": true
                                    },
                                    "whatsapp": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "d",
                                        "nullable": true
                                    },
                                    "document_type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "passport",
                                        "enum": [
                                            "cc",
                                            "nit",
                                            "passport"
                                        ],
                                        "nullable": true
                                    },
                                    "document_number": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "l",
                                        "nullable": true
                                    },
                                    "country": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "j"
                                    },
                                    "department": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "k",
                                        "nullable": true
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "",
                                        "example": "event",
                                        "enum": [
                                            "web",
                                            "referral",
                                            "social",
                                            "event"
                                        ],
                                        "nullable": true
                                    },
                                    "referrer_id": {
                                        "type": "string",
                                        "description": "The <code>id</code> of an existing record in the studs_clients table.",
                                        "example": null,
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "metadata": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "The <code>id</code> of an existing record in the core_users table.",
                                        "example": null,
                                        "nullable": true
                                    },
                                    "next_followup_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:40:08",
                                        "nullable": true
                                    },
                                    "tags": {
                                        "type": "array",
                                        "description": "The <code>id</code> of an existing record in the studs_client_tags table.",
                                        "example": null,
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a client",
                "operationId": "deleteAClient",
                "description": "Elimina un cliente del criadero.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Cliente eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Cliente no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "client_id",
                    "description": "The ID of the client.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/clients/{client_id}/convert-to-lead": {
            "post": {
                "summary": "Convert prospect to lead",
                "operationId": "convertProspectToLead",
                "description": "Convierte un prospecto en lead.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "type": "lead"
                                        },
                                        "message": "Cliente convertido a Lead exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Cliente no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "client_id",
                    "description": "The ID of the client.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "client",
                    "description": "UUID of the client.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/clients/{client_id}/convert-to-customer": {
            "post": {
                "summary": "Convert lead to customer",
                "operationId": "convertLeadToCustomer",
                "description": "Convierte un lead en cliente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "type": "customer"
                                        },
                                        "message": "Lead convertido a Cliente exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Cliente no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "client_id",
                    "description": "The ID of the client.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "client",
                    "description": "UUID of the client.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/clients/{client_id}/promote-to-vip": {
            "post": {
                "summary": "Promote customer to VIP",
                "operationId": "promoteCustomerToVIP",
                "description": "Promueve un cliente a VIP.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "type": "vip"
                                        },
                                        "message": "Cliente promovido a VIP exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Cliente no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "client_id",
                    "description": "The ID of the client.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "client",
                    "description": "UUID of the client.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/clients/{client_id}/interactions": {
            "get": {
                "summary": "List all interactions for a client",
                "operationId": "listAllInteractionsForAClient",
                "description": "Get paginated list of client interactions.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "type",
                        "description": "Filter by type (call, email, meeting, etc).",
                        "example": "call",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by type (call, email, meeting, etc).",
                            "example": "call"
                        }
                    },
                    {
                        "in": "query",
                        "name": "outcome",
                        "description": "Filter by outcome.",
                        "example": "successful",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by outcome.",
                            "example": "successful"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [],
                                        "current_page": 1,
                                        "total": 50
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ]
            },
            "post": {
                "summary": "Create a new interaction",
                "operationId": "createANewInteraction",
                "description": "Register a new interaction with a client.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "subject": {
                                                    "type": "string"
                                                },
                                                "outcome": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "type",
                                                "subject",
                                                "outcome"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "type": "call",
                                            "subject": "Seguimiento de venta",
                                            "outcome": "successful"
                                        },
                                        "message": "Interacción creada exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "subject": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "subject"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "subject": [
                                                "El campo asunto es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "Type (call, email, whatsapp, meeting, visit, note).",
                                        "example": "call"
                                    },
                                    "direction": {
                                        "type": "string",
                                        "description": "",
                                        "example": "inbound",
                                        "enum": [
                                            "inbound",
                                            "outbound"
                                        ],
                                        "nullable": true
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Subject.",
                                        "example": "Seguimiento de venta"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description.",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "outcome": {
                                        "type": "string",
                                        "description": "Outcome (successful, no_answer, scheduled).",
                                        "example": "successful",
                                        "nullable": true
                                    },
                                    "duration_minutes": {
                                        "type": "integer",
                                        "description": "Duration in minutes.",
                                        "example": 15,
                                        "nullable": true
                                    },
                                    "next_action": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "d",
                                        "nullable": true
                                    },
                                    "next_action_date": {
                                        "type": "date",
                                        "description": "Next follow-up date.",
                                        "example": "2025-01-10",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "type",
                                    "subject"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "client_id",
                    "description": "The ID of the client.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "client",
                    "description": "UUID of the client.",
                    "example": "550e8400-e29b-41d4-a716-446655440005",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/clients/{client_id}/interactions/{interaction_id}": {
            "put": {
                "summary": "Update an interaction",
                "operationId": "updateAnInteraction",
                "description": "Update an existing client interaction.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "subject": {
                                                    "type": "string"
                                                },
                                                "outcome": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "subject",
                                                "outcome"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "subject": "Seguimiento de venta",
                                            "outcome": "successful"
                                        },
                                        "message": "Interacción actualizada exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Interacción no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "email",
                                        "enum": [
                                            "call",
                                            "email",
                                            "whatsapp",
                                            "meeting",
                                            "visit",
                                            "note"
                                        ]
                                    },
                                    "direction": {
                                        "type": "string",
                                        "description": "",
                                        "example": "inbound",
                                        "enum": [
                                            "inbound",
                                            "outbound"
                                        ],
                                        "nullable": true
                                    },
                                    "subject": {
                                        "type": "string",
                                        "description": "Subject.",
                                        "example": "Seguimiento de venta"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "outcome": {
                                        "type": "string",
                                        "description": "Outcome.",
                                        "example": "successful",
                                        "nullable": true
                                    },
                                    "duration_minutes": {
                                        "type": "integer",
                                        "description": "Must be at least 0.",
                                        "example": 60,
                                        "nullable": true
                                    },
                                    "next_action": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "d",
                                        "nullable": true
                                    },
                                    "next_action_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:40:12",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete an interaction",
                "operationId": "deleteAnInteraction",
                "description": "Elimina una interacción con un cliente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Interacción eliminada exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Interacción no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Clientes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "client_id",
                    "description": "The ID of the client.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "interaction_id",
                    "description": "The ID of the interaction.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "client",
                    "description": "UUID of the client.",
                    "example": "550e8400-e29b-41d4-a716-446655440005",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "interaction",
                    "description": "UUID of the interaction.",
                    "example": "550e8400-e29b-41d4-a716-446655440006",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/contracts": {
            "get": {
                "summary": "List all contracts for a stud",
                "operationId": "listAllContractsForAStud",
                "description": "Get paginated list of contracts with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filter by status (draft, sent, signed, cancelled).",
                        "example": "signed",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by status (draft, sent, signed, cancelled).",
                            "example": "signed"
                        }
                    },
                    {
                        "in": "query",
                        "name": "type",
                        "description": "Filter by type (sale, breeding, boarding).",
                        "example": "sale",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by type (sale, breeding, boarding).",
                            "example": "sale"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": []
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": "string"
                                                },
                                                "last": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "to": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "template_id": null,
                                                "contract_number": null,
                                                "title": null,
                                                "content": null,
                                                "signers": null,
                                                "status": null,
                                                "generated_pdf_url": null,
                                                "signed_pdf_url": null,
                                                "metadata": null,
                                                "expires_at": null,
                                                "created_at": null,
                                                "updated_at": null
                                            },
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "template_id": null,
                                                "contract_number": null,
                                                "title": null,
                                                "content": null,
                                                "signers": null,
                                                "status": null,
                                                "generated_pdf_url": null,
                                                "signed_pdf_url": null,
                                                "metadata": null,
                                                "expires_at": null,
                                                "created_at": null,
                                                "updated_at": null
                                            }
                                        ],
                                        "links": {
                                            "first": "/?page=1",
                                            "last": "/?page=1",
                                            "prev": null,
                                            "next": null
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "from": 1,
                                            "last_page": 1,
                                            "links": [
                                                {
                                                    "url": null,
                                                    "label": "&laquo; Previous",
                                                    "page": null,
                                                    "active": false
                                                },
                                                {
                                                    "url": "/?page=1",
                                                    "label": "1",
                                                    "page": 1,
                                                    "active": true
                                                },
                                                {
                                                    "url": null,
                                                    "label": "Next &raquo;",
                                                    "page": null,
                                                    "active": false
                                                }
                                            ],
                                            "path": "/",
                                            "per_page": 20,
                                            "to": 2,
                                            "total": 2
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Contratos"
                ]
            },
            "post": {
                "summary": "Create a new contract",
                "operationId": "createANewContract",
                "description": "Crea un nuevo contrato para el criadero.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "template_id": null,
                                            "contract_number": null,
                                            "title": null,
                                            "content": null,
                                            "signers": null,
                                            "status": null,
                                            "generated_pdf_url": null,
                                            "signed_pdf_url": null,
                                            "metadata": null,
                                            "expires_at": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "contract_number": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "contract_number",
                                                "type",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "contract_number": "CT-2025-001",
                                            "type": "sale",
                                            "status": "draft"
                                        },
                                        "message": "Contrato creado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "title": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "title"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "title": [
                                                "El campo título es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Contratos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "template_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_contract_templates table.",
                                        "example": "6ff8f7f6-1eb3-3525-be4a-3932c805afed",
                                        "nullable": true
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "Tipo (sale, breeding, lease, partnership, boarding).",
                                        "example": "sale"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Título del contrato.",
                                        "example": "Contrato de Venta"
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "Contenido del contrato.",
                                        "example": "architecto"
                                    },
                                    "data": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "horse_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_horses table.",
                                        "example": "a4855dc5-0acb-33c3-b921-f4291f719ca0",
                                        "nullable": true
                                    },
                                    "breeding_booking_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_breeding_bookings table.",
                                        "example": "c90237e9-ced5-3af6-88ea-84aeaa148878",
                                        "nullable": true
                                    },
                                    "party_a_name": {
                                        "type": "string",
                                        "description": "Nombre de la parte A.",
                                        "example": "Criadero Los Equinos"
                                    },
                                    "party_a_document": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "y",
                                        "nullable": true
                                    },
                                    "party_a_email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 200 characters.",
                                        "example": "justina.gaylord@example.org",
                                        "nullable": true
                                    },
                                    "party_a_phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "ikhwaykcmyuwpwlv",
                                        "nullable": true
                                    },
                                    "party_b_name": {
                                        "type": "string",
                                        "description": "Nombre de la parte B.",
                                        "example": "Juan Pérez"
                                    },
                                    "party_b_document": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "w",
                                        "nullable": true
                                    },
                                    "party_b_email": {
                                        "type": "string",
                                        "description": "Email de la parte B.",
                                        "example": "juan@example.com"
                                    },
                                    "party_b_phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "cpscqldzsnrwtujw",
                                        "nullable": true
                                    },
                                    "effective_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:40:01",
                                        "nullable": true
                                    },
                                    "expiration_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:40:01",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "type",
                                    "title",
                                    "content",
                                    "party_a_name",
                                    "party_b_name",
                                    "party_b_email"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/contracts/{contract_id}": {
            "get": {
                "summary": "Get a single contract",
                "operationId": "getASingleContract",
                "description": "Get full details of a contract including signatures.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "template_id": null,
                                            "contract_number": null,
                                            "title": null,
                                            "content": null,
                                            "signers": null,
                                            "status": null,
                                            "generated_pdf_url": null,
                                            "signed_pdf_url": null,
                                            "metadata": null,
                                            "expires_at": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Contratos"
                ]
            },
            "put": {
                "summary": "Update a contract (only if draft)",
                "operationId": "updateAContractonlyIfDraft",
                "description": "Actualiza un contrato existente (solo si está en borrador).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "title": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "title"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "title": "Contrato de Venta Actualizado"
                                        },
                                        "message": "Contrato actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Contrato no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "not draft",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Solo se pueden editar contratos en borrador"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Contratos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Título del contrato.",
                                        "example": "Contrato de Venta Actualizado"
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "Contenido del contrato.",
                                        "example": "architecto"
                                    },
                                    "data": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "party_a_name": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "n"
                                    },
                                    "party_a_document": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "g",
                                        "nullable": true
                                    },
                                    "party_a_email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 200 characters.",
                                        "example": "rowan.gulgowski@example.com",
                                        "nullable": true
                                    },
                                    "party_a_phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "dljnikhwaykcmyuw",
                                        "nullable": true
                                    },
                                    "party_b_name": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "p"
                                    },
                                    "party_b_document": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "w",
                                        "nullable": true
                                    },
                                    "party_b_email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 200 characters.",
                                        "example": "emelie.baumbach@example.net"
                                    },
                                    "party_b_phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "sitcpscqldzsnrwt",
                                        "nullable": true
                                    },
                                    "effective_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:40:03",
                                        "nullable": true
                                    },
                                    "expiration_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:40:03",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "contract_id",
                    "description": "The ID of the contract.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "contract",
                    "description": "UUID of the contract.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/contracts/{contract_id}/send": {
            "post": {
                "summary": "Send contract for signatures",
                "operationId": "sendContractForSignatures",
                "description": "Envía un contrato para firma de ambas partes.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "signing_urls": {
                                            "type": "object",
                                            "properties": {
                                                "party_a": {
                                                    "type": "string"
                                                },
                                                "party_b": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "party_a",
                                                "party_b"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message",
                                        "signing_urls"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "status": "pending_signatures"
                                        },
                                        "message": "Contrato enviado para firma",
                                        "signing_urls": {
                                            "party_a": "...",
                                            "party_b": "..."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Contrato no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "already sent",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "El contrato ya fue enviado para firma"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Contratos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "contract_id",
                    "description": "The ID of the contract.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "contract",
                    "description": "UUID of the contract.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/contracts/{contract_id}/cancel": {
            "post": {
                "summary": "Cancel a contract",
                "operationId": "cancelAContract",
                "description": "Cancela un contrato (solo si no está firmado).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "cancelled",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "status": "cancelled"
                                        },
                                        "message": "Contrato cancelado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Contrato no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "already signed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "No se puede cancelar un contrato firmado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Contratos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Razón de la cancelación.",
                                        "example": "architecto"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "contract_id",
                    "description": "The ID of the contract.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "contract",
                    "description": "UUID of the contract.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/contracts/{contract_id}/verify": {
            "get": {
                "summary": "Verify contract integrity",
                "operationId": "verifyContractIntegrity",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "is_valid": {
                                                    "type": "boolean"
                                                },
                                                "content_hash": {
                                                    "type": "string"
                                                },
                                                "signed_at": {
                                                    "type": "string"
                                                },
                                                "signatures": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "is_valid",
                                                "content_hash",
                                                "signed_at",
                                                "signatures"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "is_valid": true,
                                            "content_hash": "...",
                                            "signed_at": "2024-12-31T10:00:00Z",
                                            "signatures": []
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Contrato no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Contratos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "contract_id",
                    "description": "The ID of the contract.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/crm/dashboard": {
            "get": {
                "summary": "Get comprehensive CRM dashboard data",
                "operationId": "getComprehensiveCRMDashboardData",
                "description": "Get CRM dashboard statistics including clients, leads, tasks, and revenue.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "clients": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "by_type": {
                                                            "type": "object",
                                                            "properties": []
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "by_type"
                                                    ]
                                                },
                                                "leads": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_active": {
                                                            "type": "integer"
                                                        },
                                                        "by_stage": {
                                                            "type": "object",
                                                            "properties": []
                                                        }
                                                    },
                                                    "required": [
                                                        "total_active",
                                                        "by_stage"
                                                    ]
                                                },
                                                "tasks": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_pending": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total_pending"
                                                    ]
                                                },
                                                "revenue": {
                                                    "type": "object",
                                                    "properties": {
                                                        "current_month": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "current_month"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "clients",
                                                "leads",
                                                "tasks",
                                                "revenue"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "clients": {
                                                "total": 50,
                                                "by_type": []
                                            },
                                            "leads": {
                                                "total_active": 20,
                                                "by_stage": []
                                            },
                                            "tasks": {
                                                "total_pending": 10
                                            },
                                            "revenue": {
                                                "current_month": 5000000
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Dashboard"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/horses": {
            "get": {
                "summary": "List all horses for a stud",
                "operationId": "listAllHorsesForAStud",
                "description": "Get paginated list of horses in a stud with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "sex",
                        "description": "Filter by sex (stallion, mare, gelding).",
                        "example": "stallion",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by sex (stallion, mare, gelding).",
                            "example": "stallion"
                        }
                    },
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filter by status (available, sold, in_service).",
                        "example": "available",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by status (available, sold, in_service).",
                            "example": "available"
                        }
                    },
                    {
                        "in": "query",
                        "name": "for_sale",
                        "description": "Filter horses for sale.",
                        "example": true,
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "description": "Filter horses for sale.",
                            "example": true
                        }
                    },
                    {
                        "in": "query",
                        "name": "search",
                        "description": "Search by name or registration.",
                        "example": "Tornado",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Search by name or registration.",
                            "example": "Tornado"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "sex_label": {
                                                        "type": "string"
                                                    },
                                                    "status_label": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "sex_label",
                                                    "status_label"
                                                ]
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": "string"
                                                },
                                                "last": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "to": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "name": null,
                                                "sex": null,
                                                "birth_date": null,
                                                "color": null,
                                                "height_cm": null,
                                                "markings": null,
                                                "registration_number": null,
                                                "registration_entity": null,
                                                "registration_date": null,
                                                "microchip": null,
                                                "dna_code": null,
                                                "sire_id": null,
                                                "dam_id": null,
                                                "pedigree_entry_id": null,
                                                "status": null,
                                                "for_sale": null,
                                                "sale_price": null,
                                                "sale_currency": null,
                                                "for_stud_service": null,
                                                "stud_fee": null,
                                                "stud_fee_currency": null,
                                                "description": null,
                                                "featured": null,
                                                "public": null,
                                                "metadata": null,
                                                "created_at": null,
                                                "updated_at": null,
                                                "age": null,
                                                "age_string": null,
                                                "sex_label": "",
                                                "status_label": "",
                                                "primary_photo": null
                                            },
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "name": null,
                                                "sex": null,
                                                "birth_date": null,
                                                "color": null,
                                                "height_cm": null,
                                                "markings": null,
                                                "registration_number": null,
                                                "registration_entity": null,
                                                "registration_date": null,
                                                "microchip": null,
                                                "dna_code": null,
                                                "sire_id": null,
                                                "dam_id": null,
                                                "pedigree_entry_id": null,
                                                "status": null,
                                                "for_sale": null,
                                                "sale_price": null,
                                                "sale_currency": null,
                                                "for_stud_service": null,
                                                "stud_fee": null,
                                                "stud_fee_currency": null,
                                                "description": null,
                                                "featured": null,
                                                "public": null,
                                                "metadata": null,
                                                "created_at": null,
                                                "updated_at": null,
                                                "age": null,
                                                "age_string": null,
                                                "sex_label": "",
                                                "status_label": "",
                                                "primary_photo": null
                                            }
                                        ],
                                        "links": {
                                            "first": "/?page=1",
                                            "last": "/?page=1",
                                            "prev": null,
                                            "next": null
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "from": 1,
                                            "last_page": 1,
                                            "links": [
                                                {
                                                    "url": null,
                                                    "label": "&laquo; Previous",
                                                    "page": null,
                                                    "active": false
                                                },
                                                {
                                                    "url": "/?page=1",
                                                    "label": "1",
                                                    "page": 1,
                                                    "active": true
                                                },
                                                {
                                                    "url": null,
                                                    "label": "Next &raquo;",
                                                    "page": null,
                                                    "active": false
                                                }
                                            ],
                                            "path": "/",
                                            "per_page": 20,
                                            "to": 2,
                                            "total": 2
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ejemplares"
                ]
            },
            "post": {
                "summary": "Create a new horse",
                "operationId": "createANewHorse",
                "description": "Crea un nuevo ejemplar para el criadero.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "sex_label": {
                                                    "type": "string"
                                                },
                                                "status_label": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "sex_label",
                                                "status_label"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "name": null,
                                            "sex": null,
                                            "birth_date": null,
                                            "color": null,
                                            "height_cm": null,
                                            "markings": null,
                                            "registration_number": null,
                                            "registration_entity": null,
                                            "registration_date": null,
                                            "microchip": null,
                                            "dna_code": null,
                                            "sire_id": null,
                                            "dam_id": null,
                                            "pedigree_entry_id": null,
                                            "status": null,
                                            "for_sale": null,
                                            "sale_price": null,
                                            "sale_currency": null,
                                            "for_stud_service": null,
                                            "stud_fee": null,
                                            "stud_fee_currency": null,
                                            "description": null,
                                            "featured": null,
                                            "public": null,
                                            "metadata": null,
                                            "created_at": null,
                                            "updated_at": null,
                                            "age": null,
                                            "age_string": null,
                                            "sex_label": "",
                                            "status_label": "",
                                            "primary_photo": null
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "sex": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "sex"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Relámpago",
                                            "sex": "stallion"
                                        },
                                        "message": "Ejemplar creado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "name": [
                                                "El campo nombre es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ejemplares"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre del ejemplar.",
                                        "example": "Relámpago"
                                    },
                                    "sex": {
                                        "type": "string",
                                        "description": "Sexo (stallion, mare, gelding, colt, filly).",
                                        "example": "stallion"
                                    },
                                    "birth_date": {
                                        "type": "date",
                                        "description": "Fecha de nacimiento.",
                                        "example": "2020-05-15",
                                        "nullable": true
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "height_cm": {
                                        "type": "integer",
                                        "description": "Must be at least 50. Must not be greater than 250.",
                                        "example": 7,
                                        "nullable": true
                                    },
                                    "markings": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "registration_number": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "registration_entity": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "g",
                                        "nullable": true
                                    },
                                    "registration_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:34",
                                        "nullable": true
                                    },
                                    "microchip": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "z",
                                        "nullable": true
                                    },
                                    "dna_code": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "m",
                                        "nullable": true
                                    },
                                    "sire_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_horses table.",
                                        "example": "a1a0a47d-e8c3-3cf0-8e6e-c1ff9dca5d1f",
                                        "nullable": true
                                    },
                                    "dam_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_horses table.",
                                        "example": "21c4122b-d554-3723-966c-6d723ea5293f",
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "",
                                        "example": "sold",
                                        "enum": [
                                            "available",
                                            "sold",
                                            "in_service",
                                            "retired",
                                            "deceased",
                                            "reserved"
                                        ]
                                    },
                                    "for_sale": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "sale_price": {
                                        "type": "number",
                                        "description": "Must be at least 0.",
                                        "example": 37,
                                        "nullable": true
                                    },
                                    "sale_currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "jni"
                                    },
                                    "for_stud_service": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "stud_fee": {
                                        "type": "number",
                                        "description": "Must be at least 0.",
                                        "example": 75,
                                        "nullable": true
                                    },
                                    "stud_fee_currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "hwa"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "featured": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "public": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "metadata": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "name",
                                    "sex"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/horses/{horse_id}": {
            "get": {
                "summary": "Get a single horse with full details",
                "operationId": "getASingleHorseWithFullDetails",
                "description": "Get complete details of a horse including pedigree.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "sex_label": {
                                                    "type": "string"
                                                },
                                                "status_label": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "sex_label",
                                                "status_label"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "name": null,
                                            "sex": null,
                                            "birth_date": null,
                                            "color": null,
                                            "height_cm": null,
                                            "markings": null,
                                            "registration_number": null,
                                            "registration_entity": null,
                                            "registration_date": null,
                                            "microchip": null,
                                            "dna_code": null,
                                            "sire_id": null,
                                            "dam_id": null,
                                            "pedigree_entry_id": null,
                                            "status": null,
                                            "for_sale": null,
                                            "sale_price": null,
                                            "sale_currency": null,
                                            "for_stud_service": null,
                                            "stud_fee": null,
                                            "stud_fee_currency": null,
                                            "description": null,
                                            "featured": null,
                                            "public": null,
                                            "metadata": null,
                                            "created_at": null,
                                            "updated_at": null,
                                            "age": null,
                                            "age_string": null,
                                            "sex_label": "",
                                            "status_label": "",
                                            "primary_photo": null
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ejemplares"
                ]
            },
            "put": {
                "summary": "Update a horse",
                "operationId": "updateAHorse",
                "description": "Actualiza los datos de un ejemplar existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Relámpago Actualizado",
                                            "status": "available"
                                        },
                                        "message": "Ejemplar actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Ejemplar no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ejemplares"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre del ejemplar.",
                                        "example": "Relámpago Actualizado"
                                    },
                                    "sex": {
                                        "type": "string",
                                        "description": "",
                                        "example": "stallion",
                                        "enum": [
                                            "stallion",
                                            "mare",
                                            "gelding",
                                            "colt",
                                            "filly"
                                        ]
                                    },
                                    "birth_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:37",
                                        "nullable": true
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "height_cm": {
                                        "type": "integer",
                                        "description": "Must be at least 50. Must not be greater than 250.",
                                        "example": 7,
                                        "nullable": true
                                    },
                                    "markings": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "registration_number": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "registration_entity": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "g",
                                        "nullable": true
                                    },
                                    "registration_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:37",
                                        "nullable": true
                                    },
                                    "microchip": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "z",
                                        "nullable": true
                                    },
                                    "dna_code": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "m",
                                        "nullable": true
                                    },
                                    "sire_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_horses table.",
                                        "example": "a1a0a47d-e8c3-3cf0-8e6e-c1ff9dca5d1f",
                                        "nullable": true
                                    },
                                    "dam_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_horses table.",
                                        "example": "21c4122b-d554-3723-966c-6d723ea5293f",
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (available, sold, in_service, retired, deceased, reserved).",
                                        "example": "available"
                                    },
                                    "for_sale": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "sale_price": {
                                        "type": "number",
                                        "description": "Must be at least 0.",
                                        "example": 37,
                                        "nullable": true
                                    },
                                    "sale_currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "jni"
                                    },
                                    "for_stud_service": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "stud_fee": {
                                        "type": "number",
                                        "description": "Must be at least 0.",
                                        "example": 75,
                                        "nullable": true
                                    },
                                    "stud_fee_currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "hwa"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "featured": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "public": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "metadata": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a horse",
                "operationId": "deleteAHorse",
                "description": "Elimina un ejemplar del criadero.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Ejemplar eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Ejemplar no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ejemplares"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse_id",
                    "description": "The ID of the horse.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID of the horse.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/horses/{horse_id}/pedigree": {
            "get": {
                "summary": "Get horse pedigree tree",
                "operationId": "getHorsePedigreeTree",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": {\"id\": \"...\", \"name\": \"Relámpago\", \"sire\": {...}, \"dam\": {...}, \"generations\": 4}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Ejemplar no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ejemplares"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse_id",
                    "description": "The ID of the horse.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/horses/{horse_id}/offspring": {
            "get": {
                "summary": "Get horse offspring",
                "operationId": "getHorseOffspring",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": [{\"id\": \"...\", \"name\": \"Hijo de Relámpago\", \"birth_date\": \"2023-05-15\", \"sire\": {...}, \"dam\": {...}}]}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Ejemplar no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ejemplares"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse_id",
                    "description": "The ID of the horse.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/simulate-cross": {
            "post": {
                "summary": "Simulate cross between stallion and mare",
                "operationId": "simulateCrossBetweenStallionAndMare",
                "description": "Simula un cruce entre un semental y una yegua, calculando el coeficiente de consanguinidad.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "stallion": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name"
                                                    ]
                                                },
                                                "mare": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name"
                                                    ]
                                                },
                                                "coi": {
                                                    "type": "number"
                                                },
                                                "coi_percentage": {
                                                    "type": "number"
                                                }
                                            },
                                            "required": [
                                                "stallion",
                                                "mare",
                                                "coi",
                                                "coi_percentage"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "stallion": {
                                                "id": "...",
                                                "name": "Semental"
                                            },
                                            "mare": {
                                                "id": "...",
                                                "name": "Yegua"
                                            },
                                            "coi": 0.0125,
                                            "coi_percentage": 1.25,
                                            "warning": null
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "stallion_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "stallion_id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "stallion_id": [
                                                "El semental no existe"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ejemplares"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "stallion_id": {
                                        "type": "string",
                                        "description": "UUID del semental.",
                                        "example": "550e8400-e29b-41d4-a716-446655440001"
                                    },
                                    "mare_id": {
                                        "type": "string",
                                        "description": "UUID de la yegua.",
                                        "example": "550e8400-e29b-41d4-a716-446655440002"
                                    }
                                },
                                "required": [
                                    "stallion_id",
                                    "mare_id"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/client-tags": {
            "get": {
                "summary": "List all tags for a stud",
                "operationId": "listAllTagsForAStud",
                "description": "Get all client tags for a stud.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Etiquetas"
                ]
            },
            "post": {
                "summary": "Create a new tag",
                "operationId": "createANewTag",
                "description": "Create a new client tag.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Etiquetas"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Tag name.",
                                        "example": "VIP"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Color code.",
                                        "example": "#FF5733"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    }
                                },
                                "required": [
                                    "name"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/client-tags/{tag_id}": {
            "put": {
                "summary": "Update a tag",
                "operationId": "updateATag",
                "description": "Update an existing client tag.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Etiquetas"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Tag name.",
                                        "example": "VIP"
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "bngzmiyvdljnikhw"
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a tag",
                "operationId": "deleteATag",
                "description": "Delete a client tag (detaches from all clients first).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Etiqueta eliminada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Etiquetas"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "tag_id",
                    "description": "The ID of the tag.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "tag",
                    "description": "UUID of the tag.",
                    "example": "550e8400-e29b-41d4-a716-446655440008",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/contracts/sign/{token}": {
            "get": {
                "summary": "Get contract details for signing (public endpoint)",
                "operationId": "getContractDetailsForSigningpublicEndpoint",
                "description": "Get contract details for signing using a verification token (no authentication required).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "contract": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "signature": {
                                                    "type": "object",
                                                    "properties": {
                                                        "party": {
                                                            "type": "string"
                                                        },
                                                        "signer_name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "party",
                                                        "signer_name"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "contract",
                                                "signature"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "contract": [],
                                            "signature": {
                                                "party": "party_a",
                                                "signer_name": "Juan Pérez"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Firma"
                ]
            },
            "post": {
                "summary": "Sign a contract (public endpoint)",
                "operationId": "signAContractpublicEndpoint",
                "description": "Sign a contract using a verification token (no authentication required).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "contract_status": {
                                                    "type": "string"
                                                },
                                                "all_signed": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "contract_status",
                                                "all_signed"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Contrato firmado exitosamente",
                                        "data": {
                                            "contract_status": "signed",
                                            "all_signed": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Firma"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "signature_type": {
                                        "type": "string",
                                        "description": "Signature type (simple, drawn).",
                                        "example": "simple"
                                    },
                                    "signature_image": {
                                        "type": "string",
                                        "description": "Signature image (if drawn type).",
                                        "example": "data:image/png;base64,...",
                                        "nullable": true
                                    },
                                    "accept_terms": {
                                        "type": "boolean",
                                        "description": "Must be true.",
                                        "example": true
                                    },
                                    "latitude": {
                                        "type": "number",
                                        "description": "",
                                        "example": 4326.41688,
                                        "nullable": true
                                    },
                                    "longitude": {
                                        "type": "number",
                                        "description": "",
                                        "example": 4326.41688,
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "accept_terms"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "token",
                    "description": "Verification token for contract signing.",
                    "example": "abc123xyz",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/contracts/sign/{token}/reject": {
            "post": {
                "summary": "Reject signing a contract (public endpoint)",
                "operationId": "rejectSigningAContractpublicEndpoint",
                "description": "Reject signing a contract with a reason (no authentication required).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Firma rechazada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Firma"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Reason for rejection.",
                                        "example": "No estoy de acuerdo con los términos"
                                    }
                                },
                                "required": [
                                    "reason"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "token",
                    "description": "Verification token for contract signing.",
                    "example": "abc123xyz",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/expenses": {
            "get": {
                "summary": "Get all expenses for a stud",
                "operationId": "getAllExpensesForAStud",
                "description": "Get paginated list of expenses with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "category_id",
                        "description": "Filter by category.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by category.",
                            "example": "architecto"
                        }
                    },
                    {
                        "in": "query",
                        "name": "horse_id",
                        "description": "Filter by horse.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by horse.",
                            "example": "architecto"
                        }
                    },
                    {
                        "in": "query",
                        "name": "start_date",
                        "description": "Filter from date.",
                        "example": "2024-12-01",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter from date.",
                            "example": "2024-12-01"
                        }
                    },
                    {
                        "in": "query",
                        "name": "end_date",
                        "description": "Filter to date.",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter to date.",
                            "example": "2024-12-31"
                        }
                    },
                    {
                        "in": "query",
                        "name": "payment_method",
                        "description": "Filter by payment method.",
                        "example": "cash",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by payment method.",
                            "example": "cash"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 15,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 15
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [],
                                        "meta": {
                                            "current_page": 1,
                                            "total": 50
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Gastos"
                ]
            },
            "post": {
                "summary": "Create a new expense",
                "operationId": "createANewExpense",
                "description": "Register a new expense for the stud.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Gasto registrado exitosamente",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Gastos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "category_id": {
                                        "type": "string",
                                        "description": "UUID of expense category.",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description.",
                                        "example": "Alimentación mensual"
                                    },
                                    "amount": {
                                        "type": "number",
                                        "description": "Amount.",
                                        "example": 2000000
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Currency code (3 chars).",
                                        "example": "COP",
                                        "nullable": true
                                    },
                                    "date": {
                                        "type": "date",
                                        "description": "Date.",
                                        "example": "2024-12-31"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "Payment method (cash, bank_transfer, credit_card).",
                                        "example": "cash",
                                        "nullable": true
                                    },
                                    "supplier": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "invoice_number": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "k",
                                        "nullable": true
                                    },
                                    "horse_id": {
                                        "type": "string",
                                        "description": "UUID of horse (if applicable).",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "attachments": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "description",
                                    "amount",
                                    "date"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/expenses/{expense}": {
            "get": {
                "summary": "Get a specific expense",
                "operationId": "getASpecificExpense",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": {\"id\": \"...\", \"amount\": 500000, \"description\": \"Alimentación\", \"category\": {...}, \"date\": \"2024-12-31\"}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Gasto no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Gastos"
                ]
            },
            "put": {
                "summary": "Update an expense",
                "operationId": "updateAnExpense",
                "description": "Actualiza un gasto existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": "string"
                                                },
                                                "amount": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "description",
                                                "amount"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "description": "Alimentación mensual",
                                            "amount": 500000
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Gasto no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "amount": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "amount"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "errors"
                                    ],
                                    "example": {
                                        "errors": {
                                            "amount": [
                                                "El monto debe ser mayor a 0"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Gastos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "category_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_expense_categories table.",
                                        "example": "6ff8f7f6-1eb3-3525-be4a-3932c805afed",
                                        "nullable": true
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Descripción.",
                                        "example": "Alimentación mensual"
                                    },
                                    "amount": {
                                        "type": "number",
                                        "description": "Monto.",
                                        "example": 500000
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "ljn"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:40:05"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "",
                                        "example": "other",
                                        "enum": [
                                            "cash",
                                            "bank_transfer",
                                            "credit_card",
                                            "check",
                                            "other"
                                        ],
                                        "nullable": true
                                    },
                                    "supplier": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "invoice_number": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "k",
                                        "nullable": true
                                    },
                                    "horse_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_horses table.",
                                        "example": "5e4f00df-4238-35bd-9edc-0b98dc359c80",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "attachments": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete an expense",
                "operationId": "deleteAnExpense",
                "description": "Elimina un gasto.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Expense deleted successfully"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Gasto no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Gastos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "expense",
                    "description": "The expense.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs": {
            "get": {
                "summary": "List all studs",
                "operationId": "listAllStuds",
                "description": "List all studs for the authenticated user's organizations.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "organization_id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "settings": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object"
                                                        }
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "created_at": {
                                                        "type": "string"
                                                    },
                                                    "updated_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "organization_id",
                                                    "name",
                                                    "settings",
                                                    "status",
                                                    "created_at",
                                                    "updated_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "019b587b-655a-708c-935c-b9867cf38e24",
                                                "organization_id": "019b586b-3920-7147-baf4-96f45d9de981",
                                                "name": "Demo Criadero",
                                                "slug": null,
                                                "description": null,
                                                "logo": null,
                                                "address": null,
                                                "phone": null,
                                                "email": null,
                                                "website": null,
                                                "social_media": null,
                                                "settings": [],
                                                "status": "active",
                                                "created_at": "2025-12-26T02:27:20+00:00",
                                                "updated_at": "2025-12-26T02:27:20+00:00"
                                            },
                                            {
                                                "id": "019b587b-655a-708c-935c-b9867cf38e24",
                                                "organization_id": "019b586b-3920-7147-baf4-96f45d9de981",
                                                "name": "Demo Criadero",
                                                "slug": null,
                                                "description": null,
                                                "logo": null,
                                                "address": null,
                                                "phone": null,
                                                "email": null,
                                                "website": null,
                                                "social_media": null,
                                                "settings": [],
                                                "status": "active",
                                                "created_at": "2025-12-26T02:27:20+00:00",
                                                "updated_at": "2025-12-26T02:27:20+00:00"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Gestión"
                ]
            },
            "post": {
                "summary": "Create a new stud",
                "operationId": "createANewStud",
                "description": "Create a new stud for an organization.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "organization_id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "settings": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": "string"
                                                },
                                                "updated_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "organization_id",
                                                "name",
                                                "settings",
                                                "status",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "019b587b-655a-708c-935c-b9867cf38e24",
                                            "organization_id": "019b586b-3920-7147-baf4-96f45d9de981",
                                            "name": "Demo Criadero",
                                            "slug": null,
                                            "description": null,
                                            "logo": null,
                                            "address": null,
                                            "phone": null,
                                            "email": null,
                                            "website": null,
                                            "social_media": null,
                                            "settings": [],
                                            "status": "active",
                                            "created_at": "2025-12-26T02:27:20+00:00",
                                            "updated_at": "2025-12-26T02:27:20+00:00"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": [],
                                    "example": []
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Gestión"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "organization_id": {
                                        "type": "string",
                                        "description": "UUID of the organization.",
                                        "example": "550e8400-e29b-41d4-a716-446655440000"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the stud.",
                                        "example": "Hacienda El Dorado"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description.",
                                        "example": "Premium breeding stud",
                                        "nullable": true
                                    },
                                    "logo_url": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "http://www.ernser.org/harum-mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html",
                                        "nullable": true
                                    },
                                    "cover_image_url": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "http://swift.com/quidem-nostrum-qui-commodi-incidunt-iure-odit.html",
                                        "nullable": true
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City.",
                                        "example": "Medellín",
                                        "nullable": true
                                    },
                                    "department": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Must not be greater than 300 characters.",
                                        "example": "t",
                                        "nullable": true
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone.",
                                        "example": "+57 300 123 4567",
                                        "nullable": true
                                    },
                                    "whatsapp": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "vlxjklqppwqbewtn",
                                        "nullable": true
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 200 characters.",
                                        "example": "colt.balistreri@example.net",
                                        "nullable": true
                                    },
                                    "instagram": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "p",
                                        "nullable": true
                                    },
                                    "facebook": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "x",
                                        "nullable": true
                                    },
                                    "youtube": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "website": {
                                        "type": "string",
                                        "description": "Must be a valid URL. Must not be greater than 300 characters.",
                                        "example": "t",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "organization_id",
                                    "name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/criaderos/studs/{stud_id}": {
            "get": {
                "summary": "Get a single stud",
                "operationId": "getASingleStud",
                "description": "Get details of a specific stud.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "organization_id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "settings": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "created_at": {
                                                    "type": "string"
                                                },
                                                "updated_at": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "organization_id",
                                                "name",
                                                "settings",
                                                "status",
                                                "created_at",
                                                "updated_at"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "019b587b-655a-708c-935c-b9867cf38e24",
                                            "organization_id": "019b586b-3920-7147-baf4-96f45d9de981",
                                            "name": "Demo Criadero",
                                            "slug": null,
                                            "description": null,
                                            "logo": null,
                                            "address": null,
                                            "phone": null,
                                            "email": null,
                                            "website": null,
                                            "social_media": null,
                                            "settings": [],
                                            "status": "active",
                                            "created_at": "2025-12-26T02:27:20+00:00",
                                            "updated_at": "2025-12-26T02:27:20+00:00"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Gestión"
                ]
            },
            "put": {
                "summary": "Update a stud",
                "operationId": "updateAStud",
                "description": "Actualiza los datos de un criadero existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Hacienda El Dorado Actualizado",
                                            "status": "active"
                                        },
                                        "message": "Criadero actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Criadero no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Gestión"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre del criadero.",
                                        "example": "Hacienda El Dorado Actualizado"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "logo_url": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "http://www.ernser.org/harum-mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html",
                                        "nullable": true
                                    },
                                    "cover_image_url": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "http://swift.com/quidem-nostrum-qui-commodi-incidunt-iure-odit.html",
                                        "nullable": true
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "s",
                                        "nullable": true
                                    },
                                    "department": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Must not be greater than 300 characters.",
                                        "example": "t",
                                        "nullable": true
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "cpscqldzsnrwtujw",
                                        "nullable": true
                                    },
                                    "whatsapp": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "vlxjklqppwqbewtn",
                                        "nullable": true
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 200 characters.",
                                        "example": "colt.balistreri@example.net",
                                        "nullable": true
                                    },
                                    "instagram": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "p",
                                        "nullable": true
                                    },
                                    "facebook": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "x",
                                        "nullable": true
                                    },
                                    "youtube": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "website": {
                                        "type": "string",
                                        "description": "Must be a valid URL. Must not be greater than 300 characters.",
                                        "example": "t",
                                        "nullable": true
                                    },
                                    "settings": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (active, inactive, suspended).",
                                        "example": "active"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a stud",
                "operationId": "deleteAStud",
                "description": "Elimina un criadero.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Criadero eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Criadero no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Gestión"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/dashboard": {
            "get": {
                "summary": "Get stud dashboard stats\nOptimized: Uses single query with subqueries instead of 11 separate queries",
                "operationId": "getStudDashboardStatsOptimizedUsesSingleQueryWithSubqueriesInsteadOf11SeparateQueries",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "total_horses": {
                                                    "type": "integer"
                                                },
                                                "stallions": {
                                                    "type": "integer"
                                                },
                                                "mares": {
                                                    "type": "integer"
                                                },
                                                "pregnancies_active": {
                                                    "type": "integer"
                                                },
                                                "births_this_year": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total_horses",
                                                "stallions",
                                                "mares",
                                                "pregnancies_active",
                                                "births_this_year"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "total_horses": 50,
                                            "stallions": 10,
                                            "mares": 40,
                                            "pregnancies_active": 5,
                                            "births_this_year": 8
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Criadero no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Gestión"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/upload": {
            "post": {
                "summary": "Upload an image to Cloudinary",
                "operationId": "uploadAnImageToCloudinary",
                "description": "Sube una imagen a Cloudinary para el criadero.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "url": {
                                                    "type": "string"
                                                },
                                                "public_id": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "url",
                                                "public_id"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "url": "https://res.cloudinary.com/...",
                                            "public_id": "studs/horses/..."
                                        },
                                        "message": "Imagen subida exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "image": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "image"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "image": [
                                                "El archivo debe ser una imagen válida"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "error"
                                    ],
                                    "example": {
                                        "message": "Error al subir la imagen",
                                        "error": "..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Gestión"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "image": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Imagen (jpeg, png, jpg, gif, webp, máximo 10MB)."
                                    }
                                },
                                "required": [
                                    "image"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/incomes": {
            "get": {
                "summary": "Get all incomes for a stud",
                "operationId": "getAllIncomesForAStud",
                "description": "Get paginated list of incomes with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "category_id",
                        "description": "Filter by category.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by category.",
                            "example": "architecto"
                        }
                    },
                    {
                        "in": "query",
                        "name": "start_date",
                        "description": "Filter from date.",
                        "example": "2024-12-01",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter from date.",
                            "example": "2024-12-01"
                        }
                    },
                    {
                        "in": "query",
                        "name": "end_date",
                        "description": "Filter to date.",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter to date.",
                            "example": "2024-12-31"
                        }
                    },
                    {
                        "in": "query",
                        "name": "payment_method",
                        "description": "Filter by payment method.",
                        "example": "cash",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by payment method.",
                            "example": "cash"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 15,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 15
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [],
                                        "meta": {
                                            "current_page": 1,
                                            "total": 50
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ingresos"
                ]
            },
            "post": {
                "summary": "Create a new income",
                "operationId": "createANewIncome",
                "description": "Register a new income for the stud.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Ingreso registrado exitosamente",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ingresos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "category_id": {
                                        "type": "string",
                                        "description": "UUID of income category.",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description.",
                                        "example": "Venta de potro"
                                    },
                                    "amount": {
                                        "type": "number",
                                        "description": "Amount.",
                                        "example": 10000000
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Currency code (3 chars).",
                                        "example": "COP",
                                        "nullable": true
                                    },
                                    "date": {
                                        "type": "date",
                                        "description": "Date.",
                                        "example": "2024-12-31"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "Payment method (cash, bank_transfer, credit_card).",
                                        "example": "bank_transfer",
                                        "nullable": true
                                    },
                                    "transaction_id": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "attachments": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "description",
                                    "amount",
                                    "date"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/incomes/{income}": {
            "get": {
                "summary": "Get a specific income",
                "operationId": "getASpecificIncome",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": {\"id\": \"...\", \"amount\": 10000000, \"description\": \"Venta de ejemplar\", \"category\": {...}, \"date\": \"2024-12-31\"}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Ingreso no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ingresos"
                ]
            },
            "put": {
                "summary": "Update an income",
                "operationId": "updateAnIncome",
                "description": "Actualiza un ingreso existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": "string"
                                                },
                                                "amount": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "description",
                                                "amount"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "description": "Venta de caballo",
                                            "amount": 10000000
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Ingreso no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "amount": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "amount"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "errors"
                                    ],
                                    "example": {
                                        "errors": {
                                            "amount": [
                                                "El monto debe ser mayor a 0"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ingresos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "category_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_income_categories table.",
                                        "example": "6ff8f7f6-1eb3-3525-be4a-3932c805afed",
                                        "nullable": true
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Descripción.",
                                        "example": "Venta de caballo"
                                    },
                                    "amount": {
                                        "type": "number",
                                        "description": "Monto.",
                                        "example": 10000000
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "ljn"
                                    },
                                    "date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:40:05"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "",
                                        "example": "other",
                                        "enum": [
                                            "cash",
                                            "bank_transfer",
                                            "credit_card",
                                            "check",
                                            "other"
                                        ],
                                        "nullable": true
                                    },
                                    "transaction_id": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "attachments": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete an income",
                "operationId": "deleteAnIncome",
                "description": "Elimina un ingreso.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Income deleted successfully"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Ingreso no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Ingresos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "income",
                    "description": "The income.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/horses/{horse_id}/media": {
            "get": {
                "summary": "List all media for a horse",
                "operationId": "listAllMediaForAHorse",
                "description": "Get all media (photos/videos) for a horse.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "type",
                        "description": "Filter by type (photo, video).",
                        "example": "photo",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by type (photo, video).",
                            "example": "photo"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Media"
                ]
            },
            "post": {
                "summary": "Add media to a horse",
                "operationId": "addMediaToAHorse",
                "description": "Add a new photo or video to a horse.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Media agregada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Media"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "Type (photo, video).",
                                        "example": "photo"
                                    },
                                    "url": {
                                        "type": "string",
                                        "description": "Media URL.",
                                        "example": "https://cloudinary.com/image.jpg"
                                    },
                                    "thumbnail_url": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "https://www.runte.com/ab-provident-perspiciatis-quo-omnis-nostrum-aut-adipisci",
                                        "nullable": true
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Title.",
                                        "example": "Foto de perfil",
                                        "nullable": true
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "is_primary": {
                                        "type": "boolean",
                                        "description": "Set as primary media.",
                                        "example": true
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "",
                                        "example": 16,
                                        "nullable": true
                                    },
                                    "metadata": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "type",
                                    "url"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse_id",
                    "description": "The ID of the horse.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID of the horse.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/horses/{horse_id}/media/{media_id}": {
            "put": {
                "summary": "Update media",
                "operationId": "updateMedia",
                "description": "Update media metadata (title, description, order).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Media actualizada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Media"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title.",
                                        "example": "Foto de perfil",
                                        "nullable": true
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "is_primary": {
                                        "type": "boolean",
                                        "description": "Set as primary media.",
                                        "example": true
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "",
                                        "example": 16,
                                        "nullable": true
                                    },
                                    "metadata": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete media",
                "operationId": "deleteMedia",
                "description": "Delete a media item from a horse.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Media eliminada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Media"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse_id",
                    "description": "The ID of the horse.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "media_id",
                    "description": "The ID of the media.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID of the horse.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "media",
                    "description": "UUID of the media.",
                    "example": "550e8400-e29b-41d4-a716-446655440011",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/horses/{horse_id}/media/reorder": {
            "post": {
                "summary": "Reorder media",
                "operationId": "reorderMedia",
                "description": "Reorder media items for a horse.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Media reordenada exitosamente",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Media"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "order": {
                                        "type": "array",
                                        "description": "Array of media IDs in desired order.",
                                        "example": [
                                            "architecto"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "order"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse_id",
                    "description": "The ID of the horse.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID of the horse.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/horses/{horse_id}/medical": {
            "get": {
                "summary": "List medical records for a horse",
                "operationId": "listMedicalRecordsForAHorse",
                "description": "Get paginated list of medical records for a horse.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "type",
                        "description": "Filter by type (vaccine, deworming, shoeing, exam, treatment, surgery, other).",
                        "example": "vaccine",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by type (vaccine, deworming, shoeing, exam, treatment, surgery, other).",
                            "example": "vaccine"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [],
                                        "current_page": 1,
                                        "total": 50
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Médico"
                ]
            },
            "post": {
                "summary": "Create a new medical record",
                "operationId": "createANewMedicalRecord",
                "description": "Register a new medical record for a horse.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Registro médico creado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Médico"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "Type (vaccine, deworming, shoeing, exam, treatment, surgery, other).",
                                        "example": "vaccine"
                                    },
                                    "date": {
                                        "type": "date",
                                        "description": "Date.",
                                        "example": "2024-12-31"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Name/description.",
                                        "example": "Vacuna antitetánica"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "veterinarian": {
                                        "type": "string",
                                        "description": "Veterinarian name.",
                                        "example": "Dr. García",
                                        "nullable": true
                                    },
                                    "clinic": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "d",
                                        "nullable": true
                                    },
                                    "next_due_date": {
                                        "type": "date",
                                        "description": "Next due date.",
                                        "example": "2025-12-31",
                                        "nullable": true
                                    },
                                    "cost": {
                                        "type": "number",
                                        "description": "Cost.",
                                        "example": 50000,
                                        "nullable": true
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "jni"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "attachments": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "type",
                                    "date",
                                    "name"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse_id",
                    "description": "The ID of the horse.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID of the horse.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/horses/{horse_id}/medical/{record_id}": {
            "get": {
                "summary": "Get a single medical record",
                "operationId": "getASingleMedicalRecord",
                "description": "Get full details of a medical record.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Médico"
                ]
            },
            "put": {
                "summary": "Update a medical record",
                "operationId": "updateAMedicalRecord",
                "description": "Update an existing medical record.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Registro médico actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Médico"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "other",
                                        "enum": [
                                            "vaccine",
                                            "deworming",
                                            "shoeing",
                                            "exam",
                                            "treatment",
                                            "surgery",
                                            "other"
                                        ]
                                    },
                                    "date": {
                                        "type": "date",
                                        "description": "Date.",
                                        "example": "2024-12-31"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Name/description.",
                                        "example": "Vacuna antitetánica"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "veterinarian": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "v",
                                        "nullable": true
                                    },
                                    "clinic": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "d",
                                        "nullable": true
                                    },
                                    "next_due_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:44",
                                        "nullable": true
                                    },
                                    "cost": {
                                        "type": "number",
                                        "description": "Must be at least 0.",
                                        "example": 37,
                                        "nullable": true
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "jni"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "attachments": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a medical record",
                "operationId": "deleteAMedicalRecord",
                "description": "Delete a medical record.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Registro médico eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Médico"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse_id",
                    "description": "The ID of the horse.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "record_id",
                    "description": "The ID of the record.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID of the horse.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "record",
                    "description": "UUID of the medical record.",
                    "example": "550e8400-e29b-41d4-a716-446655440010",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/medical/upcoming": {
            "get": {
                "summary": "Get upcoming medical events (vaccines, deworming, etc.)",
                "operationId": "getUpcomingMedicalEventsvaccinesDewormingEtc",
                "description": "Obtiene eventos médicos próximos a vencer (vacunas, desparasitaciones, etc.).",
                "parameters": [
                    {
                        "in": "query",
                        "name": "days",
                        "description": "Días a futuro para buscar eventos.",
                        "example": 30,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Días a futuro para buscar eventos.",
                            "example": 30
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "horse_id": {
                                                        "type": "string"
                                                    },
                                                    "horse_name": {
                                                        "type": "string"
                                                    },
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "type_label": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "next_due_date": {
                                                        "type": "string"
                                                    },
                                                    "days_until": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "horse_id",
                                                    "horse_name",
                                                    "type",
                                                    "type_label",
                                                    "name",
                                                    "next_due_date",
                                                    "days_until"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "horse_id": "...",
                                                "horse_name": "Relámpago",
                                                "type": "vaccine",
                                                "type_label": "Vacuna",
                                                "name": "Vacuna antitetánica",
                                                "next_due_date": "2025-01-15",
                                                "days_until": 15
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Médico"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/births": {
            "get": {
                "summary": "List all births for a stud",
                "operationId": "listAllBirthsForAStud",
                "description": "Get paginated list of births with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "year",
                        "description": "Filter by year.",
                        "example": 2024,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Filter by year.",
                            "example": 2024
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": []
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": "string"
                                                },
                                                "last": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "to": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "pregnancy_id": null,
                                                "foal_id": null,
                                                "birth_date": null,
                                                "birth_time": null,
                                                "birth_type": null,
                                                "foal_sex": null,
                                                "foal_color": null,
                                                "weight_at_birth": null,
                                                "complications": null,
                                                "complications_notes": null,
                                                "notes": null,
                                                "registered_by": null,
                                                "created_at": null,
                                                "updated_at": null
                                            },
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "pregnancy_id": null,
                                                "foal_id": null,
                                                "birth_date": null,
                                                "birth_time": null,
                                                "birth_type": null,
                                                "foal_sex": null,
                                                "foal_color": null,
                                                "weight_at_birth": null,
                                                "complications": null,
                                                "complications_notes": null,
                                                "notes": null,
                                                "registered_by": null,
                                                "created_at": null,
                                                "updated_at": null
                                            }
                                        ],
                                        "links": {
                                            "first": "/?page=1",
                                            "last": "/?page=1",
                                            "prev": null,
                                            "next": null
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "from": 1,
                                            "last_page": 1,
                                            "links": [
                                                {
                                                    "url": null,
                                                    "label": "&laquo; Previous",
                                                    "page": null,
                                                    "active": false
                                                },
                                                {
                                                    "url": "/?page=1",
                                                    "label": "1",
                                                    "page": 1,
                                                    "active": true
                                                },
                                                {
                                                    "url": null,
                                                    "label": "Next &raquo;",
                                                    "page": null,
                                                    "active": false
                                                }
                                            ],
                                            "path": "/",
                                            "per_page": 20,
                                            "to": 2,
                                            "total": 2
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Nacimientos"
                ]
            },
            "post": {
                "summary": "Register a new birth",
                "operationId": "registerANewBirth",
                "description": "Register a new birth and optionally create foal record.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "pregnancy_id": null,
                                            "foal_id": null,
                                            "birth_date": null,
                                            "birth_time": null,
                                            "birth_type": null,
                                            "foal_sex": null,
                                            "foal_color": null,
                                            "weight_at_birth": null,
                                            "complications": null,
                                            "complications_notes": null,
                                            "notes": null,
                                            "registered_by": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": [],
                                    "example": []
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Nacimientos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "pregnancy_id": {
                                        "type": "string",
                                        "description": "UUID of the pregnancy.",
                                        "example": "550e8400-e29b-41d4-a716-446655440002"
                                    },
                                    "birth_date": {
                                        "type": "date",
                                        "description": "Date of birth.",
                                        "example": "2024-12-31"
                                    },
                                    "birth_time": {
                                        "type": "string",
                                        "description": "Must be a valid date in the format <code>H:i</code>.",
                                        "example": "14:39",
                                        "nullable": true
                                    },
                                    "birth_type": {
                                        "type": "string",
                                        "description": "Type (natural, assisted, cesarean).",
                                        "example": "natural"
                                    },
                                    "foal_sex": {
                                        "type": "string",
                                        "description": "Sex of foal (colt, filly).",
                                        "example": "colt",
                                        "nullable": true
                                    },
                                    "foal_color": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "g",
                                        "nullable": true
                                    },
                                    "weight_at_birth": {
                                        "type": "number",
                                        "description": "Must be at least 0.",
                                        "example": 12,
                                        "nullable": true
                                    },
                                    "complications": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "complications_notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "create_foal": {
                                        "type": "boolean",
                                        "description": "Create foal record automatically.",
                                        "example": true
                                    },
                                    "foal_name": {
                                        "type": "string",
                                        "description": "Name of foal (if create_foal is true).",
                                        "example": "Potro Nuevo",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "pregnancy_id",
                                    "birth_date"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/births/stats": {
            "get": {
                "summary": "Get birth statistics",
                "operationId": "getBirthStatistics",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "year": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "by_sex": {
                                                    "type": "object",
                                                    "properties": {
                                                        "colts": {
                                                            "type": "integer"
                                                        },
                                                        "fillies": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "colts",
                                                        "fillies"
                                                    ]
                                                },
                                                "by_type": {
                                                    "type": "object",
                                                    "properties": {
                                                        "natural": {
                                                            "type": "integer"
                                                        },
                                                        "assisted": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "natural",
                                                        "assisted"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "year",
                                                "total",
                                                "by_sex",
                                                "by_type"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "year": 2024,
                                            "total": 8,
                                            "by_sex": {
                                                "colts": 4,
                                                "fillies": 4
                                            },
                                            "by_type": {
                                                "natural": 6,
                                                "assisted": 2
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Criadero no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Nacimientos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/births/{birth_id}": {
            "get": {
                "summary": "Get a single birth",
                "operationId": "getASingleBirth",
                "description": "Get full details of a birth record.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "pregnancy_id": null,
                                            "foal_id": null,
                                            "birth_date": null,
                                            "birth_time": null,
                                            "birth_type": null,
                                            "foal_sex": null,
                                            "foal_color": null,
                                            "weight_at_birth": null,
                                            "complications": null,
                                            "complications_notes": null,
                                            "notes": null,
                                            "registered_by": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Nacimientos"
                ]
            },
            "put": {
                "summary": "Update a birth record",
                "operationId": "updateABirthRecord",
                "description": "Actualiza un registro de nacimiento.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "birth_date": {
                                                    "type": "string"
                                                },
                                                "birth_type": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "birth_date",
                                                "birth_type"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "birth_date": "2025-01-15",
                                            "birth_type": "natural"
                                        },
                                        "message": "Nacimiento actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Nacimiento no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Nacimientos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "birth_date": {
                                        "type": "date",
                                        "description": "Fecha de nacimiento.",
                                        "example": "2025-01-15"
                                    },
                                    "birth_time": {
                                        "type": "string",
                                        "description": "Must be a valid date in the format <code>H:i</code>.",
                                        "example": "14:39",
                                        "nullable": true
                                    },
                                    "birth_type": {
                                        "type": "string",
                                        "description": "Tipo (natural, assisted, cesarean).",
                                        "example": "natural"
                                    },
                                    "foal_sex": {
                                        "type": "string",
                                        "description": "Sexo del potro (colt, filly).",
                                        "example": "colt",
                                        "nullable": true
                                    },
                                    "foal_color": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "b",
                                        "nullable": true
                                    },
                                    "weight_at_birth": {
                                        "type": "number",
                                        "description": "Must be at least 0.",
                                        "example": 39,
                                        "nullable": true
                                    },
                                    "complications": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "complications_notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "birth_id",
                    "description": "The ID of the birth.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "birth",
                    "description": "UUID of the birth.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/payments": {
            "get": {
                "summary": "Get all payments for a stud",
                "operationId": "getAllPaymentsForAStud",
                "description": "Get paginated list of payments with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "receivable_id",
                        "description": "Filter by receivable.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by receivable.",
                            "example": "architecto"
                        }
                    },
                    {
                        "in": "query",
                        "name": "payment_method",
                        "description": "Filter by payment method.",
                        "example": "cash",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by payment method.",
                            "example": "cash"
                        }
                    },
                    {
                        "in": "query",
                        "name": "start_date",
                        "description": "Filter from date.",
                        "example": "2024-12-01",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter from date.",
                            "example": "2024-12-01"
                        }
                    },
                    {
                        "in": "query",
                        "name": "end_date",
                        "description": "Filter to date.",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter to date.",
                            "example": "2024-12-31"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 15,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 15
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [],
                                        "meta": {
                                            "current_page": 1,
                                            "total": 50
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pagos"
                ]
            },
            "post": {
                "summary": "Create a new payment",
                "operationId": "createANewPayment",
                "description": "Register a new payment for a receivable.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pagos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "receivable_id": {
                                        "type": "string",
                                        "description": "UUID of the receivable.",
                                        "example": "550e8400-e29b-41d4-a716-446655440014"
                                    },
                                    "amount": {
                                        "type": "number",
                                        "description": "Payment amount.",
                                        "example": 5000000
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "zmi",
                                        "nullable": true
                                    },
                                    "payment_date": {
                                        "type": "date",
                                        "description": "Payment date.",
                                        "example": "2024-12-31"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "Method (cash, bank_transfer, credit_card, check, other).",
                                        "example": "bank_transfer"
                                    },
                                    "transaction_id": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "y",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "receivable_id",
                                    "amount",
                                    "payment_date",
                                    "payment_method"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/payments/report": {
            "get": {
                "summary": "Get payments report/summary",
                "operationId": "getPaymentsReportsummary",
                "description": "Obtiene un resumen de pagos con estadísticas por método y mes.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "start_date",
                        "description": "Start date (Y-m-d).",
                        "example": "2024-12-01",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Start date (Y-m-d).",
                            "example": "2024-12-01"
                        }
                    },
                    {
                        "in": "query",
                        "name": "end_date",
                        "description": "End date (Y-m-d).",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "End date (Y-m-d).",
                            "example": "2024-12-31"
                        }
                    },
                    {
                        "in": "query",
                        "name": "period",
                        "description": "Period (this_month, this_year).",
                        "example": "this_month",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Period (this_month, this_year).",
                            "example": "this_month"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "total_amount": {
                                                    "type": "integer"
                                                },
                                                "total_count": {
                                                    "type": "integer"
                                                },
                                                "by_method": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "payment_method": {
                                                                "type": "string"
                                                            },
                                                            "count": {
                                                                "type": "integer"
                                                            },
                                                            "total": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "payment_method",
                                                            "count",
                                                            "total"
                                                        ]
                                                    }
                                                },
                                                "by_month": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "month": {
                                                                "type": "integer"
                                                            },
                                                            "count": {
                                                                "type": "integer"
                                                            },
                                                            "total": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "month",
                                                            "count",
                                                            "total"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "total_amount",
                                                "total_count",
                                                "by_method",
                                                "by_month"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "total_amount": 50000000,
                                            "total_count": 25,
                                            "by_method": [
                                                {
                                                    "payment_method": "cash",
                                                    "count": 10,
                                                    "total": 20000000
                                                }
                                            ],
                                            "by_month": [
                                                {
                                                    "month": 12,
                                                    "count": 5,
                                                    "total": 10000000
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pagos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/payments/{payment}": {
            "get": {
                "summary": "Get a specific payment",
                "operationId": "getASpecificPayment",
                "description": "Get full details of a payment.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pagos"
                ]
            },
            "put": {
                "summary": "Update a payment",
                "operationId": "updateAPayment",
                "description": "Update an existing payment.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pagos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "amount": {
                                        "type": "number",
                                        "description": "Payment amount.",
                                        "example": 5000000
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "ngz"
                                    },
                                    "payment_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:40:05"
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "Payment method.",
                                        "example": "cash"
                                    },
                                    "transaction_id": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "m",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a payment",
                "operationId": "deleteAPayment",
                "description": "Delete a payment record.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Pago eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pagos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "payment",
                    "description": "The payment.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "payment_id",
                    "description": "UUID of the payment.",
                    "example": "550e8400-e29b-41d4-a716-446655440015",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/pedigree/search": {
            "get": {
                "summary": "Buscar pedigrees para vincular",
                "operationId": "buscarPedigreesParaVincular",
                "description": "Search for pedigree entries to link to a horse.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "q",
                        "description": "Search term (min 2 chars).",
                        "example": "Relámpago",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Search term (min 2 chars).",
                            "example": "Relámpago"
                        }
                    },
                    {
                        "in": "query",
                        "name": "limit",
                        "description": "Results limit.",
                        "example": 10,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Results limit.",
                            "example": 10
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pedigree"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/pedigree/horses/{horse}/create": {
            "post": {
                "summary": "Crear pedigree desde un caballo del criadero",
                "operationId": "crearPedigreeDesdeUnCaballoDelCriadero",
                "description": "Create a pedigree entry from a stud horse.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Pedigree creado exitosamente."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pedigree"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID of the horse.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/pedigree/horses/{horse}/link": {
            "post": {
                "summary": "Vincular caballo a un pedigree existente",
                "operationId": "vincularCaballoAUnPedigreeExistente",
                "description": "Link a horse to an existing pedigree entry.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Caballo vinculado al pedigree exitosamente."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pedigree"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "pedigree_entry_id": {
                                        "type": "string",
                                        "description": "UUID of the pedigree entry.",
                                        "example": "550e8400-e29b-41d4-a716-446655440016"
                                    }
                                },
                                "required": [
                                    "pedigree_entry_id"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID of the horse.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/pedigree/horses/{horse}/unlink": {
            "post": {
                "summary": "Desvincular caballo del pedigree",
                "operationId": "desvincularCaballoDelPedigree",
                "description": "Unlink a horse from its pedigree entry.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Pedigree desvinculado exitosamente."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pedigree"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID of the horse.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/pedigree/horses/{horse}/request-verification": {
            "post": {
                "summary": "Solicitar verificación de pedigree",
                "operationId": "solicitarVerificacinDePedigree",
                "description": "Request verification for a pedigree entry.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Solicitud de verificación enviada exitosamente."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pedigree"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "documents": {
                                        "type": "array",
                                        "description": "",
                                        "example": null,
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "string",
                                                    "description": "This field is required when <code>documents</code> is present. Must not be greater than 50 characters.",
                                                    "example": "b"
                                                },
                                                "url": {
                                                    "type": "string",
                                                    "description": "This field is required when <code>documents</code> is present. Must be a valid URL.",
                                                    "example": "http://bailey.com/"
                                                },
                                                "filename": {
                                                    "type": "string",
                                                    "description": "This field is required when <code>documents</code> is present. Must not be greater than 255 characters.",
                                                    "example": "m"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID of the horse.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/pedigree/horses/{horse}/documents": {
            "post": {
                "summary": "Agregar documentos de verificación",
                "operationId": "agregarDocumentosDeVerificacin",
                "description": "Agrega documentos de verificación al pedigree de un caballo.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": {\"id\": \"...\", \"verification_documents\": [...]}, \"message\": \"Documentos agregados exitosamente\"}"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "documents": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "documents"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "documents": [
                                                "El campo documentos es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pedigree"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "documents": {
                                        "type": "array",
                                        "description": "Array de documentos.",
                                        "example": [
                                            {
                                                "type": "certificate",
                                                "url": "https://...",
                                                "filename": "cert.pdf"
                                            }
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "documents"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "UUID of the horse.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/pedigree/horses/{horse}/status": {
            "get": {
                "summary": "Ver estado de verificación",
                "operationId": "verEstadoDeVerificacin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "no pedigree",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "has_pedigree": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "has_pedigree",
                                        "message"
                                    ],
                                    "example": {
                                        "has_pedigree": false,
                                        "message": "Este caballo no tiene un pedigree vinculado."
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Ejemplar no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Pedigree"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "horse",
                    "description": "The horse.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/contract-templates": {
            "get": {
                "summary": "List all contract templates for a stud (including global)",
                "operationId": "listAllContractTemplatesForAStudincludingGlobal",
                "description": "Get all contract templates available for a stud.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Plantillas"
                ]
            },
            "post": {
                "summary": "Create a new template",
                "operationId": "createANewTemplate",
                "description": "Create a new contract template.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Plantilla creada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Plantillas"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "type": {
                                        "type": "string",
                                        "description": "Type (sale, breeding, lease, partnership, boarding).",
                                        "example": "sale"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Template name.",
                                        "example": "Contrato de Venta Estándar"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "Template content (HTML/Markdown).",
                                        "example": "<h1>Contrato de Venta</h1>"
                                    },
                                    "variables": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "is_default": {
                                        "type": "boolean",
                                        "description": "Set as default template for this type.",
                                        "example": true
                                    }
                                },
                                "required": [
                                    "type",
                                    "name",
                                    "content"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/contract-templates/{template_id}": {
            "get": {
                "summary": "Get a single template",
                "operationId": "getASingleTemplate",
                "description": "Get full details of a contract template.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Plantillas"
                ]
            },
            "put": {
                "summary": "Update a template",
                "operationId": "updateATemplate",
                "description": "Update an existing contract template.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Plantilla actualizada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Plantillas"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Template name.",
                                        "example": "Contrato de Venta Estándar"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "content": {
                                        "type": "string",
                                        "description": "Template content.",
                                        "example": "<h1>Contrato de Venta</h1>"
                                    },
                                    "variables": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "is_default": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a template",
                "operationId": "deleteATemplate",
                "description": "Delete a contract template (only if not in use).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Plantilla eliminada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Plantillas"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "template_id",
                    "description": "The ID of the template.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "template",
                    "description": "UUID of the template.",
                    "example": "550e8400-e29b-41d4-a716-446655440013",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/contract-templates/{template_id}/preview": {
            "post": {
                "summary": "Preview template with sample data",
                "operationId": "previewTemplateWithSampleData",
                "description": "Preview a contract template with sample data.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "content": {
                                                    "type": "string"
                                                },
                                                "variables_used": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "content",
                                                "variables_used"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "content": "<h1>Contrato de Venta</h1>...",
                                            "variables_used": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Plantillas"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "data": {
                                        "type": "array",
                                        "description": "Sample data for template variables.",
                                        "example": [
                                            "architecto"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "template_id",
                    "description": "The ID of the template.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "template",
                    "description": "UUID of the template.",
                    "example": "550e8400-e29b-41d4-a716-446655440013",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/pregnancies": {
            "get": {
                "summary": "List all pregnancies for a stud",
                "operationId": "listAllPregnanciesForAStud",
                "description": "Get paginated list of pregnancies with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filter by status (confirmed, in_progress, completed, lost).",
                        "example": "in_progress",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by status (confirmed, in_progress, completed, lost).",
                            "example": "in_progress"
                        }
                    },
                    {
                        "in": "query",
                        "name": "mare_id",
                        "description": "Filter by mare.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by mare.",
                            "example": "architecto"
                        }
                    },
                    {
                        "in": "query",
                        "name": "active_only",
                        "description": "Only show active pregnancies.",
                        "example": true,
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "description": "Only show active pregnancies.",
                            "example": true
                        }
                    },
                    {
                        "in": "query",
                        "name": "due_soon",
                        "description": "Show pregnancies due soon.",
                        "example": true,
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "description": "Show pregnancies due soon.",
                            "example": true
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": []
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": "string"
                                                },
                                                "last": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "to": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "mare_id": null,
                                                "stallion_id": null,
                                                "booking_id": null,
                                                "conception_date": null,
                                                "expected_due_date": null,
                                                "actual_due_date": null,
                                                "status": null,
                                                "ultrasound_dates": null,
                                                "notes": null,
                                                "foal_id": null,
                                                "created_at": null,
                                                "updated_at": null
                                            },
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "mare_id": null,
                                                "stallion_id": null,
                                                "booking_id": null,
                                                "conception_date": null,
                                                "expected_due_date": null,
                                                "actual_due_date": null,
                                                "status": null,
                                                "ultrasound_dates": null,
                                                "notes": null,
                                                "foal_id": null,
                                                "created_at": null,
                                                "updated_at": null
                                            }
                                        ],
                                        "links": {
                                            "first": "/?page=1",
                                            "last": "/?page=1",
                                            "prev": null,
                                            "next": null
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "from": 1,
                                            "last_page": 1,
                                            "links": [
                                                {
                                                    "url": null,
                                                    "label": "&laquo; Previous",
                                                    "page": null,
                                                    "active": false
                                                },
                                                {
                                                    "url": "/?page=1",
                                                    "label": "1",
                                                    "page": 1,
                                                    "active": true
                                                },
                                                {
                                                    "url": null,
                                                    "label": "Next &raquo;",
                                                    "page": null,
                                                    "active": false
                                                }
                                            ],
                                            "path": "/",
                                            "per_page": 20,
                                            "to": 2,
                                            "total": 2
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Preñeces"
                ]
            },
            "post": {
                "summary": "Create a new pregnancy",
                "operationId": "createANewPregnancy",
                "description": "Register a new pregnancy for a mare.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "mare_id": null,
                                            "stallion_id": null,
                                            "booking_id": null,
                                            "conception_date": null,
                                            "expected_due_date": null,
                                            "actual_due_date": null,
                                            "status": null,
                                            "ultrasound_dates": null,
                                            "notes": null,
                                            "foal_id": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": [],
                                    "example": []
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Preñeces"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "mare_id": {
                                        "type": "string",
                                        "description": "UUID of the mare.",
                                        "example": "550e8400-e29b-41d4-a716-446655440012"
                                    },
                                    "stallion_id": {
                                        "type": "string",
                                        "description": "UUID of the stallion.",
                                        "example": "550e8400-e29b-41d4-a716-446655440001"
                                    },
                                    "booking_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_breeding_bookings table.",
                                        "example": "977e5426-8d13-3824-86aa-b092f8ae52c5",
                                        "nullable": true
                                    },
                                    "conception_date": {
                                        "type": "date",
                                        "description": "Conception date.",
                                        "example": "2024-03-15"
                                    },
                                    "expected_due_date": {
                                        "type": "date",
                                        "description": "Expected due date (auto-calculated if not provided).",
                                        "example": "2025-02-19",
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Status (confirmed, in_progress).",
                                        "example": "confirmed"
                                    },
                                    "ultrasound_dates": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "mare_id",
                                    "stallion_id",
                                    "conception_date"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/pregnancies/due-soon": {
            "get": {
                "summary": "Get pregnancies due soon (for alerts)",
                "operationId": "getPregnanciesDueSoonforAlerts",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "mare": {
                                                        "type": "string"
                                                    },
                                                    "stallion": {
                                                        "type": "string"
                                                    },
                                                    "expected_due_date": {
                                                        "type": "string"
                                                    },
                                                    "days_remaining": {
                                                        "type": "integer"
                                                    },
                                                    "progress_percentage": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "mare",
                                                    "stallion",
                                                    "expected_due_date",
                                                    "days_remaining",
                                                    "progress_percentage"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "mare": "Yegua 1",
                                                "stallion": "Semental 1",
                                                "expected_due_date": "2025-01-15",
                                                "days_remaining": 15,
                                                "progress_percentage": 85
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Criadero no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Preñeces"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/pregnancies/{pregnancy_id}": {
            "get": {
                "summary": "Get a single pregnancy",
                "operationId": "getASinglePregnancy",
                "description": "Get full details of a pregnancy including progress.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "mare_id": null,
                                            "stallion_id": null,
                                            "booking_id": null,
                                            "conception_date": null,
                                            "expected_due_date": null,
                                            "actual_due_date": null,
                                            "status": null,
                                            "ultrasound_dates": null,
                                            "notes": null,
                                            "foal_id": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Preñeces"
                ]
            },
            "put": {
                "summary": "Update a pregnancy",
                "operationId": "updateAPregnancy",
                "description": "Update an existing pregnancy record.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "mare_id": null,
                                            "stallion_id": null,
                                            "booking_id": null,
                                            "conception_date": null,
                                            "expected_due_date": null,
                                            "actual_due_date": null,
                                            "status": null,
                                            "ultrasound_dates": null,
                                            "notes": null,
                                            "foal_id": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Preñeces"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "expected_due_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:54",
                                        "nullable": true
                                    },
                                    "actual_due_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:54",
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Status (confirmed, in_progress, completed, lost).",
                                        "example": "in_progress"
                                    },
                                    "ultrasound_dates": {
                                        "type": "array",
                                        "description": "Array of ultrasound dates.",
                                        "example": [
                                            "architecto"
                                        ],
                                        "items": {
                                            "type": "string",
                                            "nullable": true
                                        }
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "pregnancy_id",
                    "description": "The ID of the pregnancy.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "pregnancy",
                    "description": "UUID of the pregnancy.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/pregnancies/{pregnancy_id}/ultrasound": {
            "post": {
                "summary": "Add ultrasound record",
                "operationId": "addUltrasoundRecord",
                "description": "Agrega un registro de ecografía a una preñez.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "ultrasound_dates": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "date": {
                                                                "type": "string"
                                                            },
                                                            "notes": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "date",
                                                            "notes"
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "ultrasound_dates"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "ultrasound_dates": [
                                                {
                                                    "date": "2025-01-15",
                                                    "notes": "Feto saludable"
                                                }
                                            ]
                                        },
                                        "message": "Ecografía registrada exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "date": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "date"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "date": [
                                                "El campo fecha es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Preñeces"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "date": {
                                        "type": "date",
                                        "description": "Fecha de la ecografía.",
                                        "example": "2025-01-15"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Notas.",
                                        "example": "Feto saludable",
                                        "nullable": true
                                    },
                                    "vet": {
                                        "type": "string",
                                        "description": "Veterinario.",
                                        "example": "Dr. Juan Pérez",
                                        "nullable": true
                                    },
                                    "result": {
                                        "type": "string",
                                        "description": "Resultado.",
                                        "example": "Positivo",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "date"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "pregnancy_id",
                    "description": "The ID of the pregnancy.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "pregnancy",
                    "description": "UUID of the pregnancy.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/leads": {
            "get": {
                "summary": "List all leads for a stud",
                "operationId": "listAllLeadsForAStud",
                "description": "Get paginated list of leads with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "stage",
                        "description": "Filter by stage (new, contacted, qualified, proposal, negotiation, won, lost).",
                        "example": "new",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by stage (new, contacted, qualified, proposal, negotiation, won, lost).",
                            "example": "new"
                        }
                    },
                    {
                        "in": "query",
                        "name": "source",
                        "description": "Filter by source.",
                        "example": "website",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by source.",
                            "example": "website"
                        }
                    },
                    {
                        "in": "query",
                        "name": "assigned_to",
                        "description": "Filter by assigned user.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by assigned user.",
                            "example": "architecto"
                        }
                    },
                    {
                        "in": "query",
                        "name": "search",
                        "description": "Search by name, email or phone.",
                        "example": "Juan",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Search by name, email or phone.",
                            "example": "Juan"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 15,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 15
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [],
                                        "current_page": 1,
                                        "total": 50
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Prospectos"
                ]
            },
            "post": {
                "summary": "Create a new lead",
                "operationId": "createANewLead",
                "description": "Create a new sales lead.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Prospectos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_id": {
                                        "type": "string",
                                        "description": "The <code>id</code> of an existing record in the studs_clients table.",
                                        "example": null,
                                        "nullable": true
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the lead.",
                                        "example": "Juan Pérez"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email.",
                                        "example": "juan@ejemplo.com",
                                        "nullable": true
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Phone.",
                                        "example": "+57 300 123 4567",
                                        "nullable": true
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "Source (web, referral, social, event, call).",
                                        "example": "web"
                                    },
                                    "interest_type": {
                                        "type": "string",
                                        "description": "Interest type (buy_horse, breeding_service, boarding, training).",
                                        "example": "buy_horse"
                                    },
                                    "horse_id": {
                                        "type": "string",
                                        "description": "UUID of horse of interest.",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "stage": {
                                        "type": "string",
                                        "description": "Stage (new, contacted, qualified).",
                                        "example": "new"
                                    },
                                    "expected_value": {
                                        "type": "number",
                                        "description": "Expected value.",
                                        "example": 10000000,
                                        "nullable": true
                                    },
                                    "probability": {
                                        "type": "integer",
                                        "description": "Must be at least 0. Must not be greater than 100.",
                                        "example": 1
                                    },
                                    "expected_close_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:40:17",
                                        "nullable": true
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "The <code>id</code> of an existing record in the core_users table.",
                                        "example": null,
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "name",
                                    "source",
                                    "interest_type"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/leads/pipeline": {
            "get": {
                "summary": "Get pipeline view (leads grouped by stage)",
                "operationId": "getPipelineViewleadsGroupedByStage",
                "description": "Get leads organized by sales pipeline stage.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "new": {
                                                    "type": "object",
                                                    "properties": {
                                                        "leads": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object"
                                                            }
                                                        },
                                                        "count": {
                                                            "type": "integer"
                                                        },
                                                        "total_value": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "leads",
                                                        "count",
                                                        "total_value"
                                                    ]
                                                },
                                                "contacted": {
                                                    "type": "object",
                                                    "properties": {
                                                        "leads": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object"
                                                            }
                                                        },
                                                        "count": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "leads",
                                                        "count"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "new",
                                                "contacted"
                                            ]
                                        },
                                        "summary": {
                                            "type": "object",
                                            "properties": {
                                                "total_leads": {
                                                    "type": "integer"
                                                },
                                                "total_value": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total_leads",
                                                "total_value"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "summary"
                                    ],
                                    "example": {
                                        "data": {
                                            "new": {
                                                "leads": [],
                                                "count": 5,
                                                "total_value": 10000000
                                            },
                                            "contacted": {
                                                "leads": [],
                                                "count": 3
                                            }
                                        },
                                        "summary": {
                                            "total_leads": 20,
                                            "total_value": 50000000
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Prospectos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/leads/{lead_id}": {
            "get": {
                "summary": "Get a single lead",
                "operationId": "getASingleLead",
                "description": "Get full details of a lead.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Prospectos"
                ]
            },
            "put": {
                "summary": "Update a lead",
                "operationId": "updateALead",
                "description": "Update an existing lead.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Prospectos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_id": {
                                        "type": "string",
                                        "description": "The <code>id</code> of an existing record in the studs_clients table.",
                                        "example": null,
                                        "nullable": true
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Name of the lead.",
                                        "example": "Juan Pérez"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 200 characters.",
                                        "example": "zbailey@example.net",
                                        "nullable": true
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "source": {
                                        "type": "string",
                                        "description": "",
                                        "example": "referral",
                                        "enum": [
                                            "web",
                                            "referral",
                                            "social",
                                            "event",
                                            "call"
                                        ]
                                    },
                                    "interest_type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "buy_horse",
                                        "enum": [
                                            "buy_horse",
                                            "breeding_service",
                                            "boarding",
                                            "training"
                                        ]
                                    },
                                    "horse_id": {
                                        "type": "string",
                                        "description": "The <code>id</code> of an existing record in the studs_horses table.",
                                        "example": null,
                                        "nullable": true
                                    },
                                    "expected_value": {
                                        "type": "number",
                                        "description": "Expected value.",
                                        "example": 10000000,
                                        "nullable": true
                                    },
                                    "probability": {
                                        "type": "integer",
                                        "description": "Must be at least 0. Must not be greater than 100.",
                                        "example": 1
                                    },
                                    "expected_close_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:40:18",
                                        "nullable": true
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "The <code>id</code> of an existing record in the core_users table.",
                                        "example": null,
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "stage": {
                                        "type": "string",
                                        "description": "Stage.",
                                        "example": "qualified"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a lead",
                "operationId": "deleteALead",
                "description": "Delete a lead.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Lead eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Prospectos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "lead_id",
                    "description": "The ID of the lead.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "lead",
                    "description": "UUID of the lead.",
                    "example": "550e8400-e29b-41d4-a716-446655440007",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/leads/{lead_id}/move-stage": {
            "post": {
                "summary": "Move lead to a different stage",
                "operationId": "moveLeadToADifferentStage",
                "description": "Move a lead to a different stage in the sales pipeline.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Lead movido a qualified exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Prospectos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "stage": {
                                        "type": "string",
                                        "description": "Stage (new, contacted, qualified, proposal, negotiation, won, lost).",
                                        "example": "qualified"
                                    }
                                },
                                "required": [
                                    "stage"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "lead_id",
                    "description": "The ID of the lead.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "lead",
                    "description": "UUID of the lead.",
                    "example": "550e8400-e29b-41d4-a716-446655440007",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/leads/{lead_id}/mark-won": {
            "post": {
                "summary": "Mark lead as won",
                "operationId": "markLeadAsWon",
                "description": "Mark a lead as won (converted to sale).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Lead marcado como ganado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Prospectos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "lead_id",
                    "description": "The ID of the lead.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "lead",
                    "description": "UUID of the lead.",
                    "example": "550e8400-e29b-41d4-a716-446655440007",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/leads/{lead_id}/mark-lost": {
            "post": {
                "summary": "Mark lead as lost",
                "operationId": "markLeadAsLost",
                "description": "Mark a lead as lost with a reason.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Lead marcado como perdido"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Prospectos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "lost_reason": {
                                        "type": "string",
                                        "description": "Reason for loss.",
                                        "example": "Precio muy alto"
                                    }
                                },
                                "required": [
                                    "lost_reason"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "lead_id",
                    "description": "The ID of the lead.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "lead",
                    "description": "UUID of the lead.",
                    "example": "550e8400-e29b-41d4-a716-446655440007",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/financial/dashboard": {
            "get": {
                "summary": "Get financial dashboard/summary",
                "operationId": "getFinancialDashboardsummary",
                "description": "Get financial dashboard with income, expenses, and trends.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "start_date",
                        "description": "Start date (Y-m-d).",
                        "example": "2024-12-01",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Start date (Y-m-d).",
                            "example": "2024-12-01"
                        }
                    },
                    {
                        "in": "query",
                        "name": "end_date",
                        "description": "End date (Y-m-d).",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "End date (Y-m-d).",
                            "example": "2024-12-31"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "summary": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total_income": {
                                                            "type": "integer"
                                                        },
                                                        "total_expense": {
                                                            "type": "integer"
                                                        },
                                                        "balance": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total_income",
                                                        "total_expense",
                                                        "balance"
                                                    ]
                                                },
                                                "income": {
                                                    "type": "object",
                                                    "properties": {
                                                        "by_category": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object"
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "by_category"
                                                    ]
                                                },
                                                "expense": {
                                                    "type": "object",
                                                    "properties": {
                                                        "by_category": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object"
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "by_category"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "summary",
                                                "income",
                                                "expense"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "summary": {
                                                "total_income": 10000000,
                                                "total_expense": 5000000,
                                                "balance": 5000000
                                            },
                                            "income": {
                                                "by_category": []
                                            },
                                            "expense": {
                                                "by_category": []
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "unauthenticated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error",
                                        "message"
                                    ],
                                    "example": {
                                        "error": "Unauthenticated",
                                        "message": "Invalid or expired token"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Reportes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/financial/profit-loss": {
            "get": {
                "summary": "Get profit & loss statement (Estado de Resultados)",
                "operationId": "getProfitLossStatementEstadoDeResultados",
                "description": "Get profit and loss statement for a period.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "start_date",
                        "description": "Start date (Y-m-d).",
                        "example": "2024-01-01",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Start date (Y-m-d).",
                            "example": "2024-01-01"
                        }
                    },
                    {
                        "in": "query",
                        "name": "end_date",
                        "description": "End date (Y-m-d).",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "End date (Y-m-d).",
                            "example": "2024-12-31"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "period": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start_date": {
                                                            "type": "string"
                                                        },
                                                        "end_date": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "start_date",
                                                        "end_date"
                                                    ]
                                                },
                                                "income": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total"
                                                    ]
                                                },
                                                "expenses": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total"
                                                    ]
                                                },
                                                "net_profit": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "period",
                                                "income",
                                                "expenses",
                                                "net_profit"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "period": {
                                                "start_date": "2024-01-01",
                                                "end_date": "2024-12-31"
                                            },
                                            "income": {
                                                "total": 100000000
                                            },
                                            "expenses": {
                                                "total": 50000000
                                            },
                                            "net_profit": 50000000
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Reportes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud}/financial/cash-flow": {
            "get": {
                "summary": "Get cash flow report",
                "operationId": "getCashFlowReport",
                "description": "Get cash flow report for a period.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "start_date",
                        "description": "Start date (Y-m-d).",
                        "example": "2024-01-01",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Start date (Y-m-d).",
                            "example": "2024-01-01"
                        }
                    },
                    {
                        "in": "query",
                        "name": "end_date",
                        "description": "End date (Y-m-d).",
                        "example": "2024-12-31",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "End date (Y-m-d).",
                            "example": "2024-12-31"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "period": {
                                                    "type": "object",
                                                    "properties": {
                                                        "start_date": {
                                                            "type": "string"
                                                        },
                                                        "end_date": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "start_date",
                                                        "end_date"
                                                    ]
                                                },
                                                "cash_in": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total"
                                                    ]
                                                },
                                                "cash_out": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total"
                                                    ]
                                                },
                                                "net_cash_flow": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "period",
                                                "cash_in",
                                                "cash_out",
                                                "net_cash_flow"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "period": {
                                                "start_date": "2024-01-01",
                                                "end_date": "2024-12-31"
                                            },
                                            "cash_in": {
                                                "total": 100000000
                                            },
                                            "cash_out": {
                                                "total": 50000000
                                            },
                                            "net_cash_flow": 50000000
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Reportes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud",
                    "description": "The stud.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/bookings": {
            "get": {
                "summary": "List all breeding bookings for a stud",
                "operationId": "listAllBreedingBookingsForAStud",
                "description": "Get paginated list of breeding bookings with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filter by status (pending, confirmed, completed, cancelled).",
                        "example": "pending",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by status (pending, confirmed, completed, cancelled).",
                            "example": "pending"
                        }
                    },
                    {
                        "in": "query",
                        "name": "result",
                        "description": "Filter by result (pregnant, not_pregnant, unknown).",
                        "example": "pregnant",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by result (pregnant, not_pregnant, unknown).",
                            "example": "pregnant"
                        }
                    },
                    {
                        "in": "query",
                        "name": "stallion_id",
                        "description": "Filter by stallion.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by stallion.",
                            "example": "architecto"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": []
                                            }
                                        },
                                        "links": {
                                            "type": "object",
                                            "properties": {
                                                "first": {
                                                    "type": "string"
                                                },
                                                "last": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "first",
                                                "last"
                                            ]
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "current_page": {
                                                    "type": "integer"
                                                },
                                                "from": {
                                                    "type": "integer"
                                                },
                                                "last_page": {
                                                    "type": "integer"
                                                },
                                                "links": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "label": {
                                                                "type": "string"
                                                            },
                                                            "active": {
                                                                "type": "boolean"
                                                            }
                                                        },
                                                        "required": [
                                                            "label",
                                                            "active"
                                                        ]
                                                    }
                                                },
                                                "path": {
                                                    "type": "string"
                                                },
                                                "per_page": {
                                                    "type": "integer"
                                                },
                                                "to": {
                                                    "type": "integer"
                                                },
                                                "total": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "current_page",
                                                "from",
                                                "last_page",
                                                "links",
                                                "path",
                                                "per_page",
                                                "to",
                                                "total"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "links",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "service_id": null,
                                                "stallion_id": null,
                                                "mare_id": null,
                                                "mare_owner_name": null,
                                                "mare_owner_phone": null,
                                                "mare_owner_email": null,
                                                "mare_external_info": null,
                                                "scheduled_date": null,
                                                "actual_date": null,
                                                "service_type": null,
                                                "price": null,
                                                "currency": null,
                                                "status": null,
                                                "contract_signed": null,
                                                "contract_url": null,
                                                "contract_signed_at": null,
                                                "result": null,
                                                "result_confirmed_at": null,
                                                "notes": null,
                                                "created_at": null,
                                                "updated_at": null
                                            },
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "service_id": null,
                                                "stallion_id": null,
                                                "mare_id": null,
                                                "mare_owner_name": null,
                                                "mare_owner_phone": null,
                                                "mare_owner_email": null,
                                                "mare_external_info": null,
                                                "scheduled_date": null,
                                                "actual_date": null,
                                                "service_type": null,
                                                "price": null,
                                                "currency": null,
                                                "status": null,
                                                "contract_signed": null,
                                                "contract_url": null,
                                                "contract_signed_at": null,
                                                "result": null,
                                                "result_confirmed_at": null,
                                                "notes": null,
                                                "created_at": null,
                                                "updated_at": null
                                            }
                                        ],
                                        "links": {
                                            "first": "/?page=1",
                                            "last": "/?page=1",
                                            "prev": null,
                                            "next": null
                                        },
                                        "meta": {
                                            "current_page": 1,
                                            "from": 1,
                                            "last_page": 1,
                                            "links": [
                                                {
                                                    "url": null,
                                                    "label": "&laquo; Previous",
                                                    "page": null,
                                                    "active": false
                                                },
                                                {
                                                    "url": "/?page=1",
                                                    "label": "1",
                                                    "page": 1,
                                                    "active": true
                                                },
                                                {
                                                    "url": null,
                                                    "label": "Next &raquo;",
                                                    "page": null,
                                                    "active": false
                                                }
                                            ],
                                            "path": "/",
                                            "per_page": 20,
                                            "to": 2,
                                            "total": 2
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Reservas"
                ]
            },
            "post": {
                "summary": "Create a new booking",
                "operationId": "createANewBooking",
                "description": "Create a new breeding service booking.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "service_id": null,
                                            "stallion_id": null,
                                            "mare_id": null,
                                            "mare_owner_name": null,
                                            "mare_owner_phone": null,
                                            "mare_owner_email": null,
                                            "mare_external_info": null,
                                            "scheduled_date": null,
                                            "actual_date": null,
                                            "service_type": null,
                                            "price": null,
                                            "currency": null,
                                            "status": null,
                                            "contract_signed": null,
                                            "contract_url": null,
                                            "contract_signed_at": null,
                                            "result": null,
                                            "result_confirmed_at": null,
                                            "notes": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": [],
                                    "example": []
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Reservas"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "service_id": {
                                        "type": "string",
                                        "description": "UUID of the service.",
                                        "example": "550e8400-e29b-41d4-a716-446655440004"
                                    },
                                    "stallion_id": {
                                        "type": "string",
                                        "description": "UUID of the stallion.",
                                        "example": "550e8400-e29b-41d4-a716-446655440001"
                                    },
                                    "mare_id": {
                                        "type": "string",
                                        "description": "UUID of the mare (if internal).",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "mare_owner_name": {
                                        "type": "string",
                                        "description": "Name of mare owner (if external).",
                                        "example": "Juan Pérez",
                                        "nullable": true
                                    },
                                    "mare_owner_phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "vdljnikhwaykcmyu",
                                        "nullable": true
                                    },
                                    "mare_owner_email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 200 characters.",
                                        "example": "hirthe.theo@example.com",
                                        "nullable": true
                                    },
                                    "mare_external_info": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "scheduled_date": {
                                        "type": "date",
                                        "description": "Scheduled date.",
                                        "example": "2025-01-15",
                                        "nullable": true
                                    },
                                    "price": {
                                        "type": "number",
                                        "description": "Price.",
                                        "example": 5000000
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "wrs"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "service_id",
                                    "stallion_id",
                                    "price"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/bookings/{booking_id}": {
            "get": {
                "summary": "Get a single booking",
                "operationId": "getASingleBooking",
                "description": "Get full details of a breeding booking.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "service_id": null,
                                            "stallion_id": null,
                                            "mare_id": null,
                                            "mare_owner_name": null,
                                            "mare_owner_phone": null,
                                            "mare_owner_email": null,
                                            "mare_external_info": null,
                                            "scheduled_date": null,
                                            "actual_date": null,
                                            "service_type": null,
                                            "price": null,
                                            "currency": null,
                                            "status": null,
                                            "contract_signed": null,
                                            "contract_url": null,
                                            "contract_signed_at": null,
                                            "result": null,
                                            "result_confirmed_at": null,
                                            "notes": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Reservas"
                ]
            },
            "put": {
                "summary": "Update a booking",
                "operationId": "updateABooking",
                "description": "Update an existing breeding booking.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Reserva actualizada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Reservas"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "mare_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_horses table.",
                                        "example": "6ff8f7f6-1eb3-3525-be4a-3932c805afed",
                                        "nullable": true
                                    },
                                    "mare_owner_name": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "g",
                                        "nullable": true
                                    },
                                    "mare_owner_phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 20 characters.",
                                        "example": "zmiyvdljnikhwayk",
                                        "nullable": true
                                    },
                                    "mare_owner_email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 200 characters.",
                                        "example": "lyric80@example.com",
                                        "nullable": true
                                    },
                                    "mare_external_info": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "scheduled_date": {
                                        "type": "date",
                                        "description": "Scheduled date.",
                                        "example": "2025-01-15",
                                        "nullable": true
                                    },
                                    "actual_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:51",
                                        "nullable": true
                                    },
                                    "price": {
                                        "type": "number",
                                        "description": "Must be at least 0.",
                                        "example": 67
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "wlv"
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Status (pending, confirmed, completed, cancelled).",
                                        "example": "confirmed"
                                    },
                                    "result": {
                                        "type": "string",
                                        "description": "",
                                        "example": "pending",
                                        "enum": [
                                            "pregnant",
                                            "not_pregnant",
                                            "pending",
                                            "unknown"
                                        ],
                                        "nullable": true
                                    },
                                    "result_confirmed_at": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:51",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "booking_id",
                    "description": "The ID of the booking.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "booking",
                    "description": "UUID of the booking.",
                    "example": "550e8400-e29b-41d4-a716-446655440003",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/bookings/{booking_id}/cancel": {
            "post": {
                "summary": "Cancel a booking",
                "operationId": "cancelABooking",
                "description": "Cancela una reserva de servicio de monta.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "cancelled",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Reserva cancelada exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Reserva no encontrada"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "already cancelled",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "La reserva ya está cancelada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Reservas"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "booking_id",
                    "description": "The ID of the booking.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "booking",
                    "description": "UUID of the booking.",
                    "example": "550e8400-e29b-41d4-a716-446655440003",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/bookings/{booking_id}/result": {
            "post": {
                "summary": "Update booking result",
                "operationId": "updateBookingResult",
                "description": "Update the result of a breeding booking (pregnant, not_pregnant, etc).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Resultado actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Reservas"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "result": {
                                        "type": "string",
                                        "description": "Result (pregnant, not_pregnant, pending, unknown).",
                                        "example": "pregnant"
                                    },
                                    "result_confirmed_at": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:52",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "result"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "booking_id",
                    "description": "The ID of the booking.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "booking",
                    "description": "UUID of the booking.",
                    "example": "550e8400-e29b-41d4-a716-446655440003",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/services": {
            "get": {
                "summary": "List all breeding services for a stud",
                "operationId": "listAllBreedingServicesForAStud",
                "description": "Get all breeding services offered by the stud.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filter by status (available, fully_booked, unavailable).",
                        "example": "available",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by status (available, fully_booked, unavailable).",
                            "example": "available"
                        }
                    },
                    {
                        "in": "query",
                        "name": "service_type",
                        "description": "Filter by type (natural, fresh_ai, frozen_ai).",
                        "example": "natural",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by type (natural, fresh_ai, frozen_ai).",
                            "example": "natural"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": []
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "stallion_id": null,
                                                "name": null,
                                                "service_type": null,
                                                "description": null,
                                                "fee": null,
                                                "currency": null,
                                                "available_from": null,
                                                "available_to": null,
                                                "terms_and_conditions": null,
                                                "status": null,
                                                "featured": null,
                                                "metadata": null,
                                                "created_at": null,
                                                "updated_at": null
                                            },
                                            {
                                                "id": null,
                                                "stud_id": null,
                                                "stallion_id": null,
                                                "name": null,
                                                "service_type": null,
                                                "description": null,
                                                "fee": null,
                                                "currency": null,
                                                "available_from": null,
                                                "available_to": null,
                                                "terms_and_conditions": null,
                                                "status": null,
                                                "featured": null,
                                                "metadata": null,
                                                "created_at": null,
                                                "updated_at": null
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Servicios"
                ]
            },
            "post": {
                "summary": "Create a new breeding service",
                "operationId": "createANewBreedingService",
                "description": "Create a new breeding service for a stallion.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "stallion_id": null,
                                            "name": null,
                                            "service_type": null,
                                            "description": null,
                                            "fee": null,
                                            "currency": null,
                                            "available_from": null,
                                            "available_to": null,
                                            "terms_and_conditions": null,
                                            "status": null,
                                            "featured": null,
                                            "metadata": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": [],
                                    "example": []
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Servicios"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "stallion_id": {
                                        "type": "string",
                                        "description": "UUID of the stallion.",
                                        "example": "550e8400-e29b-41d4-a716-446655440001"
                                    },
                                    "service_type": {
                                        "type": "string",
                                        "description": "Type (natural, fresh_ai, frozen_ai, embryo_transfer).",
                                        "example": "natural"
                                    },
                                    "price": {
                                        "type": "number",
                                        "description": "Price.",
                                        "example": 5000000
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Currency code (3 chars).",
                                        "example": "COP"
                                    },
                                    "price_notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "conditions": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "guarantee": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "availability_start": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:46",
                                        "nullable": true
                                    },
                                    "availability_end": {
                                        "type": "string",
                                        "description": "Must be a valid date. Must be a date after <code>availability_start</code>.",
                                        "example": "2052-01-24",
                                        "nullable": true
                                    },
                                    "max_mares_per_season": {
                                        "type": "integer",
                                        "description": "Must be at least 1.",
                                        "example": 22,
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Status (available, fully_booked, unavailable).",
                                        "example": "available"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "featured": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    }
                                },
                                "required": [
                                    "stallion_id",
                                    "service_type",
                                    "price"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/services/{service_id}": {
            "get": {
                "summary": "Get a single breeding service",
                "operationId": "getASingleBreedingService",
                "description": "Get full details of a breeding service.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": null,
                                            "stud_id": null,
                                            "stallion_id": null,
                                            "name": null,
                                            "service_type": null,
                                            "description": null,
                                            "fee": null,
                                            "currency": null,
                                            "available_from": null,
                                            "available_to": null,
                                            "terms_and_conditions": null,
                                            "status": null,
                                            "featured": null,
                                            "metadata": null,
                                            "created_at": null,
                                            "updated_at": null
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Servicios"
                ]
            },
            "put": {
                "summary": "Update a breeding service",
                "operationId": "updateABreedingService",
                "description": "Actualiza un servicio de monta existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "price": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "price",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "price": 5000000,
                                            "status": "available"
                                        },
                                        "message": "Servicio de monta actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Servicio de monta no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Servicios"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "stallion_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the studs_horses table.",
                                        "example": "6ff8f7f6-1eb3-3525-be4a-3932c805afed"
                                    },
                                    "service_type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "natural",
                                        "enum": [
                                            "natural",
                                            "fresh_ai",
                                            "frozen_ai",
                                            "embryo_transfer"
                                        ]
                                    },
                                    "price": {
                                        "type": "number",
                                        "description": "Precio.",
                                        "example": 5000000
                                    },
                                    "currency": {
                                        "type": "string",
                                        "description": "Must be 3 characters.",
                                        "example": "zmi"
                                    },
                                    "price_notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "conditions": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "guarantee": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "availability_start": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:47",
                                        "nullable": true
                                    },
                                    "availability_end": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:39:47",
                                        "nullable": true
                                    },
                                    "max_mares_per_season": {
                                        "type": "integer",
                                        "description": "Must be at least 1.",
                                        "example": 22,
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (available, fully_booked, unavailable, seasonal).",
                                        "example": "available"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "featured": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a breeding service",
                "operationId": "deleteABreedingService",
                "description": "Elimina un servicio de monta.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Servicio de monta eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Servicio de monta no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Servicios"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "service_id",
                    "description": "The ID of the service.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "service",
                    "description": "UUID of the service.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/client-tasks": {
            "get": {
                "summary": "List all tasks for a stud",
                "operationId": "listAllTasksForAStud",
                "description": "Get paginated list of client tasks with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filter by status (pending, in_progress, completed, cancelled).",
                        "example": "pending",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by status (pending, in_progress, completed, cancelled).",
                            "example": "pending"
                        }
                    },
                    {
                        "in": "query",
                        "name": "priority",
                        "description": "Filter by priority (low, medium, high, urgent).",
                        "example": "high",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by priority (low, medium, high, urgent).",
                            "example": "high"
                        }
                    },
                    {
                        "in": "query",
                        "name": "assigned_to",
                        "description": "Filter by assigned user.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by assigned user.",
                            "example": "architecto"
                        }
                    },
                    {
                        "in": "query",
                        "name": "client_id",
                        "description": "Filter by client.",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by client.",
                            "example": "architecto"
                        }
                    },
                    {
                        "in": "query",
                        "name": "overdue",
                        "description": "Only show overdue tasks.",
                        "example": true,
                        "required": false,
                        "schema": {
                            "type": "boolean",
                            "description": "Only show overdue tasks.",
                            "example": true
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [],
                                        "current_page": 1,
                                        "total": 50
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Tareas"
                ]
            },
            "post": {
                "summary": "Create a new task",
                "operationId": "createANewTask",
                "description": "Create a new client task.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Tareas"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "client_id": {
                                        "type": "string",
                                        "description": "UUID of the client.",
                                        "example": "550e8400-e29b-41d4-a716-446655440005"
                                    },
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "UUID of assigned user.",
                                        "example": "architecto"
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Task title.",
                                        "example": "Seguimiento de venta"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "Type (call, email, meeting, followup, other).",
                                        "example": "call"
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "Priority (low, medium, high, urgent).",
                                        "example": "high"
                                    },
                                    "due_date": {
                                        "type": "date",
                                        "description": "Due date.",
                                        "example": "2025-01-15"
                                    }
                                },
                                "required": [
                                    "client_id",
                                    "assigned_to",
                                    "title",
                                    "type",
                                    "due_date"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/client-tasks/{task_id}": {
            "get": {
                "summary": "Show a specific task",
                "operationId": "showASpecificTask",
                "description": "Get full details of a client task.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Tareas"
                ]
            },
            "put": {
                "summary": "Update a task",
                "operationId": "updateATask",
                "description": "Update an existing client task.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Tareas"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "assigned_to": {
                                        "type": "string",
                                        "description": "The <code>id</code> of an existing record in the core_users table.",
                                        "example": null
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Task title.",
                                        "example": "Seguimiento de venta"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "email",
                                        "enum": [
                                            "call",
                                            "email",
                                            "meeting",
                                            "followup",
                                            "other"
                                        ]
                                    },
                                    "priority": {
                                        "type": "string",
                                        "description": "",
                                        "example": "medium",
                                        "enum": [
                                            "low",
                                            "medium",
                                            "high",
                                            "urgent"
                                        ]
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Status (pending, in_progress, completed, cancelled).",
                                        "example": "completed"
                                    },
                                    "due_date": {
                                        "type": "date",
                                        "description": "Due date.",
                                        "example": "2025-01-15"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete a task",
                "operationId": "deleteATask",
                "description": "Delete a client task.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Tarea eliminada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Tareas"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "task_id",
                    "description": "The ID of the task.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "task",
                    "description": "UUID of the task.",
                    "example": "550e8400-e29b-41d4-a716-446655440009",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/criaderos/studs/{stud_id}/client-tasks/{task_id}/complete": {
            "post": {
                "summary": "Mark task as completed",
                "operationId": "markTaskAsCompleted",
                "description": "Mark a task as completed.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": [],
                                        "message": "Tarea completada exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🐴 Criaderos / Tareas"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "completion_notes": {
                                        "type": "string",
                                        "description": "Completion notes.",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "stud_id",
                    "description": "The ID of the stud.",
                    "example": "019b587b-655a-708c-935c-b9867cf38e24",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "task_id",
                    "description": "The ID of the task.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "stud",
                    "description": "UUID of the stud.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "task",
                    "description": "UUID of the task.",
                    "example": "550e8400-e29b-41d4-a716-446655440009",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/custom-fields/{publicationType}": {
            "get": {
                "summary": "Obtener configuración completa de custom fields por tipo",
                "operationId": "obtenerConfiguracinCompletaDeCustomFieldsPorTipo",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"publication_type\": {...}, \"categories\": [], \"groups\": [{\"id\": \"...\", \"label\": \"Información Básica\", \"fields\": []}]}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Tipo de publicación no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Campos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "publicationType",
                    "description": "",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/custom-fields/{publicationType}/groups": {
            "post": {
                "summary": "Crear un nuevo grupo de campos",
                "operationId": "crearUnNuevoGrupoDeCampos",
                "description": "",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "label": {
                                            "type": "string"
                                        },
                                        "order": {
                                            "type": "integer"
                                        },
                                        "categories": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "label",
                                        "order",
                                        "categories"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "label": "Información Básica",
                                        "order": 1,
                                        "categories": []
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "label": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "label"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "label": [
                                                "El campo label es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Campos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "b"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "Must be at least 1.",
                                        "example": 16
                                    },
                                    "collapsed": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "category_ids": {
                                        "type": "array",
                                        "description": "The <code>id</code> of an existing record in the marketplace_categories table.",
                                        "example": null,
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "label"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "publicationType",
                    "description": "",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/custom-fields/groups/{groupId}": {
            "put": {
                "summary": "Actualizar un grupo",
                "operationId": "actualizarUnGrupo",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "label": {
                                            "type": "string"
                                        },
                                        "active": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "label",
                                        "active"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "label": "Información Básica Actualizada",
                                        "active": true
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Grupo no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Campos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "b"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "Must be at least 1.",
                                        "example": 16
                                    },
                                    "collapsed": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "active": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "category_ids": {
                                        "type": "array",
                                        "description": "The <code>id</code> of an existing record in the marketplace_categories table.",
                                        "example": null,
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar un grupo (y sus campos)",
                "operationId": "eliminarUnGrupoySusCampos",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Group deleted successfully"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Grupo no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Campos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "groupId",
                    "description": "",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/custom-fields/{publicationType}/groups/reorder": {
            "post": {
                "summary": "Reordenar grupos",
                "operationId": "reordenarGrupos",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Groups reordered successfully"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "groups": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "groups"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "groups": [
                                                "El array de grupos es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Error reordering groups"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Campos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "groups": {
                                        "type": "array",
                                        "description": "",
                                        "example": [
                                            []
                                        ],
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string",
                                                    "description": "The <code>id</code> of an existing record in the custom_field_groups table.",
                                                    "example": "architecto"
                                                },
                                                "order": {
                                                    "type": "integer",
                                                    "description": "Must be at least 1.",
                                                    "example": 22
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "order"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "groups"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "publicationType",
                    "description": "",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/custom-fields/groups/{groupId}/fields": {
            "post": {
                "summary": "Crear un nuevo campo",
                "operationId": "crearUnNuevoCampo",
                "description": "",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "name": {
                                            "type": "string"
                                        },
                                        "label": {
                                            "type": "string"
                                        },
                                        "type": {
                                            "type": "string"
                                        },
                                        "required": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "name",
                                        "label",
                                        "type",
                                        "required"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "name": "precio",
                                        "label": "Precio",
                                        "type": "number",
                                        "required": true
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "name": [
                                                "El campo name es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Campos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "b"
                                    },
                                    "label": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "n"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "tel",
                                        "enum": [
                                            "text",
                                            "number",
                                            "select",
                                            "multiselect",
                                            "textarea",
                                            "checkbox",
                                            "radio",
                                            "date",
                                            "time",
                                            "datetime",
                                            "email",
                                            "url",
                                            "tel",
                                            "file",
                                            "image",
                                            "range",
                                            "color"
                                        ]
                                    },
                                    "required": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "Must be at least 1.",
                                        "example": 67
                                    },
                                    "config": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "help_text": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "error_message": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "show_if": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "name",
                                    "label",
                                    "type"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "groupId",
                    "description": "",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/custom-fields/fields/{fieldId}": {
            "put": {
                "summary": "Actualizar un campo",
                "operationId": "actualizarUnCampo",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "name": {
                                            "type": "string"
                                        },
                                        "label": {
                                            "type": "string"
                                        },
                                        "required": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "name",
                                        "label",
                                        "required"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "name": "precio",
                                        "label": "Precio Actualizado",
                                        "required": false
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Campo no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Campos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "b"
                                    },
                                    "label": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "n"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "color",
                                        "enum": [
                                            "text",
                                            "number",
                                            "select",
                                            "multiselect",
                                            "textarea",
                                            "checkbox",
                                            "radio",
                                            "date",
                                            "time",
                                            "datetime",
                                            "email",
                                            "url",
                                            "tel",
                                            "file",
                                            "image",
                                            "range",
                                            "color"
                                        ]
                                    },
                                    "required": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "Must be at least 1.",
                                        "example": 67
                                    },
                                    "config": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "help_text": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "error_message": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "show_if": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "active": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar un campo",
                "operationId": "eliminarUnCampo",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Field deleted successfully"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Campo no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Campos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "fieldId",
                    "description": "",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/custom-fields/groups/{groupId}/fields/reorder": {
            "post": {
                "summary": "Reordenar campos dentro de un grupo",
                "operationId": "reordenarCamposDentroDeUnGrupo",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Fields reordered successfully"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "fields": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "fields"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "fields": [
                                                "El array de campos es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Error reordering fields"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Campos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "fields": {
                                        "type": "array",
                                        "description": "",
                                        "example": [
                                            []
                                        ],
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string",
                                                    "description": "The <code>id</code> of an existing record in the custom_fields table.",
                                                    "example": "architecto"
                                                },
                                                "order": {
                                                    "type": "integer",
                                                    "description": "Must be at least 1.",
                                                    "example": 22
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "order"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "fields"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "groupId",
                    "description": "",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/categories/batch-update-order": {
            "post": {
                "summary": "Actualizar el orden de múltiples categorías en batch",
                "operationId": "actualizarElOrdenDeMltiplesCategorasEnBatch",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "updated_count": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "updated_count"
                                    ],
                                    "example": {
                                        "message": "Order updated successfully",
                                        "updated_count": 5
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "categories": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "categories"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "categories": [
                                                "El array de categorías es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "error"
                                    ],
                                    "example": {
                                        "message": "Error updating order",
                                        "error": "..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Categorías"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "categories": {
                                        "type": "array",
                                        "description": "Array de objetos con id y order.",
                                        "example": [
                                            {
                                                "id": "uuid-1",
                                                "order": 0
                                            },
                                            {
                                                "id": "uuid-2",
                                                "order": 1
                                            }
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "categories"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/categories": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminCategories",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": [{\"id\": \"...\", \"slug\": \"caballos\", \"label\": \"Caballos\", \"publication_type\": {...}}]}"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Categorías"
                ]
            },
            "post": {
                "summary": "",
                "operationId": "postApiAdminCategories",
                "description": "",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "slug": {
                                            "type": "string"
                                        },
                                        "label": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "slug",
                                        "label"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "slug": "caballos",
                                        "label": "Caballos"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "slug": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "slug"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "slug": [
                                                "El slug ya está en uso"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Categorías"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "publication_type_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the marketplace_publication_types table.",
                                        "example": "6ff8f7f6-1eb3-3525-be4a-3932c805afed"
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto"
                                    },
                                    "label": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "active": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "",
                                        "example": 16
                                    },
                                    "subcategories": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "publication_type_id",
                                    "slug",
                                    "label"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/categories/{id}": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminCategoriesId",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"id\": \"...\", \"slug\": \"caballos\", \"label\": \"Caballos\", \"publication_type\": {...}, \"custom_fields\": []}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Categoría no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Categorías"
                ]
            },
            "put": {
                "summary": "",
                "operationId": "putApiAdminCategoriesId",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "slug": {
                                            "type": "string"
                                        },
                                        "label": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "slug",
                                        "label"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "slug": "caballos",
                                        "label": "Caballos Actualizado"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Categoría no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Categorías"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "publication_type_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the marketplace_publication_types table.",
                                        "example": "6ff8f7f6-1eb3-3525-be4a-3932c805afed"
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "",
                                        "example": null
                                    },
                                    "label": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "active": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "",
                                        "example": 16
                                    },
                                    "subcategories": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "",
                "operationId": "deleteApiAdminCategoriesId",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Category deleted successfully"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Categoría no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Categorías"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the category.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/commission-tiers": {
            "get": {
                "summary": "Listar todos los tiers de comisión",
                "operationId": "listarTodosLosTiersDeComisin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "tiers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "grouped": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "stats": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "active": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "active"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "tiers",
                                                "grouped",
                                                "stats"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "tiers": [],
                                            "grouped": [],
                                            "stats": {
                                                "total": 10,
                                                "active": 8
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Comisiones"
                ]
            }
        },
        "/api/admin/commission-tiers": {
            "get": {
                "summary": "Listar todos los tiers de comisión (Admin)",
                "operationId": "adminListarTiersDeComisin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "tiers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "grouped": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "stats": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "active": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "active"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "tiers",
                                                "grouped",
                                                "stats"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "tiers": [],
                                            "grouped": [],
                                            "stats": {
                                                "total": 10,
                                                "active": 8
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Comisiones"
                ]
            },
            "post": {
                "summary": "Crear un nuevo tier de comisión",
                "operationId": "crearUnNuevoTierDeComisin",
                "description": "",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Tier de comisión creado exitosamente",
                                        "data": {
                                            "id": "...",
                                            "name": "Tier Profesional"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Errores de validación",
                                        "errors": {
                                            "name": [
                                                "El campo nombre es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "error"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Error al crear el tier",
                                        "error": "..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Comisiones"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "b"
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "commission_rate": {
                                        "type": "number",
                                        "description": "Must be at least 0. Must not be greater than 1.",
                                        "example": 1
                                    },
                                    "min_sales_required": {
                                        "type": "integer",
                                        "description": "Must be at least 0.",
                                        "example": 42
                                    },
                                    "min_monthly_revenue": {
                                        "type": "number",
                                        "description": "Must be at least 0.",
                                        "example": 37
                                    },
                                    "seller_type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "basic",
                                        "enum": [
                                            "basic",
                                            "professional",
                                            "organization"
                                        ]
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "is_default": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "requires_verification": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    },
                                    "display_order": {
                                        "type": "integer",
                                        "description": "Must be at least 0.",
                                        "example": 9
                                    },
                                    "benefits": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "name",
                                    "commission_rate",
                                    "seller_type"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/commission-tiers/{id}": {
            "put": {
                "summary": "Actualizar un tier de comisión",
                "operationId": "actualizarUnTierDeComisin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Tier actualizado exitosamente",
                                        "data": {
                                            "id": "...",
                                            "name": "Tier Profesional Actualizado"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Tier no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Errores de validación",
                                        "errors": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Comisiones"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "b"
                                    },
                                    "slug": {
                                        "type": "string",
                                        "description": "",
                                        "example": null
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "commission_rate": {
                                        "type": "number",
                                        "description": "Must be at least 0. Must not be greater than 1.",
                                        "example": 1
                                    },
                                    "min_sales_required": {
                                        "type": "integer",
                                        "description": "Must be at least 0.",
                                        "example": 42
                                    },
                                    "min_monthly_revenue": {
                                        "type": "number",
                                        "description": "Must be at least 0.",
                                        "example": 37
                                    },
                                    "seller_type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "basic",
                                        "enum": [
                                            "basic",
                                            "professional",
                                            "organization"
                                        ]
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "is_default": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "requires_verification": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    },
                                    "display_order": {
                                        "type": "integer",
                                        "description": "Must be at least 0.",
                                        "example": 9
                                    },
                                    "benefits": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar un tier de comisión",
                "operationId": "eliminarUnTierDeComisin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Tier eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "is default",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "No se puede eliminar un tier por defecto"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Tier no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Comisiones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the commission tier.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/commission-tiers/{id}/set-default": {
            "post": {
                "summary": "Establecer un tier como predeterminado",
                "operationId": "establecerUnTierComoPredeterminado",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "is_default": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "is_default"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Tier establecido como predeterminado",
                                        "data": {
                                            "id": "...",
                                            "is_default": true
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Tier no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "error"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Error al establecer tier predeterminado",
                                        "error": "..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Comisiones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the commission tier.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/settings/payment-config": {
            "get": {
                "summary": "Obtener configuración actual",
                "operationId": "obtenerConfiguracinActual",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "no config",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "No hay configuración de pagos",
                                        "data": null
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Configuración"
                ]
            },
            "put": {
                "summary": "Actualizar o crear configuración",
                "operationId": "actualizarOCrearConfiguracin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "provider": {
                                                    "type": "string"
                                                },
                                                "test_mode": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "provider",
                                                "test_mode"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Configuración guardada exitosamente",
                                        "data": {
                                            "id": "...",
                                            "provider": "epayco",
                                            "test_mode": false
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "public_key": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "public_key"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Datos inválidos",
                                        "errors": {
                                            "public_key": [
                                                "La clave pública es requerida"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Error al guardar la configuración: ..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Configuración"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "public_key": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto"
                                    },
                                    "private_key": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto"
                                    },
                                    "p_cust_id_cliente": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto"
                                    },
                                    "p_key": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto"
                                    },
                                    "test_mode": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    }
                                },
                                "required": [
                                    "public_key",
                                    "private_key",
                                    "p_cust_id_cliente",
                                    "p_key",
                                    "test_mode"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/settings/payment-config/test": {
            "post": {
                "summary": "Probar conexión con ePayco",
                "operationId": "probarConexinConEPayco",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Conexión exitosa con ePayco"
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "not configured",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "No hay configuración de ePayco"
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "connection error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Error de conexión: ..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Configuración"
                ]
            }
        },
        "/api/admin/marketplace-access-codes": {
            "get": {
                "summary": "Listar códigos de acceso",
                "operationId": "listarCdigosDeAcceso",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "code": {
                                                        "type": "string"
                                                    },
                                                    "type": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "code",
                                                    "type"
                                                ]
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "code": "ABC123",
                                                "type": "temporary"
                                            }
                                        ],
                                        "current_page": 1,
                                        "total": 50
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Códigos"
                ]
            },
            "post": {
                "summary": "Crear código de acceso",
                "operationId": "crearCdigoDeAcceso",
                "description": "",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "code": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "code",
                                                "type"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ],
                                    "example": {
                                        "message": "Código de acceso creado exitosamente",
                                        "code": {
                                            "id": "...",
                                            "code": "ABC123",
                                            "type": "temporary"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "type": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "type"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "type": [
                                                "El tipo es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Códigos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "temporary",
                                        "enum": [
                                            "temporary",
                                            "permanent",
                                            "one-time"
                                        ]
                                    },
                                    "max_uses": {
                                        "type": "integer",
                                        "description": "Must be at least 1.",
                                        "example": 16,
                                        "nullable": true
                                    },
                                    "expires_at": {
                                        "type": "string",
                                        "description": "Must be a valid date. Must be a date after <code>now</code>.",
                                        "example": "2052-01-25",
                                        "nullable": true
                                    },
                                    "custom_code": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "n",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "type"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/marketplace-access-codes/{id}": {
            "get": {
                "summary": "Mostrar código específico",
                "operationId": "mostrarCdigoEspecfico",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"id\": \"...\", \"code\": \"ABC123\", \"type\": \"temporary\", \"creator\": {...}, \"logs\": []}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Código no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Códigos"
                ]
            },
            "put": {
                "summary": "Actualizar código de acceso",
                "operationId": "actualizarCdigoDeAcceso",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "code": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "code": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "code"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "code"
                                    ],
                                    "example": {
                                        "message": "Código actualizado exitosamente",
                                        "code": {
                                            "id": "...",
                                            "code": "ABC123"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Código no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Códigos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "description": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "max_uses": {
                                        "type": "integer",
                                        "description": "Must be at least 1.",
                                        "example": 16,
                                        "nullable": true
                                    },
                                    "expires_at": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:38:38",
                                        "nullable": true
                                    },
                                    "is_active": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar código de acceso",
                "operationId": "eliminarCdigoDeAcceso",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Código eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Código no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Códigos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the marketplace access code.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/marketplace-access-codes/{id}/stats": {
            "get": {
                "summary": "Ver estadísticas de uso",
                "operationId": "verEstadsticasDeUso",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"code\": {...}, \"stats\": {\"total_uses\": 5, \"remaining_uses\": 5, \"is_valid\": true, \"recent_accesses\": []}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Código no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Códigos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the marketplace access code.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/dashboard": {
            "get": {
                "summary": "Obtener métricas generales del dashboard",
                "operationId": "obtenerMtricasGeneralesDelDashboard",
                "description": "Retorna un resumen de las métricas principales del sistema.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "metrics": {
                                            "type": "object",
                                            "properties": {
                                                "users": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "active": {
                                                            "type": "integer"
                                                        },
                                                        "new_this_month": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "active",
                                                        "new_this_month"
                                                    ]
                                                },
                                                "publications": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "active": {
                                                            "type": "integer"
                                                        },
                                                        "pending_moderation": {
                                                            "type": "integer"
                                                        },
                                                        "flagged": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "active",
                                                        "pending_moderation",
                                                        "flagged"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "users",
                                                "publications"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "metrics"
                                    ],
                                    "example": {
                                        "metrics": {
                                            "users": {
                                                "total": 150,
                                                "active": 145,
                                                "new_this_month": 12
                                            },
                                            "publications": {
                                                "total": 450,
                                                "active": 420,
                                                "pending_moderation": 15,
                                                "flagged": 5
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Dashboard"
                ]
            }
        },
        "/api/admin/metrics/users": {
            "get": {
                "summary": "Get detailed user metrics",
                "operationId": "getDetailedUserMetrics",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "total": {
                                            "type": "integer"
                                        },
                                        "by_status": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "count": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "status",
                                                    "count"
                                                ]
                                            }
                                        },
                                        "by_role": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "role": {
                                                        "type": "string"
                                                    },
                                                    "count": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "role",
                                                    "count"
                                                ]
                                            }
                                        },
                                        "growth": {
                                            "type": "object",
                                            "properties": {
                                                "this_week": {
                                                    "type": "integer"
                                                },
                                                "this_month": {
                                                    "type": "integer"
                                                },
                                                "this_year": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "this_week",
                                                "this_month",
                                                "this_year"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "total",
                                        "by_status",
                                        "by_role",
                                        "growth"
                                    ],
                                    "example": {
                                        "total": 150,
                                        "by_status": [
                                            {
                                                "status": "active",
                                                "count": 145
                                            }
                                        ],
                                        "by_role": [
                                            {
                                                "role": "user",
                                                "count": 140
                                            }
                                        ],
                                        "growth": {
                                            "this_week": 5,
                                            "this_month": 12,
                                            "this_year": 150
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Dashboard"
                ]
            }
        },
        "/api/admin/metrics/publications": {
            "get": {
                "summary": "Get detailed publication metrics",
                "operationId": "getDetailedPublicationMetrics",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "total": {
                                            "type": "integer"
                                        },
                                        "by_status": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "count": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "status",
                                                    "count"
                                                ]
                                            }
                                        },
                                        "by_moderation_status": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "moderation_status": {
                                                        "type": "string"
                                                    },
                                                    "count": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "moderation_status",
                                                    "count"
                                                ]
                                            }
                                        },
                                        "by_category": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "category_id": {
                                                        "type": "string"
                                                    },
                                                    "count": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "category_id",
                                                    "count"
                                                ]
                                            }
                                        },
                                        "growth": {
                                            "type": "object",
                                            "properties": {
                                                "this_week": {
                                                    "type": "integer"
                                                },
                                                "this_month": {
                                                    "type": "integer"
                                                },
                                                "this_year": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "this_week",
                                                "this_month",
                                                "this_year"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "total",
                                        "by_status",
                                        "by_moderation_status",
                                        "by_category",
                                        "growth"
                                    ],
                                    "example": {
                                        "total": 450,
                                        "by_status": [
                                            {
                                                "status": "active",
                                                "count": 420
                                            }
                                        ],
                                        "by_moderation_status": [
                                            {
                                                "moderation_status": "approved",
                                                "count": 400
                                            }
                                        ],
                                        "by_category": [
                                            {
                                                "category_id": "...",
                                                "count": 50
                                            }
                                        ],
                                        "growth": {
                                            "this_week": 10,
                                            "this_month": 45,
                                            "this_year": 450
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Dashboard"
                ]
            }
        },
        "/api/admin/metrics/organizations": {
            "get": {
                "summary": "Get detailed organization metrics",
                "operationId": "getDetailedOrganizationMetrics",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "total": {
                                            "type": "integer"
                                        },
                                        "by_type": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "count": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "type",
                                                    "count"
                                                ]
                                            }
                                        },
                                        "by_status": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "count": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "status",
                                                    "count"
                                                ]
                                            }
                                        },
                                        "growth": {
                                            "type": "object",
                                            "properties": {
                                                "this_week": {
                                                    "type": "integer"
                                                },
                                                "this_month": {
                                                    "type": "integer"
                                                },
                                                "this_year": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "this_week",
                                                "this_month",
                                                "this_year"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "total",
                                        "by_type",
                                        "by_status",
                                        "growth"
                                    ],
                                    "example": {
                                        "total": 25,
                                        "by_type": [
                                            {
                                                "type": "school",
                                                "count": 15
                                            },
                                            {
                                                "type": "breeder",
                                                "count": 10
                                            }
                                        ],
                                        "by_status": [
                                            {
                                                "status": "active",
                                                "count": 23
                                            }
                                        ],
                                        "growth": {
                                            "this_week": 2,
                                            "this_month": 5,
                                            "this_year": 25
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Dashboard"
                ]
            }
        },
        "/api/admin/organizations/{organization_id}/accesses": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminOrganizationsOrganization_idAccesses",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": {\"organization\": {...}, \"accesses\": [{\"id\": \"...\", \"user\": {...}, \"module\": {...}}]}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Organización no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "organization_id",
                    "description": "The ID of the organization.",
                    "example": "0199d51e-d220-7347-843b-226c20f74ecc",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/modules": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminModules",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "order": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "status",
                                                    "order"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "name": "Criaderos",
                                                "status": "active",
                                                "order": 1
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ]
            }
        },
        "/api/admin/modules/{module_id}": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminModulesModule_id",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "accesses_count": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "status",
                                                "accesses_count"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Criaderos",
                                            "status": "active",
                                            "accesses_count": 25
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Módulo no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ]
            },
            "put": {
                "summary": "",
                "operationId": "putApiAdminModulesModule_id",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Criaderos Actualizado",
                                            "status": "active"
                                        },
                                        "message": "Módulo actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Módulo no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "b"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "v",
                                        "nullable": true
                                    },
                                    "base_url": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "http://www.dach.com/mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html",
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "",
                                        "example": "disabled",
                                        "enum": [
                                            "active",
                                            "beta",
                                            "coming_soon",
                                            "disabled"
                                        ]
                                    },
                                    "settings": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "order": {
                                        "type": "integer",
                                        "description": "",
                                        "example": 16
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "module_id",
                    "description": "The ID of the module.",
                    "example": "37c069ce-8ef6-4351-9210-6b57a10c3b7c",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/module-access": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminModuleAccess",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": [{\"id\": \"...\", \"user\": {...}, \"module\": {...}, \"organization\": {...}}], \"meta\": {\"current_page\": 1, \"total\": 50}}"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ]
            },
            "post": {
                "summary": "",
                "operationId": "postApiAdminModuleAccess",
                "description": "",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": {\"id\": \"...\", \"user\": {...}, \"module\": {...}, \"organization\": {...}}, \"message\": \"Acceso creado exitosamente\"}"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "user_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "user_id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "user_id": [
                                                "El usuario es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the core_users table.",
                                        "example": "6ff8f7f6-1eb3-3525-be4a-3932c805afed"
                                    },
                                    "module_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the core_modules table.",
                                        "example": "6b72fe4a-5b40-307c-bc24-f79acf9a1bb9"
                                    },
                                    "organization_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the core_organizations table.",
                                        "example": "977e5426-8d13-3824-86aa-b092f8ae52c5"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "y"
                                    },
                                    "permissions": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "expires_at": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:38:37",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "user_id",
                                    "module_id",
                                    "organization_id",
                                    "role"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/module-access/{access_id}": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminModuleAccessAccess_id",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": {\"id\": \"...\", \"user\": {...}, \"module\": {...}, \"organization\": {...}, \"role\": \"admin\", \"status\": \"active\"}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Acceso no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ]
            },
            "put": {
                "summary": "",
                "operationId": "putApiAdminModuleAccessAccess_id",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "role": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "role",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "role": "manager",
                                            "status": "active"
                                        },
                                        "message": "Acceso actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Acceso no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "role": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "b"
                                    },
                                    "permissions": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "",
                                        "example": "expired",
                                        "enum": [
                                            "active",
                                            "suspended",
                                            "pending",
                                            "expired"
                                        ]
                                    },
                                    "expires_at": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:38:37",
                                        "nullable": true
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "",
                "operationId": "deleteApiAdminModuleAccessAccess_id",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Acceso revocado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Acceso no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "access_id",
                    "description": "The ID of the access.",
                    "example": "019b25c5-f0e4-72da-ab79-15d8c2471a06",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/users/{user_id}/accesses": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminUsersUser_idAccesses",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": {\"user\": {...}, \"accesses\": [{\"id\": \"...\", \"module\": {...}, \"organization\": {...}}]}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Usuario no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "user_id",
                    "description": "The ID of the user.",
                    "example": "019b586a-6be6-7352-95e7-19b926c585ea",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/module-invitations": {
            "post": {
                "summary": "",
                "operationId": "postApiAdminModuleInvitations",
                "description": "",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": {\"id\": \"...\", \"email\": \"usuario@ejemplo.com\", \"module\": {...}, \"organization\": {...}, \"token\": \"...\"}, \"message\": \"Invitación enviada exitosamente\"}"
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "email": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "email"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "email": [
                                                "El email es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 255 characters.",
                                        "example": "gbailey@example.net"
                                    },
                                    "module_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the core_modules table.",
                                        "example": "977e5426-8d13-3824-86aa-b092f8ae52c5"
                                    },
                                    "organization_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the core_organizations table.",
                                        "example": "d6fa562b-acd5-35ff-babb-d11194d3737b"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "d"
                                    },
                                    "permissions": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "email",
                                    "module_id",
                                    "organization_id",
                                    "role"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/module-invitations/pending": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminModuleInvitationsPending",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": [{\"id\": \"...\", \"email\": \"usuario@ejemplo.com\", \"module\": {...}, \"organization\": {...}}], \"meta\": {\"current_page\": 1, \"total\": 10}}"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ]
            }
        },
        "/api/admin/module-invitations/{invitation_id}": {
            "delete": {
                "summary": "",
                "operationId": "deleteApiAdminModuleInvitationsInvitation_id",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Invitación cancelada exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Invitación no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Módulos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "invitation_id",
                    "description": "The ID of the invitation.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/organizations": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminOrganizations",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "type": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "type"
                                                ]
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "name": "Escuela El Refugio",
                                                "type": "school"
                                            }
                                        ],
                                        "current_page": 1,
                                        "total": 25
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Organizaciones"
                ]
            },
            "post": {
                "summary": "Crear una nueva organización",
                "operationId": "crearUnaNuevaOrganizacin",
                "description": "Crea una nueva organización (escuela, criadero, etc).",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "name": {
                                            "type": "string"
                                        },
                                        "type": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "owner": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "name",
                                        "type",
                                        "status",
                                        "owner"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "name": "Hacienda Los Robles",
                                        "type": "school",
                                        "status": "active",
                                        "owner": {
                                            "id": "...",
                                            "name": "..."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "name": [
                                                "El campo nombre es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Organizaciones"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre de la organización.",
                                        "example": "Hacienda Los Robles"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "Tipo de organización (school, breeder, stable, other).",
                                        "example": "school"
                                    },
                                    "owner_id": {
                                        "type": "string",
                                        "description": "ID del usuario propietario.",
                                        "example": "0199d51e-d220-7347-843b-226c20f74ecc"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Descripción de la organización.",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "contact_email": {
                                        "type": "string",
                                        "description": "Email de contacto.",
                                        "example": "gbailey@example.net",
                                        "nullable": true
                                    },
                                    "contact_phone": {
                                        "type": "string",
                                        "description": "Teléfono de contacto.",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "enabled_modules": {
                                        "type": "array",
                                        "description": "Módulos habilitados.",
                                        "example": [
                                            "architecto"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "name",
                                    "type",
                                    "owner_id"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/organizations/{id}": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminOrganizationsId",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"id\": \"...\", \"name\": \"Escuela El Refugio\", \"type\": \"school\", \"owner\": {...}, \"member_records\": []}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Organización no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Organizaciones"
                ]
            },
            "put": {
                "summary": "Actualizar organización",
                "operationId": "actualizarOrganizacin",
                "description": "Actualiza los datos de una organización existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "name": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "name",
                                        "status"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "name": "Hacienda Los Robles Actualizado",
                                        "status": "active"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Organización no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Organizaciones"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Nombre de la organización.",
                                        "example": "Hacienda Los Robles Actualizado"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (active, inactive, suspended).",
                                        "example": "active"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto"
                                    },
                                    "owner_id": {
                                        "type": "string",
                                        "description": "The <code>id</code> of an existing record in the core_users table.",
                                        "example": "architecto"
                                    },
                                    "contact_email": {
                                        "type": "string",
                                        "description": "Must be a valid email address. Must not be greater than 255 characters.",
                                        "example": "zbailey@example.net",
                                        "nullable": true
                                    },
                                    "contact_phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "whatsapp_business": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "y",
                                        "nullable": true
                                    },
                                    "address_street": {
                                        "type": "string",
                                        "description": "Must not be greater than 500 characters.",
                                        "example": "v",
                                        "nullable": true
                                    },
                                    "address_city": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "d",
                                        "nullable": true
                                    },
                                    "address_department": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "l",
                                        "nullable": true
                                    },
                                    "address_country": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "j",
                                        "nullable": true
                                    },
                                    "enabled_modules": {
                                        "type": "array",
                                        "description": "",
                                        "example": [
                                            "escuelas"
                                        ],
                                        "items": {
                                            "type": "string",
                                            "enum": [
                                                "marketplace",
                                                "escuelas",
                                                "criaderos",
                                                "veterinaria",
                                                "pesebrera",
                                                "servicios_profesionales"
                                            ]
                                        }
                                    },
                                    "settings": {
                                        "type": "object",
                                        "description": "",
                                        "example": null,
                                        "properties": [],
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar organización",
                "operationId": "eliminarOrganizacin",
                "description": "Elimina una organización.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Organization deleted successfully"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Organización no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Organizaciones"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Razón de la eliminación.",
                                        "example": "architecto"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the organization.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/organizations/{id}/members": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminOrganizationsIdMembers",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "role": {
                                                        "type": "string"
                                                    },
                                                    "user": {
                                                        "type": "object",
                                                        "properties": {
                                                            "id": {
                                                                "type": "string"
                                                            },
                                                            "name": {
                                                                "type": "string"
                                                            }
                                                        },
                                                        "required": [
                                                            "id",
                                                            "name"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "role",
                                                    "user"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "role": "admin",
                                                "user": {
                                                    "id": "...",
                                                    "name": "..."
                                                }
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Organización no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Organizaciones"
                ]
            },
            "post": {
                "summary": "Agregar un miembro a la organización",
                "operationId": "agregarUnMiembroALaOrganizacin",
                "description": "Agrega un nuevo miembro a la organización.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "created",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "user_id": {
                                            "type": "string"
                                        },
                                        "role": {
                                            "type": "string"
                                        },
                                        "user": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "user_id",
                                        "role",
                                        "user"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "user_id": "...",
                                        "role": "admin",
                                        "user": {
                                            "id": "...",
                                            "name": "..."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "is owner",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "El propietario ya es miembro de la organización"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "user_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "user_id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "user_id": [
                                                "El usuario no existe"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Organizaciones"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_id": {
                                        "type": "string",
                                        "description": "UUID del usuario.",
                                        "example": "550e8400-e29b-41d4-a716-446655440001"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "Rol (admin, manager, instructor, secretary, viewer).",
                                        "example": "admin"
                                    }
                                },
                                "required": [
                                    "user_id",
                                    "role"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the organization.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/organizations/{id}/members/{memberId}": {
            "put": {
                "summary": "Actualizar el rol de un miembro",
                "operationId": "actualizarElRolDeUnMiembro",
                "description": "Actualiza el rol de un miembro de la organización.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "role": {
                                            "type": "string"
                                        },
                                        "user": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "role",
                                        "user"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "role": "manager",
                                        "user": {
                                            "id": "...",
                                            "name": "..."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Miembro no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Organizaciones"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "role": {
                                        "type": "string",
                                        "description": "Rol (admin, manager, instructor, secretary, viewer).",
                                        "example": "manager"
                                    }
                                },
                                "required": [
                                    "role"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar un miembro de la organización",
                "operationId": "eliminarUnMiembroDeLaOrganizacin",
                "description": "Elimina un miembro de la organización.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Miembro eliminado correctamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Miembro no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Organizaciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID de la organización.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "memberId",
                    "description": "UUID del miembro.",
                    "example": "550e8400-e29b-41d4-a716-446655440002",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/organizations/{id}/sync-access": {
            "post": {
                "summary": "Sincronizar accesos al módulo para una organización existente",
                "operationId": "sincronizarAccesosAlMduloParaUnaOrganizacinExistente",
                "description": "Crea los registros de ModuleAccess para el owner si no existen.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "organization": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "organization"
                                    ],
                                    "example": {
                                        "message": "Accesos al módulo sincronizados correctamente",
                                        "organization": {
                                            "id": "...",
                                            "name": "..."
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "no owner",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "La organización no tiene un owner asignado"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Organización no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Organizaciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID de la organización.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/pedigree/stats": {
            "get": {
                "summary": "Obtener estadísticas",
                "operationId": "obtenerEstadsticas",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "verification": {
                                            "type": "object",
                                            "properties": {
                                                "pending": {
                                                    "type": "integer"
                                                },
                                                "approved": {
                                                    "type": "integer"
                                                },
                                                "rejected": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "pending",
                                                "approved",
                                                "rejected"
                                            ]
                                        },
                                        "usage": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "in_studs": {
                                                    "type": "integer"
                                                },
                                                "in_schools": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "in_studs",
                                                "in_schools"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "verification",
                                        "usage"
                                    ],
                                    "example": {
                                        "verification": {
                                            "pending": 10,
                                            "approved": 50,
                                            "rejected": 5
                                        },
                                        "usage": {
                                            "total": 100,
                                            "in_studs": 60,
                                            "in_schools": 40
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ]
            }
        },
        "/api/admin/pedigree/search": {
            "get": {
                "summary": "Buscar pedigrees (para autocompletado)",
                "operationId": "buscarPedigreesparaAutocompletado",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "short term",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ]
            }
        },
        "/api/admin/pedigree/entries": {
            "get": {
                "summary": "Listar pedigrees con filtros y paginación",
                "operationId": "listarPedigreesConFiltrosYPaginacin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "verification_status": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "verification_status"
                                                ]
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "name": "Relámpago",
                                                "verification_status": "pending"
                                            }
                                        ],
                                        "current_page": 1,
                                        "total": 100
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ]
            },
            "post": {
                "summary": "Crear nuevo pedigree (manual)",
                "operationId": "crearNuevoPedigreemanual",
                "description": "",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "verification_status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "verification_status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Relámpago",
                                            "verification_status": "pending"
                                        },
                                        "message": "Pedigree creado exitosamente."
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "name": [
                                                "El nombre es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "b"
                                    },
                                    "sex": {
                                        "type": "string",
                                        "description": "",
                                        "example": "gelding",
                                        "enum": [
                                            "stallion",
                                            "mare",
                                            "gelding"
                                        ]
                                    },
                                    "registration_number": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "registration_entity": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "g",
                                        "nullable": true
                                    },
                                    "registration_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:38:38",
                                        "nullable": true
                                    },
                                    "breed": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "z",
                                        "nullable": true
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "m",
                                        "nullable": true
                                    },
                                    "birth_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:38:38",
                                        "nullable": true
                                    },
                                    "birth_country": {
                                        "type": "string",
                                        "description": "Must be 2 characters.",
                                        "example": "iy",
                                        "nullable": true
                                    },
                                    "microchip": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "v",
                                        "nullable": true
                                    },
                                    "dna_code": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "d",
                                        "nullable": true
                                    },
                                    "sire_pedigree_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the global_pedigree_entries table.",
                                        "example": "add3503c-ebff-3875-93af-b8c6a695762b",
                                        "nullable": true
                                    },
                                    "dam_pedigree_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the global_pedigree_entries table.",
                                        "example": "c3b6b42e-3a0f-3935-b28d-cb767f8a2a0a",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "name",
                                    "sex"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/pedigree/entries/{id}": {
            "get": {
                "summary": "Ver detalle de un pedigree",
                "operationId": "verDetalleDeUnPedigree",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": {\"id\": \"...\", \"name\": \"Relámpago\", \"sire\": {...}, \"dam\": {...}, \"pedigree_tree\": {...}, \"usage_contexts\": []}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pedigree no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ]
            },
            "put": {
                "summary": "Actualizar pedigree",
                "operationId": "actualizarPedigree",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Relámpago Actualizado"
                                        },
                                        "message": "Pedigree actualizado exitosamente."
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pedigree no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "name": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "name": [
                                                "El nombre debe ser una cadena"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "name": {
                                        "type": "string",
                                        "description": "Must not be greater than 200 characters.",
                                        "example": "b"
                                    },
                                    "breed": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "n",
                                        "nullable": true
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "g",
                                        "nullable": true
                                    },
                                    "birth_date": {
                                        "type": "string",
                                        "description": "Must be a valid date.",
                                        "example": "2025-12-31T14:38:38",
                                        "nullable": true
                                    },
                                    "birth_country": {
                                        "type": "string",
                                        "description": "Must be 2 characters.",
                                        "example": "zm",
                                        "nullable": true
                                    },
                                    "microchip": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "i",
                                        "nullable": true
                                    },
                                    "dna_code": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "y",
                                        "nullable": true
                                    },
                                    "sire_pedigree_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the global_pedigree_entries table.",
                                        "example": "21c4122b-d554-3723-966c-6d723ea5293f",
                                        "nullable": true
                                    },
                                    "dam_pedigree_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the global_pedigree_entries table.",
                                        "example": "add3503c-ebff-3875-93af-b8c6a695762b",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar pedigree",
                "operationId": "eliminarPedigree",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Pedigree eliminado exitosamente."
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pedigree no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "in use",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "usage_contexts": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "usage_contexts"
                                    ],
                                    "example": {
                                        "message": "No se puede eliminar un pedigree que está en uso.",
                                        "usage_contexts": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the entry.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/pedigree/entries/{id}/tree": {
            "get": {
                "summary": "Obtener árbol genealógico",
                "operationId": "obtenerrbolGenealgico",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": {\"id\": \"...\", \"name\": \"Relámpago\", \"sire\": {...}, \"dam\": {...}}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pedigree no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the entry.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/pedigree/verifications": {
            "get": {
                "summary": "Listar verificaciones pendientes",
                "operationId": "listarVerificacionesPendientes",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "verification_status": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "name",
                                                    "verification_status"
                                                ]
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "name": "Relámpago",
                                                "verification_status": "pending"
                                            }
                                        ],
                                        "current_page": 1,
                                        "total": 10
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ]
            }
        },
        "/api/admin/pedigree/verifications/stats": {
            "get": {
                "summary": "Obtener estadísticas de verificación",
                "operationId": "obtenerEstadsticasDeVerificacin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "pending": {
                                            "type": "integer"
                                        },
                                        "approved": {
                                            "type": "integer"
                                        },
                                        "rejected": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "pending",
                                        "approved",
                                        "rejected",
                                        "total"
                                    ],
                                    "example": {
                                        "pending": 10,
                                        "approved": 50,
                                        "rejected": 5,
                                        "total": 65
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ]
            }
        },
        "/api/admin/pedigree/verifications/history": {
            "get": {
                "summary": "Historial de verificaciones (aprobadas y rechazadas)",
                "operationId": "historialDeVerificacionesaprobadasYRechazadas",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": [{\"id\": \"...\", \"name\": \"Relámpago\", \"verification_status\": \"verified_equinos\", \"verified_by\": {...}}], \"current_page\": 1, \"total\": 50}"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ]
            }
        },
        "/api/admin/pedigree/verifications/{id}": {
            "get": {
                "summary": "Ver detalle de verificación",
                "operationId": "verDetalleDeVerificacin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "verification_status": {
                                                    "type": "string"
                                                },
                                                "verification_documents": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "verification_status",
                                                "verification_documents"
                                            ]
                                        },
                                        "usage_contexts": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "usage_contexts"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Relámpago",
                                            "verification_status": "pending",
                                            "verification_documents": []
                                        },
                                        "usage_contexts": []
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pedigree no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the verification.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/pedigree/verifications/{id}/approve": {
            "post": {
                "summary": "Aprobar verificación",
                "operationId": "aprobarVerificacin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "verification_status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "verification_status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Relámpago",
                                            "verification_status": "approved"
                                        },
                                        "message": "Verificación aprobada exitosamente."
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pedigree no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "not pending",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "current_status": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "current_status"
                                    ],
                                    "example": {
                                        "message": "Este pedigree no está pendiente de verificación.",
                                        "current_status": "approved"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "notes": {
                                        "type": "string",
                                        "description": "Must not be greater than 1000 characters.",
                                        "example": "b",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the verification.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/pedigree/verifications/{id}/reject": {
            "post": {
                "summary": "Rechazar verificación",
                "operationId": "rechazarVerificacin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "verification_status": {
                                                    "type": "string"
                                                },
                                                "rejection_reason": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "verification_status",
                                                "rejection_reason"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Relámpago",
                                            "verification_status": "rejected",
                                            "rejection_reason": "Documentos insuficientes"
                                        },
                                        "message": "Verificación rechazada."
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pedigree no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "reason": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "reason"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "reason": [
                                                "El motivo es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Must not be greater than 1000 characters.",
                                        "example": "b"
                                    },
                                    "notes": {
                                        "type": "string",
                                        "description": "Must not be greater than 1000 characters.",
                                        "example": "n",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "reason"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the verification.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/pedigree/verifications/{id}/request-info": {
            "post": {
                "summary": "Solicitar información adicional\n(mantiene en pending pero notifica al usuario)",
                "operationId": "solicitarInformacinAdicionalmantieneEnPendingPeroNotificaAlUsuario",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "verification_notes": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "name",
                                                "verification_notes"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "data": {
                                            "id": "...",
                                            "name": "Relámpago",
                                            "verification_notes": "..."
                                        },
                                        "message": "Solicitud de información enviada."
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pedigree no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "message": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "message"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "message": [
                                                "El mensaje es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Pedigree"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "message": {
                                        "type": "string",
                                        "description": "Must not be greater than 1000 characters.",
                                        "example": "b"
                                    }
                                },
                                "required": [
                                    "message"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the verification.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/publications": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminPublications",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "title": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "title",
                                                    "status"
                                                ]
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "title": "Caballo en venta",
                                                "status": "active"
                                            }
                                        ],
                                        "current_page": 1,
                                        "total": 450
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Publicaciones"
                ]
            }
        },
        "/api/admin/publications/{id}": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminPublicationsId",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"id\": \"...\", \"title\": \"Caballo en venta\", \"status\": \"active\", \"moderation_status\": \"approved\", \"category\": {...}, \"user\": {...}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Publicación no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Publicaciones"
                ]
            },
            "delete": {
                "summary": "",
                "operationId": "deleteApiAdminPublicationsId",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Publication deleted successfully"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Publicación no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Publicaciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the publication.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/publications/{id}/moderate": {
            "put": {
                "summary": "",
                "operationId": "putApiAdminPublicationsIdModerate",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "title": {
                                            "type": "string"
                                        },
                                        "moderation_status": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "title",
                                        "moderation_status",
                                        "status"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "title": "Caballo en venta",
                                        "moderation_status": "approved",
                                        "status": "active"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Publicación no encontrada"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "moderation_status": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "moderation_status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "moderation_status": [
                                                "El estado de moderación es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Publicaciones"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "moderation_status": {
                                        "type": "string",
                                        "description": "",
                                        "example": "pending",
                                        "enum": [
                                            "approved",
                                            "rejected",
                                            "flagged",
                                            "pending"
                                        ]
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "",
                                        "example": "removed",
                                        "enum": [
                                            "active",
                                            "inactive",
                                            "removed"
                                        ]
                                    },
                                    "reason": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "moderation_status"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the publication.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/reports": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminReports",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": [{\"id\": \"...\", \"status\": \"pending\", \"reason\": \"spam\", \"reporter\": {...}}], \"current_page\": 1, \"total\": 50}"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Reportes"
                ]
            }
        },
        "/api/admin/reports/{id}": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminReportsId",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"id\": \"...\", \"status\": \"pending\", \"reason\": \"spam\", \"reporter\": {...}, \"reportable\": {...}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Reporte no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Reportes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the report.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/reports/{id}/resolve": {
            "put": {
                "summary": "",
                "operationId": "putApiAdminReportsIdResolve",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "action_taken": {
                                            "type": "string"
                                        },
                                        "resolution_notes": {
                                            "type": "string"
                                        },
                                        "reviewed_at": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "status",
                                        "action_taken",
                                        "resolution_notes",
                                        "reviewed_at"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "status": "resolved",
                                        "action_taken": "warning",
                                        "resolution_notes": "Advertencia enviada",
                                        "reviewed_at": "2024-12-31T10:00:00Z"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Reporte no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "status": [
                                                "El estado es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Reportes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "",
                                        "example": "resolved",
                                        "enum": [
                                            "reviewed",
                                            "resolved",
                                            "dismissed"
                                        ]
                                    },
                                    "action_taken": {
                                        "type": "string",
                                        "description": "",
                                        "example": "suspension",
                                        "enum": [
                                            "warning",
                                            "suspension",
                                            "removal",
                                            "none"
                                        ],
                                        "nullable": true
                                    },
                                    "resolution_notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the report.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/moderation-logs": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminModerationLogs",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"data\": [{\"id\": \"...\", \"action\": \"approved\", \"entity_type\": \"publication\", \"moderator\": {...}}], \"current_page\": 1, \"total\": 200}"
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Reportes"
                ]
            }
        },
        "/api/admin/publication-types": {
            "get": {
                "summary": "Listar todos los tipos de publicación (incluyendo inactivos)",
                "operationId": "listarTodosLosTiposDePublicacinincluyendoInactivos",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "label": {
                                                        "type": "string"
                                                    },
                                                    "active": {
                                                        "type": "boolean"
                                                    },
                                                    "order": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "label",
                                                    "active",
                                                    "order"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "label": "Caballos",
                                                "active": true,
                                                "order": 1
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Tipos"
                ]
            }
        },
        "/api/admin/publication-types/{id}": {
            "get": {
                "summary": "Obtener un tipo de publicación por ID",
                "operationId": "obtenerUnTipoDePublicacinPorID",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "label": {
                                            "type": "string"
                                        },
                                        "active": {
                                            "type": "boolean"
                                        },
                                        "order": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "label",
                                        "active",
                                        "order"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "label": "Caballos",
                                        "active": true,
                                        "order": 1
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Tipo de publicación no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Tipos"
                ]
            },
            "put": {
                "summary": "Actualizar un tipo de publicación",
                "operationId": "actualizarUnTipoDePublicacin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "label": {
                                            "type": "string"
                                        },
                                        "active": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "label",
                                        "active"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "label": "Caballos Actualizado",
                                        "active": true
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Tipo de publicación no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "label": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "label"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "label": [
                                                "El campo label es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "image upload error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "error"
                                    ],
                                    "example": {
                                        "message": "Error uploading image",
                                        "error": "..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Tipos"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "multipart/form-data": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "label": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "b"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "icon": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "v"
                                    },
                                    "image": {
                                        "type": "string",
                                        "format": "binary",
                                        "description": "Must be a file. Must not be greater than 10240 kilobytes."
                                    },
                                    "color": {
                                        "type": "string",
                                        "description": "10MB max. Must not be greater than 9 characters.",
                                        "example": "dljnikh"
                                    },
                                    "active": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": false
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the publication type.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/publication-types/{id}/toggle": {
            "put": {
                "summary": "Toggle del estado activo/inactivo",
                "operationId": "toggleDelEstadoActivoinactivo",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "label": {
                                            "type": "string"
                                        },
                                        "active": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "label",
                                        "active"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "label": "Caballos",
                                        "active": false
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Tipo de publicación no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Tipos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "active": {
                                        "type": "boolean",
                                        "description": "",
                                        "example": true
                                    }
                                },
                                "required": [
                                    "active"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the publication type.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/publication-types/reorder": {
            "post": {
                "summary": "Reordenar tipos de publicación",
                "operationId": "reordenarTiposDePublicacin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Order updated successfully"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "types": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "types"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "types": [
                                                "El array de tipos es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Error updating order"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Tipos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "types": {
                                        "type": "array",
                                        "description": "",
                                        "example": [
                                            []
                                        ],
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string",
                                                    "description": "The <code>id</code> of an existing record in the publication_types table.",
                                                    "example": "architecto"
                                                },
                                                "order": {
                                                    "type": "integer",
                                                    "description": "Must be at least 1.",
                                                    "example": 22
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "order"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "types"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/users": {
            "get": {
                "summary": "Listar usuarios con filtros",
                "operationId": "listarUsuariosConFiltros",
                "description": "Obtiene una lista paginada de usuarios con opciones de filtrado y búsqueda.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filtrar por estado (active, inactive, suspended, banned).",
                        "example": "active",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por estado (active, inactive, suspended, banned).",
                            "example": "active"
                        }
                    },
                    {
                        "in": "query",
                        "name": "role",
                        "description": "Filtrar por rol (user, admin, moderator).",
                        "example": "admin",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filtrar por rol (user, admin, moderator).",
                            "example": "admin"
                        }
                    },
                    {
                        "in": "query",
                        "name": "search",
                        "description": "Buscar por email o nombre.",
                        "example": "john",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Buscar por email o nombre.",
                            "example": "john"
                        }
                    },
                    {
                        "in": "query",
                        "name": "sort_by",
                        "description": "Campo para ordenar.",
                        "example": "created_at",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Campo para ordenar.",
                            "example": "created_at"
                        }
                    },
                    {
                        "in": "query",
                        "name": "sort_order",
                        "description": "Orden (asc, desc).",
                        "example": "desc",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Orden (asc, desc).",
                            "example": "desc"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Resultados por página.",
                        "example": 15,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Resultados por página.",
                            "example": 15
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "email": {
                                                        "type": "string"
                                                    },
                                                    "display_name": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "email",
                                                    "display_name"
                                                ]
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "email": "usuario@ejemplo.com",
                                                "display_name": "Juan Pérez"
                                            }
                                        ],
                                        "current_page": 1,
                                        "total": 150
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Usuarios"
                ]
            },
            "post": {
                "summary": "Crear un nuevo usuario manualmente",
                "operationId": "crearUnNuevoUsuarioManualmente",
                "description": "Crea un usuario en Firebase Auth y en la base de datos.\nSi se proporciona contraseña, el usuario puede hacer login inmediatamente.\nSi no, se genera un link de invitación para que cree su contraseña.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "created with invitation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "user": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "email": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "email"
                                            ]
                                        },
                                        "invitation_link": {
                                            "type": "string"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "user",
                                        "invitation_link",
                                        "message"
                                    ],
                                    "example": {
                                        "user": {
                                            "id": "...",
                                            "email": "usuario@ejemplo.com"
                                        },
                                        "invitation_link": "https://...",
                                        "message": "Usuario creado. Se ha generado un link de invitación."
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "email": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "email"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "email": [
                                                "El email ya está registrado"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "firebase error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Error al crear usuario en Firebase: ..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Usuarios"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "description": "Email del usuario.",
                                        "example": "usuario@ejemplo.com"
                                    },
                                    "display_name": {
                                        "type": "string",
                                        "description": "Nombre completo del usuario.",
                                        "example": "Juan Pérez"
                                    },
                                    "phone_number": {
                                        "type": "string",
                                        "description": "Teléfono del usuario.",
                                        "example": "+57 300 123 4567",
                                        "nullable": true
                                    },
                                    "password": {
                                        "type": "string",
                                        "description": "Contraseña (mínimo 6 caracteres). Si no se proporciona, se envía invitación.",
                                        "example": "|]|{+-",
                                        "nullable": true
                                    },
                                    "is_super_admin": {
                                        "type": "boolean",
                                        "description": "Si es super administrador.",
                                        "example": false
                                    },
                                    "is_system_admin": {
                                        "type": "boolean",
                                        "description": "Si es administrador del sistema.",
                                        "example": false
                                    }
                                },
                                "required": [
                                    "email",
                                    "display_name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/users/{id}": {
            "get": {
                "summary": "Get a specific user",
                "operationId": "getASpecificUser",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "email": {
                                            "type": "string"
                                        },
                                        "display_name": {
                                            "type": "string"
                                        },
                                        "organizations": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "email",
                                        "display_name",
                                        "organizations"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "email": "usuario@ejemplo.com",
                                        "display_name": "Juan Pérez",
                                        "organizations": []
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Usuario no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Usuarios"
                ]
            },
            "put": {
                "summary": "Update user",
                "operationId": "updateUser",
                "description": "Actualiza los datos de un usuario existente.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "display_name": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "display_name",
                                        "status"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "display_name": "Juan Pérez Actualizado",
                                        "status": "active"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Usuario no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "email": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "email"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "email": [
                                                "El email ya está registrado"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Usuarios"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "display_name": {
                                        "type": "string",
                                        "description": "Nombre completo.",
                                        "example": "Juan Pérez Actualizado"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Email.",
                                        "example": "nuevo@ejemplo.com"
                                    },
                                    "phone_number": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    },
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (active, inactive, suspended, banned).",
                                        "example": "active"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "",
                                        "example": "admin",
                                        "enum": [
                                            "user",
                                            "admin",
                                            "moderator"
                                        ]
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Delete user (soft delete)",
                "operationId": "deleteUsersoftDelete",
                "description": "Elimina un usuario (soft delete).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "deleted",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "User deleted successfully"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Usuario no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Usuarios"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "reason": {
                                        "type": "string",
                                        "description": "Razón de la eliminación.",
                                        "example": "architecto"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the user.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/users/{id}/role": {
            "put": {
                "summary": "Update user role",
                "operationId": "updateUserRole",
                "description": "Actualiza el rol de un usuario.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "is_system_admin": {
                                            "type": "boolean"
                                        },
                                        "is_super_admin": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "is_system_admin",
                                        "is_super_admin"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "is_system_admin": true,
                                        "is_super_admin": false
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Usuario no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "role": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "role"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "role": [
                                                "El rol seleccionado no es válido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Usuarios"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "role": {
                                        "type": "string",
                                        "description": "Rol (user, admin, super_admin).",
                                        "example": "admin"
                                    },
                                    "reason": {
                                        "type": "string",
                                        "description": "Razón del cambio.",
                                        "example": "Promoción a administrador"
                                    }
                                },
                                "required": [
                                    "role",
                                    "reason"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID del usuario.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/users/{id}/status": {
            "put": {
                "summary": "Update user status",
                "operationId": "updateUserStatus",
                "description": "Actualiza el estado de un usuario.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "updated",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "status"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "status": "suspended"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Usuario no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "status": [
                                                "El estado seleccionado no es válido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Usuarios"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "Estado (active, inactive, suspended, banned).",
                                        "example": "suspended"
                                    },
                                    "reason": {
                                        "type": "string",
                                        "description": "Razón del cambio.",
                                        "example": "Violación de términos"
                                    }
                                },
                                "required": [
                                    "status",
                                    "reason"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID del usuario.",
                    "example": "550e8400-e29b-41d4-a716-446655440000",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/marketplace/users": {
            "get": {
                "summary": "Listar usuarios del marketplace con filtros",
                "operationId": "listarUsuariosDelMarketplaceConFiltros",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "users": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object"
                                                    }
                                                },
                                                "pagination": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "per_page": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "per_page"
                                                    ]
                                                },
                                                "stats": {
                                                    "type": "object",
                                                    "properties": {
                                                        "total": {
                                                            "type": "integer"
                                                        },
                                                        "basic": {
                                                            "type": "integer"
                                                        },
                                                        "professional": {
                                                            "type": "integer"
                                                        },
                                                        "organization": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "total",
                                                        "basic",
                                                        "professional",
                                                        "organization"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "users",
                                                "pagination",
                                                "stats"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "users": [],
                                            "pagination": {
                                                "total": 100,
                                                "per_page": 20
                                            },
                                            "stats": {
                                                "total": 100,
                                                "basic": 50,
                                                "professional": 30,
                                                "organization": 20
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Usuarios Marketplace"
                ]
            }
        },
        "/api/admin/marketplace/users/{id}": {
            "get": {
                "summary": "Obtener un usuario específico del marketplace",
                "operationId": "obtenerUnUsuarioEspecficoDelMarketplace",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"success\": true, \"data\": {\"id\": \"...\", \"display_name\": \"Juan Pérez\", \"level\": \"professional\", \"seller_profile\": {...}, \"publications_count\": 10}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Usuario no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Usuarios Marketplace"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the user.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/marketplace/users/upgrade-to-professional": {
            "post": {
                "summary": "Actualizar usuario a vendedor profesional",
                "operationId": "actualizarUsuarioAVendedorProfesional",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"success\": true, \"data\": {\"id\": \"...\", \"level\": \"professional\", \"seller_profile\": {...}}, \"message\": \"Usuario actualizado a Vendedor Profesional exitosamente\"}"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "already professional",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "El usuario ya tiene un perfil de vendedor profesional"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Usuario no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "business_name": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "business_name"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "business_name": [
                                                "El nombre del negocio es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Error al actualizar el usuario: ..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Usuarios Marketplace"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the core_users table.",
                                        "example": "6ff8f7f6-1eb3-3525-be4a-3932c805afed"
                                    },
                                    "business_name": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "g"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "",
                                        "example": "Eius et animi quos velit et.",
                                        "nullable": true
                                    },
                                    "logo_url": {
                                        "type": "string",
                                        "description": "Must be a valid URL.",
                                        "example": "http://www.ernser.org/harum-mollitia-modi-deserunt-aut-ab-provident-perspiciatis-quo.html",
                                        "nullable": true
                                    },
                                    "business_whatsapp": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "m"
                                    },
                                    "business_email": {
                                        "type": "string",
                                        "description": "Must be a valid email address.",
                                        "example": "marquardt.noah@example.com"
                                    },
                                    "business_phone": {
                                        "type": "string",
                                        "description": "Must not be greater than 50 characters.",
                                        "example": "l",
                                        "nullable": true
                                    },
                                    "business_address": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto"
                                    },
                                    "business_city": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "n"
                                    },
                                    "business_department": {
                                        "type": "string",
                                        "description": "Must not be greater than 100 characters.",
                                        "example": "g"
                                    }
                                },
                                "required": [
                                    "user_id",
                                    "business_name",
                                    "business_whatsapp",
                                    "business_email",
                                    "business_address",
                                    "business_city",
                                    "business_department"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/marketplace/users/migrate-to-organization": {
            "post": {
                "summary": "Migrar usuario a organización",
                "operationId": "migrarUsuarioAOrganizacin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "level": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "level"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "id": "...",
                                            "level": "organization"
                                        },
                                        "message": "Organización creada y usuario agregado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "already member",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "El usuario ya es miembro de esta organización"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Usuario no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "user_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "user_id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "user_id": [
                                                "El usuario es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Error al migrar el usuario: ..."
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Usuarios Marketplace"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_id": {
                                        "type": "string",
                                        "description": "Must be a valid UUID. The <code>id</code> of an existing record in the core_users table.",
                                        "example": "6ff8f7f6-1eb3-3525-be4a-3932c805afed"
                                    },
                                    "action": {
                                        "type": "string",
                                        "description": "",
                                        "example": "join",
                                        "enum": [
                                            "create",
                                            "join"
                                        ]
                                    },
                                    "organization_id": {
                                        "type": "string",
                                        "description": "This field is required when <code>action</code> is <code>join</code>. Must be a valid UUID. The <code>id</code> of an existing record in the organizations table.",
                                        "example": "6b72fe4a-5b40-307c-bc24-f79acf9a1bb9"
                                    },
                                    "organization_name": {
                                        "type": "string",
                                        "description": "This field is required when <code>action</code> is <code>create</code>. Must not be greater than 255 characters.",
                                        "example": "m"
                                    },
                                    "organization_type": {
                                        "type": "string",
                                        "description": "This field is required when <code>action</code> is <code>create</code>.",
                                        "example": "architecto"
                                    },
                                    "role": {
                                        "type": "string",
                                        "description": "",
                                        "example": "owner",
                                        "enum": [
                                            "owner",
                                            "admin",
                                            "member",
                                            "staff"
                                        ]
                                    }
                                },
                                "required": [
                                    "user_id",
                                    "action",
                                    "role"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/admin/marketplace/users/{id}/status": {
            "put": {
                "summary": "Actualizar estado de usuario",
                "operationId": "actualizarEstadoDeUsuario",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status"
                                            ]
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data",
                                        "message"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "id": "...",
                                            "status": "active"
                                        },
                                        "message": "Estado del usuario actualizado exitosamente"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Usuario no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "The given data was invalid.",
                                        "errors": {
                                            "status": [
                                                "El estado es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Usuarios Marketplace"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "",
                                        "example": "active",
                                        "enum": [
                                            "active",
                                            "inactive",
                                            "suspended",
                                            "banned"
                                        ]
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the user.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/waitlist": {
            "get": {
                "summary": "",
                "operationId": "getApiAdminWaitlist",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "email": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "email",
                                                    "name",
                                                    "status"
                                                ]
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "email": "juan@ejemplo.com",
                                                "name": "Juan Pérez",
                                                "status": "pending"
                                            }
                                        ],
                                        "current_page": 1,
                                        "total": 50
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Waitlist"
                ]
            }
        },
        "/api/admin/waitlist/{id}": {
            "put": {
                "summary": "",
                "operationId": "putApiAdminWaitlistId",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "email": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "interest": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "email",
                                        "status",
                                        "interest"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "email": "juan@ejemplo.com",
                                        "status": "approved",
                                        "interest": "Interesado en marketplace"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Entrada de waitlist no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Waitlist"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "",
                                        "example": "rejected",
                                        "enum": [
                                            "pending",
                                            "approved",
                                            "rejected"
                                        ]
                                    },
                                    "interest": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "",
                "operationId": "deleteApiAdminWaitlistId",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Waitlist entry deleted successfully"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Entrada de waitlist no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Waitlist"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the waitlist.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/orders": {
            "get": {
                "summary": "Listar todas las órdenes (Admin)",
                "operationId": "listarTodasLasrdenesAdmin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "order_number": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "order_number",
                                                    "status"
                                                ]
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "order_number": "ORD-2024-001",
                                                "status": "paid"
                                            }
                                        ],
                                        "current_page": 1,
                                        "total": 100
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ]
            }
        },
        "/api/admin/orders/stats": {
            "get": {
                "summary": "Estadísticas de órdenes (Admin)",
                "operationId": "estadsticasDerdenesAdmin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "by_status": {
                                                    "type": "object",
                                                    "properties": {
                                                        "paid": {
                                                            "type": "integer"
                                                        },
                                                        "pending": {
                                                            "type": "integer"
                                                        }
                                                    },
                                                    "required": [
                                                        "paid",
                                                        "pending"
                                                    ]
                                                },
                                                "total_revenue": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "by_status",
                                                "total_revenue"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": {
                                            "total": 500,
                                            "by_status": {
                                                "paid": 400,
                                                "pending": 50
                                            },
                                            "total_revenue": 50000000
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ]
            }
        },
        "/api/admin/orders/{id}": {
            "get": {
                "summary": "Ver detalle de una orden (Admin)",
                "operationId": "verDetalleDeUnaOrdenAdmin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"id\": \"...\", \"order_number\": \"ORD-2024-001\", \"status\": \"paid\", \"sub_orders\": [], \"user\": {...}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Orden no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the order.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/orders/{id}/status": {
            "put": {
                "summary": "Actualizar estado de una orden (Admin)",
                "operationId": "actualizarEstadoDeUnaOrdenAdmin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "order_number": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "string"
                                        },
                                        "sub_orders": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "order_number",
                                        "status",
                                        "sub_orders"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "order_number": "ORD-2024-001",
                                        "status": "shipped",
                                        "sub_orders": []
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Orden no encontrada"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "Validation error",
                                        "errors": {
                                            "status": [
                                                "El estado es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "",
                                        "example": "cancelled",
                                        "enum": [
                                            "pending",
                                            "paid",
                                            "processing",
                                            "shipped",
                                            "delivered",
                                            "cancelled",
                                            "refunded"
                                        ]
                                    },
                                    "admin_notes": {
                                        "type": "string",
                                        "description": "Must not be greater than 1000 characters.",
                                        "example": "b",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the order.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/orders/{id}/shipping": {
            "put": {
                "summary": "Actualizar información de envío (Admin)",
                "operationId": "actualizarInformacinDeEnvoAdmin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "order_number": {
                                            "type": "string"
                                        },
                                        "tracking_number": {
                                            "type": "string"
                                        },
                                        "shipping_carrier": {
                                            "type": "string"
                                        },
                                        "shipped_at": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "order_number",
                                        "tracking_number",
                                        "shipping_carrier",
                                        "shipped_at"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "order_number": "ORD-2024-001",
                                        "tracking_number": "TRACK123456",
                                        "shipping_carrier": "FedEx",
                                        "shipped_at": "2024-12-31T10:00:00Z"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Orden no encontrada"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "tracking_number": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "tracking_number"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "Validation error",
                                        "errors": {
                                            "tracking_number": [
                                                "El número de seguimiento es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tracking_number": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "b"
                                    },
                                    "shipping_carrier": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "n"
                                    }
                                },
                                "required": [
                                    "tracking_number",
                                    "shipping_carrier"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the order.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/orders/{id}/notes": {
            "post": {
                "summary": "Agregar nota de admin (Admin)",
                "operationId": "agregarNotaDeAdminAdmin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "id": {
                                            "type": "string"
                                        },
                                        "order_number": {
                                            "type": "string"
                                        },
                                        "admin_notes": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "id",
                                        "order_number",
                                        "admin_notes"
                                    ],
                                    "example": {
                                        "id": "...",
                                        "order_number": "ORD-2024-001",
                                        "admin_notes": "[2024-12-31 10:00:00] Orden verificada y aprobada"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Orden no encontrada"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "admin_notes": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "admin_notes"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "Validation error",
                                        "errors": {
                                            "admin_notes": [
                                                "La nota es requerida"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "admin_notes": {
                                        "type": "string",
                                        "description": "Must not be greater than 1000 characters.",
                                        "example": "b"
                                    }
                                },
                                "required": [
                                    "admin_notes"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the order.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/seller-payouts": {
            "get": {
                "summary": "Listar pagos a vendedores",
                "operationId": "listarPagosAVendedores",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "payout_number": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "net_amount": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "payout_number",
                                                    "status",
                                                    "net_amount"
                                                ]
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "payout_number": "PAY-2024-001",
                                                "status": "pending",
                                                "net_amount": 5000000
                                            }
                                        ],
                                        "current_page": 1,
                                        "total": 50
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ]
            }
        },
        "/api/admin/seller-payouts/stats": {
            "get": {
                "summary": "Estadísticas de pagos",
                "operationId": "estadsticasDePagos",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "pending": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "amount": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "amount"
                                            ]
                                        },
                                        "processing": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "amount": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "amount"
                                            ]
                                        },
                                        "paid": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "amount": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "amount"
                                            ]
                                        },
                                        "failed": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "amount": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "amount"
                                            ]
                                        },
                                        "total_commission": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "pending",
                                        "processing",
                                        "paid",
                                        "failed",
                                        "total_commission"
                                    ],
                                    "example": {
                                        "pending": {
                                            "count": 10,
                                            "amount": 50000000
                                        },
                                        "processing": {
                                            "count": 5,
                                            "amount": 25000000
                                        },
                                        "paid": {
                                            "count": 100,
                                            "amount": 500000000
                                        },
                                        "failed": {
                                            "count": 2,
                                            "amount": 10000000
                                        },
                                        "total_commission": 100000000
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ]
            }
        },
        "/api/admin/seller-payouts/{id}": {
            "get": {
                "summary": "Ver detalle de un pago",
                "operationId": "adminSellerPayoutShow",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "string",
                                    "example": "{\"id\": \"...\", \"payout_number\": \"PAY-2024-001\", \"status\": \"pending\", \"net_amount\": 5000000, \"seller\": {...}, \"sub_order\": {...}}"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pago no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the seller payout.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/seller-payouts/{id}/mark-processing": {
            "post": {
                "summary": "Marcar pago como \"en proceso\"",
                "operationId": "marcarPagoComoenProceso",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Pago marcado como en proceso",
                                        "data": {
                                            "id": "...",
                                            "status": "processing"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "invalid status",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Solo se pueden procesar pagos pendientes"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pago no encontrado"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the seller payout.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/seller-payouts/{id}/mark-paid": {
            "post": {
                "summary": "Marcar pago como pagado",
                "operationId": "marcarPagoComoPagado",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "payment_reference": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "payment_reference"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Pago marcado como pagado exitosamente",
                                        "data": {
                                            "id": "...",
                                            "status": "paid",
                                            "payment_reference": "TRANS-2024-001"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "already processed",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Este pago ya fue procesado"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pago no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "payment_reference": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "payment_reference"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Datos inválidos",
                                        "errors": {
                                            "payment_reference": [
                                                "La referencia de pago es requerida"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "payment_reference": {
                                        "type": "string",
                                        "description": "Must not be greater than 255 characters.",
                                        "example": "b"
                                    },
                                    "admin_notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "payment_reference"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the seller payout.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/seller-payouts/{id}/mark-failed": {
            "post": {
                "summary": "Marcar pago como fallido",
                "operationId": "marcarPagoComoFallido",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "failure_reason": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "failure_reason"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Pago marcado como fallido",
                                        "data": {
                                            "id": "...",
                                            "status": "failed",
                                            "failure_reason": "Error en transferencia bancaria"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "already paid",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "No se puede marcar como fallido un pago ya realizado"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pago no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "failure_reason": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "failure_reason"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "Debe especificar el motivo del fallo",
                                        "errors": {
                                            "failure_reason": [
                                                "El motivo del fallo es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "failure_reason": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto"
                                    }
                                },
                                "required": [
                                    "failure_reason"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the seller payout.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/admin/seller-payouts/{id}/notes": {
            "put": {
                "summary": "Actualizar notas del admin",
                "operationId": "actualizarNotasDelAdmin",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "admin_notes": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "admin_notes"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Notas actualizadas",
                                        "data": {
                                            "id": "...",
                                            "admin_notes": "Pago verificado y procesado"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Pago no encontrado"
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "admin_notes": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "admin_notes"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "errors"
                                    ],
                                    "example": {
                                        "success": false,
                                        "errors": {
                                            "admin_notes": [
                                                "Las notas son requeridas"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "👨‍💼 Admin / Órdenes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "admin_notes": {
                                        "type": "string",
                                        "description": "",
                                        "example": "architecto"
                                    }
                                },
                                "required": [
                                    "admin_notes"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the seller payout.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/verify-access": {
            "post": {
                "summary": "Verificar código de acceso",
                "operationId": "verificarCdigoDeAcceso",
                "description": "Verify marketplace access code and generate session token.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "valid": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "session_token": {
                                            "type": "string"
                                        },
                                        "expires_at": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "valid",
                                        "message",
                                        "session_token",
                                        "expires_at"
                                    ],
                                    "example": {
                                        "valid": true,
                                        "message": "Acceso concedido",
                                        "session_token": "token_123",
                                        "expires_at": "2024-01-01T12:00:00Z"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Acceso"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "code": {
                                        "type": "string",
                                        "description": "Access code.",
                                        "example": "ABC123"
                                    }
                                },
                                "required": [
                                    "code"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/marketplace/check-access": {
            "get": {
                "summary": "Verificar sesión activa",
                "operationId": "verificarSesinActiva",
                "description": "Check if marketplace access session is still valid.",
                "parameters": [
                    {
                        "in": "header",
                        "name": "X-Marketplace-Session",
                        "description": "",
                        "example": "string Session token from verifyAccess",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "has_access": {
                                            "type": "boolean"
                                        },
                                        "expires_at": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "has_access",
                                        "expires_at"
                                    ],
                                    "example": {
                                        "has_access": true,
                                        "expires_at": "2024-01-01T12:00:00Z"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Acceso"
                ]
            }
        },
        "/api/marketplace/status": {
            "get": {
                "summary": "Obtener el estado del marketplace (público)",
                "operationId": "obtenerElEstadoDelMarketplacepblico",
                "description": "Get marketplace status (enabled/disabled, maintenance message).\nUsed by Web App to validate if marketplace is active or in maintenance.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "enabled": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "enabled"
                                    ],
                                    "example": {
                                        "enabled": true,
                                        "maintenance_message": null
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Acceso"
                ]
            }
        },
        "/api/marketplace/search": {
            "get": {
                "summary": "Buscar publicaciones",
                "operationId": "buscarPublicaciones",
                "description": "Search publications using Meilisearch (if configured) or database fallback.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "q",
                        "description": "Search query.",
                        "example": "caballo",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Search query.",
                            "example": "caballo"
                        }
                    },
                    {
                        "in": "query",
                        "name": "publication_type_id",
                        "description": "uuid Filter by publication type.",
                        "example": "550e8400-e29b-41d4-a716-446655440000",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "uuid Filter by publication type.",
                            "example": "550e8400-e29b-41d4-a716-446655440000"
                        }
                    },
                    {
                        "in": "query",
                        "name": "category_id",
                        "description": "uuid Filter by category.",
                        "example": "550e8400-e29b-41d4-a716-446655440001",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "uuid Filter by category.",
                            "example": "550e8400-e29b-41d4-a716-446655440001"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "meta": {
                                            "type": "object",
                                            "properties": {
                                                "total": {
                                                    "type": "integer"
                                                },
                                                "query": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "total",
                                                "query"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "meta"
                                    ],
                                    "example": {
                                        "data": [],
                                        "meta": {
                                            "total": 50,
                                            "query": "caballo"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Búsqueda"
                ]
            }
        },
        "/api/marketplace/search/suggestions": {
            "get": {
                "summary": "Sugerencias de búsqueda (autocomplete)",
                "operationId": "sugerenciasDeBsquedaautocomplete",
                "description": "Get search suggestions for autocomplete (min 2 characters).",
                "parameters": [
                    {
                        "in": "query",
                        "name": "q",
                        "description": "Search query (min 2 chars).",
                        "example": "cab",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Search query (min 2 chars).",
                            "example": "cab"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Búsqueda"
                ]
            }
        },
        "/api/marketplace/cart": {
            "get": {
                "summary": "Obtener items del carrito",
                "operationId": "obtenerItemsDelCarrito",
                "description": "Get cart items for authenticated user or session.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "session_id",
                        "description": "Session ID for guest users.",
                        "example": "session-123",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Session ID for guest users.",
                            "example": "session-123"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "total_items": {
                                            "type": "integer"
                                        },
                                        "subtotal": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "total_items",
                                        "subtotal"
                                    ],
                                    "example": {
                                        "data": [],
                                        "total_items": 3,
                                        "subtotal": 15000000
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Carrito"
                ]
            },
            "post": {
                "summary": "Agregar item al carrito",
                "operationId": "agregarItemAlCarrito",
                "description": "Add item to cart (creates new or updates quantity if exists).",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Item added to cart",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Carrito"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "publication_id": {
                                        "type": "uuid",
                                        "description": "Publication ID.",
                                        "example": "550e8400-e29b-41d4-a716-446655440017"
                                    },
                                    "quantity": {
                                        "type": "integer",
                                        "description": "Quantity (min 1).",
                                        "example": 2
                                    },
                                    "variants": {
                                        "type": "array",
                                        "description": "Variants object.",
                                        "example": {
                                            "size": "L",
                                            "color": "black"
                                        },
                                        "items": {
                                            "type": "string",
                                            "nullable": true
                                        }
                                    },
                                    "session_id": {
                                        "type": "string",
                                        "description": "Session ID for guest users.",
                                        "example": "session-123"
                                    }
                                },
                                "required": [
                                    "publication_id",
                                    "quantity"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/marketplace/cart/{id}": {
            "put": {
                "summary": "Actualizar cantidad de un item",
                "operationId": "actualizarCantidadDeUnItem",
                "description": "Update quantity of a cart item.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Cart item updated",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Carrito"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "quantity": {
                                        "type": "integer",
                                        "description": "New quantity (min 1).",
                                        "example": 3
                                    },
                                    "session_id": {
                                        "type": "string",
                                        "description": "Session ID for guest users.",
                                        "example": "session-123"
                                    }
                                },
                                "required": [
                                    "quantity"
                                ]
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar item del carrito",
                "operationId": "eliminarItemDelCarrito",
                "description": "Remove item from cart.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Item removed from cart"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Carrito"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "session_id": {
                                        "type": "string",
                                        "description": "Session ID for guest users.",
                                        "example": "session-123"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "Cart item ID.",
                    "example": "1",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/cart/clear": {
            "post": {
                "summary": "Limpiar todo el carrito",
                "operationId": "limpiarTodoElCarrito",
                "description": "Clear all items from cart.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Cart cleared"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Carrito"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "session_id": {
                                        "type": "string",
                                        "description": "Session ID for guest users.",
                                        "example": "session-123"
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/marketplace/cart/migrate": {
            "post": {
                "summary": "Migrar carrito de sesión a usuario autenticado",
                "operationId": "migrarCarritoDeSesinAUsuarioAutenticado",
                "description": "Migrate cart items from session to authenticated user.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Cart migrated successfully"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Carrito"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "session_id": {
                                        "type": "string",
                                        "description": "Session ID to migrate.",
                                        "example": "session-123"
                                    }
                                },
                                "required": [
                                    "session_id"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/marketplace/structure": {
            "get": {
                "summary": "Obtener estructura completa del marketplace\nTipos de publicación con sus categorías y subcategorías",
                "operationId": "obtenerEstructuraCompletaDelMarketplaceTiposDePublicacinConSusCategorasYSubcategoras",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "slug": {
                                                "type": "string"
                                            },
                                            "label": {
                                                "type": "string"
                                            },
                                            "categories": {
                                                "type": "array",
                                                "items": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "slug": {
                                                            "type": "string"
                                                        },
                                                        "label": {
                                                            "type": "string"
                                                        },
                                                        "subcategories": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object"
                                                            }
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "slug",
                                                        "label",
                                                        "subcategories"
                                                    ]
                                                }
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "slug",
                                            "label",
                                            "categories"
                                        ]
                                    },
                                    "example": [
                                        {
                                            "id": "...",
                                            "slug": "horses",
                                            "label": "Caballos",
                                            "categories": [
                                                {
                                                    "id": "...",
                                                    "slug": "jumping-horses",
                                                    "label": "Caballos de Salto",
                                                    "subcategories": []
                                                }
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Categorías"
                ]
            }
        },
        "/api/marketplace/categories": {
            "get": {
                "summary": "Listar todas las categorías activas",
                "operationId": "listarTodasLasCategorasActivas",
                "description": "Get all active categories, optionally filtered by publication type.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "publication_type_id",
                        "description": "uuid Filter by publication type.",
                        "example": "550e8400-e29b-41d4-a716-446655440000",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "uuid Filter by publication type.",
                            "example": "550e8400-e29b-41d4-a716-446655440000"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Categorías"
                ]
            }
        },
        "/api/marketplace/categories/{slug}": {
            "get": {
                "summary": "Obtener una categoría por slug",
                "operationId": "obtenerUnaCategoraPorSlug",
                "description": "Get category details by slug including custom fields.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Categorías"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "slug",
                    "description": "Category slug.",
                    "example": "caballos",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/categories/{id}/custom-fields": {
            "get": {
                "summary": "Obtener custom fields de una categoría",
                "operationId": "obtenerCustomFieldsDeUnaCategora",
                "description": "Get active custom fields for a category.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Categorías"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the category.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "category_id",
                    "description": "UUID of category.",
                    "example": "550e8400-e29b-41d4-a716-446655440001",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/contact/sent": {
            "get": {
                "summary": "Listar solicitudes de contacto del usuario autenticado",
                "operationId": "listarSolicitudesDeContactoDelUsuarioAutenticado",
                "description": "Get paginated list of contact requests sent by authenticated user.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [],
                                        "current_page": 1,
                                        "total": 10
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Contacto"
                ]
            }
        },
        "/api/marketplace/contact/{id}": {
            "get": {
                "summary": "Ver una solicitud de contacto específica",
                "operationId": "verUnaSolicitudDeContactoEspecfica",
                "description": "Get contact request details (only by sender or seller).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Contacto"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "Contact request ID.",
                    "example": "1",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/contact/received": {
            "get": {
                "summary": "Listar solicitudes recibidas (para vendedores)",
                "operationId": "listarSolicitudesRecibidasparaVendedores",
                "description": "Get paginated list of contact requests received by seller (for their publications).",
                "parameters": [
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [],
                                        "current_page": 1,
                                        "total": 15
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Contacto"
                ]
            }
        },
        "/api/marketplace/contact/{id}/respond": {
            "post": {
                "summary": "Responder a una solicitud de contacto (vendedor)",
                "operationId": "responderAUnaSolicitudDeContactovendedor",
                "description": "Respond to a contact request (only by seller, sends email to buyer).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Respuesta enviada exitosamente",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Contacto"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "response": {
                                        "type": "string",
                                        "description": "Response message (max 1000 chars).",
                                        "example": "Gracias por tu interés..."
                                    }
                                },
                                "required": [
                                    "response"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "Contact request ID.",
                    "example": "1",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/contact/send": {
            "post": {
                "summary": "Enviar solicitud de contacto",
                "operationId": "enviarSolicitudDeContacto",
                "description": "Create a contact request for a publication (sends notification and email).",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "publication_id": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "publication_id",
                                                "type",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Solicitud de contacto enviada exitosamente",
                                        "data": {
                                            "id": 1,
                                            "publication_id": "...",
                                            "type": "horse_inquiry",
                                            "status": "pending"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "422": {
                        "description": "validation error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "errors": {
                                            "type": "object",
                                            "properties": {
                                                "publication_id": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "publication_id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "errors"
                                    ],
                                    "example": {
                                        "message": "Validation error",
                                        "errors": {
                                            "publication_id": [
                                                "El ID de publicación es requerido"
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Contacto"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "publication_id": {
                                        "type": "uuid",
                                        "description": "Publication ID.",
                                        "example": "550e8400-e29b-41d4-a716-446655440017"
                                    },
                                    "type": {
                                        "type": "string",
                                        "description": "Contact type (horse_inquiry, product_question, service_quote, etc.).",
                                        "example": "horse_inquiry"
                                    },
                                    "name": {
                                        "type": "string",
                                        "description": "Contact name.",
                                        "example": "Juan Pérez"
                                    },
                                    "email": {
                                        "type": "string",
                                        "description": "Contact email.",
                                        "example": "juan@example.com"
                                    },
                                    "phone": {
                                        "type": "string",
                                        "description": "Contact phone.",
                                        "example": "+57 300 123 4567",
                                        "nullable": true
                                    },
                                    "message": {
                                        "type": "string",
                                        "description": "Message (max 1000 chars).",
                                        "example": "Estoy interesado en..."
                                    },
                                    "metadata": {
                                        "type": "array",
                                        "description": "Additional metadata.",
                                        "example": {
                                            "preferred_contact": "whatsapp"
                                        },
                                        "items": {
                                            "type": "string",
                                            "nullable": true
                                        }
                                    }
                                },
                                "required": [
                                    "publication_id",
                                    "type",
                                    "name",
                                    "email",
                                    "message"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/favorites": {
            "get": {
                "summary": "Listar favoritos del usuario autenticado",
                "operationId": "listarFavoritosDelUsuarioAutenticado",
                "description": "Get paginated list of favorite publications for authenticated user.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [],
                                        "current_page": 1,
                                        "total": 15
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Favoritos"
                ]
            }
        },
        "/api/favorites/toggle": {
            "post": {
                "summary": "Agregar/quitar de favoritos (toggle)",
                "operationId": "agregarquitarDeFavoritostoggle",
                "description": "Toggle favorite status for a publication.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "is_favorited": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "is_favorited"
                                    ],
                                    "example": {
                                        "message": "Removed from favorites",
                                        "is_favorited": false
                                    }
                                }
                            }
                        }
                    },
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "is_favorited": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "is_favorited"
                                    ],
                                    "example": {
                                        "message": "Added to favorites",
                                        "is_favorited": true
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Favoritos"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "publication_id": {
                                        "type": "uuid",
                                        "description": "Publication ID.",
                                        "example": "550e8400-e29b-41d4-a716-446655440017"
                                    }
                                },
                                "required": [
                                    "publication_id"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/favorites/{publicationId}": {
            "delete": {
                "summary": "Eliminar de favoritos",
                "operationId": "eliminarDeFavoritos",
                "description": "Remove publication from favorites.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Removed from favorites"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Favoritos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "publicationId",
                    "description": "",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "publication_id",
                    "description": "UUID of publication.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/custom-fields/{publicationType}": {
            "get": {
                "summary": "Obtener campos personalizados por tipo de publicación",
                "operationId": "obtenerCamposPersonalizadosPorTipoDePublicacin",
                "description": "Retorna todos los grupos de campos con sus campos para un tipo específico.\nOpcionalmente filtra por categoría.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "category_id",
                        "description": "optional UUID de la categoría para filtrar grupos aplicables",
                        "example": "architecto",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "optional UUID de la categoría para filtrar grupos aplicables",
                            "example": "architecto"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "groups": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "label": {
                                                        "type": "string"
                                                    },
                                                    "description": {
                                                        "type": "string"
                                                    },
                                                    "order": {
                                                        "type": "integer"
                                                    },
                                                    "collapsed": {
                                                        "type": "boolean"
                                                    },
                                                    "applies_to_all_categories": {
                                                        "type": "boolean"
                                                    },
                                                    "category_ids": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object"
                                                        }
                                                    },
                                                    "fields": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "id": {
                                                                    "type": "string"
                                                                },
                                                                "name": {
                                                                    "type": "string"
                                                                },
                                                                "label": {
                                                                    "type": "string"
                                                                },
                                                                "type": {
                                                                    "type": "string"
                                                                },
                                                                "required": {
                                                                    "type": "boolean"
                                                                },
                                                                "order": {
                                                                    "type": "integer"
                                                                },
                                                                "config": {
                                                                    "type": "object",
                                                                    "properties": {
                                                                        "options": {
                                                                            "type": "array",
                                                                            "items": {
                                                                                "type": "object",
                                                                                "properties": {
                                                                                    "value": {
                                                                                        "type": "string"
                                                                                    },
                                                                                    "label": {
                                                                                        "type": "string"
                                                                                    }
                                                                                },
                                                                                "required": [
                                                                                    "value",
                                                                                    "label"
                                                                                ]
                                                                            }
                                                                        }
                                                                    },
                                                                    "required": [
                                                                        "options"
                                                                    ]
                                                                },
                                                                "help_text": {
                                                                    "type": "string"
                                                                }
                                                            },
                                                            "required": [
                                                                "id",
                                                                "name",
                                                                "label",
                                                                "type",
                                                                "required",
                                                                "order",
                                                                "config",
                                                                "help_text"
                                                            ]
                                                        }
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "label",
                                                    "description",
                                                    "order",
                                                    "collapsed",
                                                    "applies_to_all_categories",
                                                    "category_ids",
                                                    "fields"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "groups"
                                    ],
                                    "example": {
                                        "groups": [
                                            {
                                                "id": "uuid",
                                                "label": "Información del Caballo",
                                                "description": "Datos básicos",
                                                "order": 1,
                                                "collapsed": false,
                                                "applies_to_all_categories": true,
                                                "category_ids": [],
                                                "fields": [
                                                    {
                                                        "id": "uuid",
                                                        "name": "breed",
                                                        "label": "Raza",
                                                        "type": "select",
                                                        "required": true,
                                                        "order": 1,
                                                        "config": {
                                                            "options": [
                                                                {
                                                                    "value": "paso_fino",
                                                                    "label": "Paso Fino"
                                                                }
                                                            ]
                                                        },
                                                        "help_text": "Selecciona la raza del caballo"
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Publicaciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "publicationType",
                    "description": "",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "publicationTypeId",
                    "description": "El UUID del tipo de publicación",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/custom-fields/field/{id}": {
            "get": {
                "summary": "Obtener un campo específico por ID",
                "operationId": "obtenerUnCampoEspecficoPorID",
                "description": "Get custom field details by ID.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Publicaciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of custom field.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/publications": {
            "get": {
                "summary": "Listar publicaciones con filtros",
                "operationId": "listarPublicacionesConFiltros",
                "description": "Get paginated list of published marketplace publications with filters.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "publication_type_id",
                        "description": "uuid Filter by publication type.",
                        "example": "550e8400-e29b-41d4-a716-446655440000",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "uuid Filter by publication type.",
                            "example": "550e8400-e29b-41d4-a716-446655440000"
                        }
                    },
                    {
                        "in": "query",
                        "name": "category_id",
                        "description": "uuid Filter by category.",
                        "example": "550e8400-e29b-41d4-a716-446655440001",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "uuid Filter by category.",
                            "example": "550e8400-e29b-41d4-a716-446655440001"
                        }
                    },
                    {
                        "in": "query",
                        "name": "subcategory_slug",
                        "description": "Filter by subcategory slug.",
                        "example": "caballos-deportivos",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by subcategory slug.",
                            "example": "caballos-deportivos"
                        }
                    },
                    {
                        "in": "query",
                        "name": "location_city",
                        "description": "Filter by city.",
                        "example": "Bogotá",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by city.",
                            "example": "Bogotá"
                        }
                    },
                    {
                        "in": "query",
                        "name": "min_price",
                        "description": "numeric Minimum price.",
                        "example": "1000000",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "numeric Minimum price.",
                            "example": "1000000"
                        }
                    },
                    {
                        "in": "query",
                        "name": "max_price",
                        "description": "numeric Maximum price.",
                        "example": "5000000",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "numeric Maximum price.",
                            "example": "5000000"
                        }
                    },
                    {
                        "in": "query",
                        "name": "seller_type",
                        "description": "Filter by seller type (user, organization).",
                        "example": "user",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by seller type (user, organization).",
                            "example": "user"
                        }
                    },
                    {
                        "in": "query",
                        "name": "seller_id",
                        "description": "Filter by seller ID.",
                        "example": "firebase-uid-123",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by seller ID.",
                            "example": "firebase-uid-123"
                        }
                    },
                    {
                        "in": "query",
                        "name": "sort",
                        "description": "Sort order (newest, oldest, price_asc, price_desc, popular).",
                        "example": "newest",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Sort order (newest, oldest, price_asc, price_desc, popular).",
                            "example": "newest"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page (max 100).",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page (max 100).",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [],
                                        "current_page": 1,
                                        "total": 50
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Publicaciones"
                ]
            },
            "post": {
                "summary": "Crear nueva publicación",
                "operationId": "crearNuevaPublicacin",
                "description": "Create a new marketplace publication.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Publicaciones"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "seller_type": {
                                        "type": "string",
                                        "description": "Seller type (user, organization).",
                                        "example": "user"
                                    },
                                    "seller_id": {
                                        "type": "string",
                                        "description": "Firebase UID of seller.",
                                        "example": "firebase-uid-123"
                                    },
                                    "publication_type_id": {
                                        "type": "uuid",
                                        "description": "Publication type ID.",
                                        "example": "550e8400-e29b-41d4-a716-446655440000"
                                    },
                                    "category_id": {
                                        "type": "uuid",
                                        "description": "Category ID.",
                                        "example": "550e8400-e29b-41d4-a716-446655440001"
                                    },
                                    "subcategory_slug": {
                                        "type": "string",
                                        "description": "Subcategory slug.",
                                        "example": "caballos-deportivos",
                                        "nullable": true
                                    },
                                    "title": {
                                        "type": "string",
                                        "description": "Publication title.",
                                        "example": "Caballo de salto"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Publication description.",
                                        "example": "Hermoso caballo..."
                                    },
                                    "price_amount": {
                                        "type": "numeric",
                                        "description": "Price amount.",
                                        "example": "5000000"
                                    },
                                    "price_currency": {
                                        "type": "string",
                                        "description": "Currency code (3 chars).",
                                        "example": "COP"
                                    },
                                    "price_negotiable": {
                                        "type": "boolean",
                                        "description": "Price is negotiable.",
                                        "example": true
                                    },
                                    "images": {
                                        "type": "array",
                                        "description": "Array of image URLs (min 1).",
                                        "example": [
                                            "https://example.com/image.jpg"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "videos": {
                                        "type": "array",
                                        "description": "Array of video URLs.",
                                        "example": [
                                            "https://example.com/video.mp4"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "location_city": {
                                        "type": "string",
                                        "description": "City.",
                                        "example": "Bogotá"
                                    },
                                    "location_state": {
                                        "type": "string",
                                        "description": "State/Department.",
                                        "example": "Cundinamarca"
                                    },
                                    "location_country": {
                                        "type": "string",
                                        "description": "Country.",
                                        "example": "Colombia"
                                    },
                                    "custom_data": {
                                        "type": "array",
                                        "description": "Custom data object.",
                                        "example": {
                                            "age": 5,
                                            "breed": "Pura Sangre"
                                        },
                                        "items": {
                                            "type": "string",
                                            "nullable": true
                                        }
                                    },
                                    "tags": {
                                        "type": "array",
                                        "description": "Array of tags.",
                                        "example": [
                                            "deportivo",
                                            "competencia"
                                        ],
                                        "items": {
                                            "type": "string",
                                            "nullable": true
                                        }
                                    }
                                },
                                "required": [
                                    "seller_type",
                                    "seller_id",
                                    "publication_type_id",
                                    "category_id",
                                    "title",
                                    "description",
                                    "price_amount",
                                    "images",
                                    "location_city",
                                    "location_state"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/marketplace/publications/{slug}": {
            "get": {
                "summary": "Obtener una publicación por slug",
                "operationId": "obtenerUnaPublicacinPorSlug",
                "description": "Get full details of a publication by slug. Increments view count.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Publicaciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "slug",
                    "description": "Publication slug.",
                    "example": "caballo-de-salto-123",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/my-publications": {
            "get": {
                "summary": "Obtener publicaciones del usuario autenticado",
                "operationId": "obtenerPublicacionesDelUsuarioAutenticado",
                "description": "Get all publications created by the authenticated user.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Publicaciones"
                ]
            }
        },
        "/api/marketplace/publications/{id}": {
            "put": {
                "summary": "Actualizar publicación",
                "operationId": "actualizarPublicacin",
                "description": "Update a publication (only by owner).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Publicaciones"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "description": "Title.",
                                        "example": "Nuevo título"
                                    },
                                    "description": {
                                        "type": "string",
                                        "description": "Description.",
                                        "example": "Nueva descripción"
                                    },
                                    "price_amount": {
                                        "type": "numeric",
                                        "description": "Price amount.",
                                        "example": "6000000"
                                    },
                                    "price_negotiable": {
                                        "type": "boolean",
                                        "description": "Price is negotiable.",
                                        "example": false
                                    },
                                    "images": {
                                        "type": "array",
                                        "description": "Array of image URLs.",
                                        "example": [
                                            "https://example.com/image.jpg"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "videos": {
                                        "type": "array",
                                        "description": "Array of video URLs.",
                                        "example": [
                                            "https://example.com/video.mp4"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "location_city": {
                                        "type": "string",
                                        "description": "City.",
                                        "example": "Medellín"
                                    },
                                    "location_state": {
                                        "type": "string",
                                        "description": "State/Department.",
                                        "example": "Antioquia"
                                    },
                                    "custom_data": {
                                        "type": "array",
                                        "description": "Custom data object.",
                                        "example": {
                                            "age": 6
                                        },
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "tags": {
                                        "type": "array",
                                        "description": "Array of tags.",
                                        "example": [
                                            "nuevo",
                                            "actualizado"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar publicación (soft delete)",
                "operationId": "eliminarPublicacinsoftDelete",
                "description": "Remove a publication (soft delete, only by owner).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "Publication removed successfully"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Publicaciones"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of publication.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/publication-types": {
            "get": {
                "summary": "Listar todos los tipos de publicación activos",
                "operationId": "listarTodosLosTiposDePublicacinActivos",
                "description": "Obtiene todos los tipos de publicación ordenados por su orden de visualización.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "string"
                                            },
                                            "slug": {
                                                "type": "string"
                                            },
                                            "label": {
                                                "type": "string"
                                            },
                                            "description": {
                                                "type": "string"
                                            },
                                            "icon": {
                                                "type": "string"
                                            },
                                            "active": {
                                                "type": "boolean"
                                            },
                                            "order": {
                                                "type": "integer"
                                            }
                                        },
                                        "required": [
                                            "id",
                                            "slug",
                                            "label",
                                            "description",
                                            "icon",
                                            "active",
                                            "order"
                                        ]
                                    },
                                    "example": [
                                        {
                                            "id": "uuid",
                                            "slug": "caballos",
                                            "label": "Caballos",
                                            "description": "Publicaciones de caballos",
                                            "icon": "horse",
                                            "active": true,
                                            "order": 1
                                        }
                                    ]
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Tipos"
                ]
            }
        },
        "/api/marketplace/publication-types/{slug}": {
            "get": {
                "summary": "Obtener un tipo de publicación por slug",
                "operationId": "obtenerUnTipoDePublicacinPorSlug",
                "description": "Get publication type details by slug.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Tipos"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "slug",
                    "description": "Publication type slug.",
                    "example": "caballos",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/seller/profile": {
            "get": {
                "summary": "Obtener perfil de vendedor profesional",
                "operationId": "obtenerPerfilDeVendedorProfesional",
                "description": "Get professional seller profile with commission info and completion status.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "profile": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "completion_percentage": {
                                                    "type": "integer"
                                                },
                                                "is_complete": {
                                                    "type": "boolean"
                                                },
                                                "commission": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "next_tier": {
                                                    "type": "object",
                                                    "properties": []
                                                }
                                            },
                                            "required": [
                                                "profile",
                                                "completion_percentage",
                                                "is_complete",
                                                "commission",
                                                "next_tier"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "profile": [],
                                            "completion_percentage": 85,
                                            "is_complete": false,
                                            "commission": [],
                                            "next_tier": []
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Vendedor"
                ]
            },
            "post": {
                "summary": "Crear perfil de vendedor profesional",
                "operationId": "crearPerfilDeVendedorProfesional",
                "description": "Create professional seller profile.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "profile": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "completion_percentage": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "profile",
                                                "completion_percentage"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Perfil de vendedor profesional creado exitosamente",
                                        "data": {
                                            "profile": [],
                                            "completion_percentage": 50
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Vendedor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "business_name": {
                                        "type": "string",
                                        "description": "Business name.",
                                        "example": "Mi Tienda"
                                    },
                                    "business_description": {
                                        "type": "string",
                                        "description": "Business description.",
                                        "example": "Venta de caballos...",
                                        "nullable": true
                                    },
                                    "business_logo_url": {
                                        "type": "string",
                                        "description": "Business logo URL.",
                                        "example": "https://example.com/logo.png",
                                        "nullable": true
                                    },
                                    "whatsapp_business": {
                                        "type": "string",
                                        "description": "WhatsApp business number.",
                                        "example": "+57 300 123 4567"
                                    },
                                    "business_email": {
                                        "type": "string",
                                        "description": "Business email.",
                                        "example": "contacto@mitienda.com",
                                        "nullable": true
                                    },
                                    "business_phone": {
                                        "type": "string",
                                        "description": "Business phone.",
                                        "example": "+57 1 234 5678",
                                        "nullable": true
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Business address.",
                                        "example": "Calle 123 #45-67"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City.",
                                        "example": "Bogotá"
                                    },
                                    "department": {
                                        "type": "string",
                                        "description": "Department/State.",
                                        "example": "Cundinamarca"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postal code.",
                                        "example": "110111",
                                        "nullable": true
                                    },
                                    "latitude": {
                                        "type": "numeric",
                                        "description": "Latitude.",
                                        "example": "4.6097",
                                        "nullable": true
                                    },
                                    "longitude": {
                                        "type": "numeric",
                                        "description": "Longitude.",
                                        "example": "-74.0817",
                                        "nullable": true
                                    },
                                    "offers_shipping": {
                                        "type": "boolean",
                                        "description": "Offers shipping.",
                                        "example": true
                                    },
                                    "shipping_zones": {
                                        "type": "array",
                                        "description": "Shipping zones.",
                                        "example": [
                                            "Bogotá",
                                            "Medellín"
                                        ],
                                        "items": {
                                            "type": "string",
                                            "nullable": true
                                        }
                                    },
                                    "base_shipping_cost": {
                                        "type": "numeric",
                                        "description": "Base shipping cost.",
                                        "example": "10000",
                                        "nullable": true
                                    },
                                    "shipping_policy": {
                                        "type": "string",
                                        "description": "Shipping policy.",
                                        "example": "Envíos a todo el país",
                                        "nullable": true
                                    },
                                    "accepts_returns": {
                                        "type": "boolean",
                                        "description": "Accepts returns.",
                                        "example": true
                                    },
                                    "return_days": {
                                        "type": "integer",
                                        "description": "Return days.",
                                        "example": 7,
                                        "nullable": true
                                    },
                                    "return_policy": {
                                        "type": "string",
                                        "description": "Return policy.",
                                        "example": "Devoluciones en 7 días",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "business_name",
                                    "whatsapp_business",
                                    "address",
                                    "city",
                                    "department"
                                ]
                            }
                        }
                    }
                }
            },
            "put": {
                "summary": "Actualizar perfil de vendedor profesional",
                "operationId": "actualizarPerfilDeVendedorProfesional",
                "description": "Update professional seller profile.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "profile": {
                                                    "type": "object",
                                                    "properties": []
                                                },
                                                "completion_percentage": {
                                                    "type": "integer"
                                                },
                                                "is_complete": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "profile",
                                                "completion_percentage",
                                                "is_complete"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Perfil actualizado exitosamente",
                                        "data": {
                                            "profile": [],
                                            "completion_percentage": 90,
                                            "is_complete": true
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Vendedor"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "business_name": {
                                        "type": "string",
                                        "description": "Business name.",
                                        "example": "Mi Tienda Actualizada"
                                    },
                                    "business_description": {
                                        "type": "string",
                                        "description": "Business description.",
                                        "example": "Nueva descripción",
                                        "nullable": true
                                    },
                                    "business_logo_url": {
                                        "type": "string",
                                        "description": "Business logo URL.",
                                        "example": "https://example.com/new-logo.png",
                                        "nullable": true
                                    },
                                    "whatsapp_business": {
                                        "type": "string",
                                        "description": "WhatsApp business number.",
                                        "example": "+57 300 123 4567"
                                    },
                                    "business_email": {
                                        "type": "string",
                                        "description": "Business email.",
                                        "example": "nuevo@mitienda.com",
                                        "nullable": true
                                    },
                                    "business_phone": {
                                        "type": "string",
                                        "description": "Business phone.",
                                        "example": "+57 1 234 5678",
                                        "nullable": true
                                    },
                                    "address": {
                                        "type": "string",
                                        "description": "Business address.",
                                        "example": "Nueva dirección"
                                    },
                                    "city": {
                                        "type": "string",
                                        "description": "City.",
                                        "example": "Medellín"
                                    },
                                    "department": {
                                        "type": "string",
                                        "description": "Department/State.",
                                        "example": "Antioquia"
                                    },
                                    "postal_code": {
                                        "type": "string",
                                        "description": "Postal code.",
                                        "example": "050001",
                                        "nullable": true
                                    },
                                    "latitude": {
                                        "type": "numeric",
                                        "description": "Latitude.",
                                        "example": "6.2476",
                                        "nullable": true
                                    },
                                    "longitude": {
                                        "type": "numeric",
                                        "description": "Longitude.",
                                        "example": "-75.5658",
                                        "nullable": true
                                    },
                                    "offers_shipping": {
                                        "type": "boolean",
                                        "description": "Offers shipping.",
                                        "example": false
                                    },
                                    "shipping_zones": {
                                        "type": "array",
                                        "description": "Shipping zones.",
                                        "example": [
                                            "Bogotá"
                                        ],
                                        "items": {
                                            "type": "string",
                                            "nullable": true
                                        }
                                    },
                                    "base_shipping_cost": {
                                        "type": "numeric",
                                        "description": "Base shipping cost.",
                                        "example": "15000",
                                        "nullable": true
                                    },
                                    "shipping_policy": {
                                        "type": "string",
                                        "description": "Shipping policy.",
                                        "example": "Solo envíos locales",
                                        "nullable": true
                                    },
                                    "accepts_returns": {
                                        "type": "boolean",
                                        "description": "Accepts returns.",
                                        "example": false
                                    },
                                    "return_days": {
                                        "type": "integer",
                                        "description": "Return days.",
                                        "example": 14,
                                        "nullable": true
                                    },
                                    "return_policy": {
                                        "type": "string",
                                        "description": "Return policy.",
                                        "example": "Sin devoluciones",
                                        "nullable": true
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/api/marketplace/seller/validate": {
            "post": {
                "summary": "Validar si puede publicar como profesional",
                "operationId": "validarSiPuedePublicarComoProfesional",
                "description": "Validate if user can publish as professional seller (checks profile completion).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "can_publish": {
                                                    "type": "boolean"
                                                },
                                                "has_profile": {
                                                    "type": "boolean"
                                                },
                                                "is_complete": {
                                                    "type": "boolean"
                                                },
                                                "completion_percentage": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "can_publish",
                                                "has_profile",
                                                "is_complete",
                                                "completion_percentage"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "data": {
                                            "can_publish": true,
                                            "has_profile": true,
                                            "is_complete": true,
                                            "completion_percentage": 100,
                                            "reason": null
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Vendedor"
                ]
            }
        },
        "/api/marketplace/orders/create-from-cart": {
            "post": {
                "summary": "Crear una orden desde el carrito",
                "operationId": "crearUnaOrdenDesdeElCarrito",
                "description": "Create order from cart items. Groups items by seller and creates sub-orders.",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "order": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "order"
                                    ],
                                    "example": {
                                        "message": "Orden creada exitosamente",
                                        "order": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "buyer_name": {
                                        "type": "string",
                                        "description": "Buyer name.",
                                        "example": "Juan Pérez"
                                    },
                                    "buyer_email": {
                                        "type": "string",
                                        "description": "Buyer email.",
                                        "example": "juan@example.com"
                                    },
                                    "buyer_phone": {
                                        "type": "string",
                                        "description": "Buyer phone.",
                                        "example": "+57 300 123 4567"
                                    },
                                    "buyer_document_type": {
                                        "type": "string",
                                        "description": "Document type (CC, CE, NIT, Pasaporte).",
                                        "example": "CC",
                                        "nullable": true
                                    },
                                    "buyer_document_number": {
                                        "type": "string",
                                        "description": "Document number.",
                                        "example": "1234567890",
                                        "nullable": true
                                    },
                                    "shipping_address": {
                                        "type": "string",
                                        "description": "Shipping address.",
                                        "example": "Calle 123 #45-67"
                                    },
                                    "shipping_city": {
                                        "type": "string",
                                        "description": "Shipping city.",
                                        "example": "Bogotá"
                                    },
                                    "shipping_state": {
                                        "type": "string",
                                        "description": "Shipping state/department.",
                                        "example": "Cundinamarca"
                                    },
                                    "shipping_country": {
                                        "type": "string",
                                        "description": "Shipping country.",
                                        "example": "Colombia",
                                        "nullable": true
                                    },
                                    "shipping_postal_code": {
                                        "type": "string",
                                        "description": "Postal code.",
                                        "example": "110111",
                                        "nullable": true
                                    },
                                    "customer_notes": {
                                        "type": "string",
                                        "description": "Customer notes (max 1000 chars).",
                                        "example": "Entregar en la mañana",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "buyer_name",
                                    "buyer_email",
                                    "buyer_phone",
                                    "shipping_address",
                                    "shipping_city",
                                    "shipping_state"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/marketplace/orders": {
            "get": {
                "summary": "Listar órdenes del usuario autenticado",
                "operationId": "listarrdenesDelUsuarioAutenticado",
                "description": "Get paginated list of orders for authenticated user.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filter by order status.",
                        "example": "pending",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by order status.",
                            "example": "pending"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [],
                                        "current_page": 1,
                                        "total": 10
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ]
            }
        },
        "/api/marketplace/orders/{id}": {
            "get": {
                "summary": "Obtener una orden por ID",
                "operationId": "obtenerUnaOrdenPorID",
                "description": "Get order details by ID (only by owner or admin).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of order.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/orders/{id}/payment/initiate": {
            "post": {
                "summary": "Iniciar proceso de pago",
                "operationId": "iniciarProcesoDePago",
                "description": "Initiate payment process for an order using ePayco Smart Checkout v2.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "sessionId": {
                                            "type": "string"
                                        },
                                        "test": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "sessionId",
                                        "test"
                                    ],
                                    "example": {
                                        "success": true,
                                        "sessionId": "session_123",
                                        "test": false
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the order.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                },
                {
                    "in": "path",
                    "name": "order_id",
                    "description": "UUID of order.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/orders/{id}/payment/verify": {
            "get": {
                "summary": "Verificar estado de pago",
                "operationId": "verificarEstadoDePago",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "pending",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "status": {
                                            "type": "integer"
                                        },
                                        "status_text": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "status",
                                        "status_text"
                                    ],
                                    "example": {
                                        "success": false,
                                        "message": "No hay referencia de pago",
                                        "status": 3,
                                        "status_text": "Pendiente"
                                    }
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "unauthorized",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "message"
                                    ],
                                    "example": {
                                        "message": "No autorizado"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "error": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "error"
                                    ],
                                    "example": {
                                        "error": "Orden no encontrada"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "The ID of the order.",
                    "example": "architecto",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/sub-orders": {
            "get": {
                "summary": "Listar sub-órdenes del vendedor autenticado",
                "operationId": "listarSubrdenesDelVendedorAutenticado",
                "description": "Get paginated list of sub-orders for authenticated seller.",
                "parameters": [
                    {
                        "in": "query",
                        "name": "status",
                        "description": "Filter by status.",
                        "example": "pending",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "description": "Filter by status.",
                            "example": "pending"
                        }
                    },
                    {
                        "in": "query",
                        "name": "per_page",
                        "description": "Items per page.",
                        "example": 20,
                        "required": false,
                        "schema": {
                            "type": "integer",
                            "description": "Items per page.",
                            "example": 20
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [],
                                        "current_page": 1,
                                        "total": 10
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ]
            }
        },
        "/api/marketplace/sub-orders/{id}": {
            "get": {
                "summary": "Obtener una sub-orden por ID",
                "operationId": "obtenerUnaSubOrdenPorID",
                "description": "Get sub-order details by ID (only by seller or admin).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of sub-order.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/sub-orders/{id}/status": {
            "put": {
                "summary": "Actualizar estado de la sub-orden",
                "operationId": "actualizarEstadoDeLaSubOrden",
                "description": "Update sub-order status (only by seller or admin).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Estado actualizado exitosamente",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "description": "Status (pending, processing, shipped, delivered, cancelled).",
                                        "example": "shipped"
                                    },
                                    "tracking_number": {
                                        "type": "string",
                                        "description": "Tracking number.",
                                        "example": "TRACK123456",
                                        "nullable": true
                                    },
                                    "tracking_carrier": {
                                        "type": "string",
                                        "description": "Tracking carrier.",
                                        "example": "Servientrega",
                                        "nullable": true
                                    },
                                    "seller_notes": {
                                        "type": "string",
                                        "description": "Seller notes (max 1000 chars).",
                                        "example": "Enviado por...",
                                        "nullable": true
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of sub-order.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/sub-orders/{id}/tracking": {
            "post": {
                "summary": "Agregar información de tracking",
                "operationId": "agregarInformacinDeTracking",
                "description": "Add or update tracking information for a sub-order (only by seller).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "message": "Tracking agregado exitosamente",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tracking_number": {
                                        "type": "string",
                                        "description": "Tracking number.",
                                        "example": "TRACK123456"
                                    },
                                    "tracking_carrier": {
                                        "type": "string",
                                        "description": "Tracking carrier.",
                                        "example": "Servientrega"
                                    },
                                    "tracking_url": {
                                        "type": "string",
                                        "description": "Tracking URL.",
                                        "example": "https://servientrega.com/track/TRACK123456"
                                    }
                                },
                                "required": [
                                    "tracking_number",
                                    "tracking_carrier"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of sub-order.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/seller/payouts": {
            "get": {
                "summary": "Listar pagos del vendedor autenticado",
                "operationId": "listarPagosDelVendedorAutenticado",
                "description": "",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "payout_number": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "net_amount": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "payout_number",
                                                    "status",
                                                    "net_amount"
                                                ]
                                            }
                                        },
                                        "current_page": {
                                            "type": "integer"
                                        },
                                        "total": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "data",
                                        "current_page",
                                        "total"
                                    ],
                                    "example": {
                                        "data": [
                                            {
                                                "id": "...",
                                                "payout_number": "PAY-2024-001",
                                                "status": "pending",
                                                "net_amount": 5000000
                                            }
                                        ],
                                        "current_page": 1,
                                        "total": 20
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ]
            }
        },
        "/api/marketplace/seller/payouts/stats": {
            "get": {
                "summary": "Estadísticas de pagos del vendedor",
                "operationId": "estadsticasDePagosDelVendedor",
                "description": "Get payout statistics for authenticated seller.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "pending": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "amount": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "amount"
                                            ]
                                        },
                                        "processing": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "amount": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "amount"
                                            ]
                                        },
                                        "paid": {
                                            "type": "object",
                                            "properties": {
                                                "count": {
                                                    "type": "integer"
                                                },
                                                "amount": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "count",
                                                "amount"
                                            ]
                                        },
                                        "total_earned": {
                                            "type": "integer"
                                        },
                                        "total_commission": {
                                            "type": "integer"
                                        }
                                    },
                                    "required": [
                                        "pending",
                                        "processing",
                                        "paid",
                                        "total_earned",
                                        "total_commission"
                                    ],
                                    "example": {
                                        "pending": {
                                            "count": 5,
                                            "amount": 500000
                                        },
                                        "processing": {
                                            "count": 2,
                                            "amount": 200000
                                        },
                                        "paid": {
                                            "count": 10,
                                            "amount": 1000000
                                        },
                                        "total_earned": 1000000,
                                        "total_commission": 150000
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ]
            }
        },
        "/api/marketplace/seller/payouts/{id}": {
            "get": {
                "summary": "Ver detalle de un pago",
                "operationId": "marketplaceSellerPayoutShow",
                "description": "Get payout details by ID (only by seller).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of payout.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/seller/payment-methods": {
            "get": {
                "summary": "Listar métodos de pago del vendedor",
                "operationId": "listarMtodosDePagoDelVendedor",
                "description": "Get all payment methods for authenticated seller.",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ],
                                    "example": {
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ]
            },
            "post": {
                "summary": "Crear método de pago",
                "operationId": "crearMtodoDePago",
                "description": "Create payment method for seller (Nequi, Daviplata, or bank transfer).",
                "parameters": [],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Método de pago agregado exitosamente",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "method_type": {
                                        "type": "string",
                                        "description": "Method type (nequi, daviplata, bank_transfer).",
                                        "example": "nequi"
                                    },
                                    "account_holder_name": {
                                        "type": "string",
                                        "description": "Account holder name.",
                                        "example": "Juan Pérez"
                                    },
                                    "is_default": {
                                        "type": "boolean",
                                        "description": "Set as default method.",
                                        "example": true
                                    },
                                    "phone_number": {
                                        "type": "string",
                                        "description": "Phone number (required for nequi/daviplata).",
                                        "example": "+57 300 123 4567"
                                    },
                                    "account_number": {
                                        "type": "string",
                                        "description": "Account number (required for bank_transfer).",
                                        "example": "1234567890"
                                    },
                                    "bank_name": {
                                        "type": "string",
                                        "description": "Bank name (required for bank_transfer).",
                                        "example": "Bancolombia"
                                    },
                                    "account_type": {
                                        "type": "string",
                                        "description": "Account type (savings, checking) (required for bank_transfer).",
                                        "example": "savings"
                                    },
                                    "document_type": {
                                        "type": "string",
                                        "description": "Document type.",
                                        "example": "CC"
                                    },
                                    "document_number": {
                                        "type": "string",
                                        "description": "Document number.",
                                        "example": "1234567890"
                                    }
                                },
                                "required": [
                                    "method_type",
                                    "account_holder_name"
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/api/marketplace/seller/payment-methods/{id}": {
            "put": {
                "summary": "Actualizar método de pago",
                "operationId": "actualizarMtodoDePago",
                "description": "Update payment method (only by owner).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Método de pago actualizado exitosamente",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ],
                "requestBody": {
                    "required": false,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "account_holder_name": {
                                        "type": "string",
                                        "description": "Account holder name.",
                                        "example": "Juan Pérez Actualizado"
                                    },
                                    "is_default": {
                                        "type": "boolean",
                                        "description": "Set as default method.",
                                        "example": true
                                    },
                                    "phone_number": {
                                        "type": "string",
                                        "description": "Phone number (for nequi/daviplata).",
                                        "example": "+57 300 999 9999"
                                    },
                                    "account_number": {
                                        "type": "string",
                                        "description": "Account number (for bank_transfer).",
                                        "example": "9876543210"
                                    },
                                    "bank_name": {
                                        "type": "string",
                                        "description": "Bank name (for bank_transfer).",
                                        "example": "Davivienda"
                                    },
                                    "account_type": {
                                        "type": "string",
                                        "description": "Account type (savings, checking) (for bank_transfer).",
                                        "example": "checking"
                                    }
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Eliminar método de pago",
                "operationId": "eliminarMtodoDePago",
                "description": "Delete payment method (only if not the only one, only by owner).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Método de pago eliminado exitosamente"
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of payment method.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/seller/payment-methods/{id}/set-default": {
            "post": {
                "summary": "Marcar como método por defecto",
                "operationId": "marcarComoMtodoPorDefecto",
                "description": "Set payment method as default (only by owner).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        },
                                        "message": {
                                            "type": "string"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "success",
                                        "message",
                                        "data"
                                    ],
                                    "example": {
                                        "success": true,
                                        "message": "Método marcado como predeterminado",
                                        "data": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ]
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of payment method.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/marketplace/orders/{id}/payment-status": {
            "post": {
                "summary": "Actualizar estado de pago (webhook de pasarela)",
                "operationId": "actualizarEstadoDePagowebhookDePasarela",
                "description": "Update payment status (typically called by payment gateway webhook).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string"
                                        },
                                        "order": {
                                            "type": "object",
                                            "properties": []
                                        }
                                    },
                                    "required": [
                                        "message",
                                        "order"
                                    ],
                                    "example": {
                                        "message": "Estado de pago actualizado",
                                        "order": []
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "payment_status": {
                                        "type": "string",
                                        "description": "Payment status (pending, approved, declined, error).",
                                        "example": "approved"
                                    },
                                    "payment_transaction_id": {
                                        "type": "string",
                                        "description": "Transaction ID from gateway.",
                                        "example": "txn_123456",
                                        "nullable": true
                                    },
                                    "payment_method": {
                                        "type": "string",
                                        "description": "Payment method.",
                                        "example": "credit_card",
                                        "nullable": true
                                    },
                                    "payment_response": {
                                        "type": "array",
                                        "description": "Payment gateway response.",
                                        "example": {
                                            "status": "success"
                                        },
                                        "items": {
                                            "type": "string",
                                            "nullable": true
                                        }
                                    }
                                },
                                "required": [
                                    "payment_status"
                                ]
                            }
                        }
                    }
                }
            },
            "parameters": [
                {
                    "in": "path",
                    "name": "id",
                    "description": "UUID of order.",
                    "example": "550e8400-e29b-41d4-a716-446655440017",
                    "required": true,
                    "schema": {
                        "type": "string"
                    }
                }
            ]
        },
        "/api/webhooks/epayco/confirmation": {
            "post": {
                "summary": "Webhook de confirmación de ePayco",
                "operationId": "webhookDeConfirmacinDeEPayco",
                "description": "Webhook endpoint for ePayco payment confirmation (validates signature).",
                "parameters": [],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean"
                                        }
                                    },
                                    "required": [
                                        "success"
                                    ],
                                    "example": {
                                        "success": true
                                    }
                                }
                            }
                        }
                    }
                },
                "tags": [
                    "🛒 Marketplace / Órdenes"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "x_ref_payco": {
                                        "type": "string",
                                        "description": "Payment reference.",
                                        "example": "ref_123"
                                    },
                                    "x_extra1": {
                                        "type": "string",
                                        "description": "Order ID.",
                                        "example": "550e8400-e29b-41d4-a716-446655440017"
                                    },
                                    "x_cod_transaction_state": {
                                        "type": "integer",
                                        "description": "Transaction state (1=approved, 2=declined, 3=pending).",
                                        "example": 1
                                    },
                                    "x_signature": {
                                        "type": "string",
                                        "description": "Signature for validation.",
                                        "example": "signature_hash"
                                    }
                                },
                                "required": [
                                    "x_ref_payco",
                                    "x_extra1",
                                    "x_cod_transaction_state",
                                    "x_signature"
                                ]
                            }
                        }
                    }
                }
            }
        }
    }
}