openapi: 3.1.0 info: title: AeroHub API description: 'API operacional de AeroHub: aprovisionamiento de tenants, seguimiento de vuelos y distribucion de FIDS en tiempo real (RF-T02, OpenAPI 3.1).' contact: name: AeroHub Platform Team version: 0.1.0 servers: - url: http://localhost:8000 description: Desarrollo local paths: /tenants: get: tags: - tenants summary: Listar Tenants Endpoint description: 'Workpanel: lista de todos los tenants (alcance ''interno'', no hay filtro de tenant que aplicar -- ver consultas_tenant.py).' operationId: listar_tenants_endpoint_tenants_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/TenantResumenResponse' type: array title: Response Listar Tenants Endpoint Tenants Get post: tags: - tenants summary: Crear Tenant description: Aprovisiona un tenant nuevo con su usuario administrador (CU-O18). operationId: crear_tenant_tenants_post requestBody: content: application/json: schema: $ref: '#/components/schemas/TenantCrearRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TenantCrearResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /catalogo/aeropuertos: get: tags: - tenants summary: Listar Aeropuertos Endpoint description: 'Para el select de aeropuerto del formulario de tenant -- antes se pedia el id de memoria en un campo de texto libre.' operationId: listar_aeropuertos_endpoint_catalogo_aeropuertos_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/AeropuertoResponse' type: array title: Response Listar Aeropuertos Endpoint Catalogo Aeropuertos Get /catalogo/planes: get: tags: - tenants summary: Listar Planes Endpoint operationId: listar_planes_endpoint_catalogo_planes_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/PlanResponse' type: array title: Response Listar Planes Endpoint Catalogo Planes Get /tenants/validar: get: tags: - tenants summary: Validar Disponibilidad Endpoint description: Verifica en tiempo real si un codigo de tenant o email de admin ya existen. operationId: validar_disponibilidad_endpoint_tenants_validar_get parameters: - name: codigo in: query required: false schema: anyOf: - type: string - type: 'null' title: Codigo - name: email_admin in: query required: false schema: anyOf: - type: string - type: 'null' title: Email Admin responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ValidarDisponibilidadResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /tenants/acuerdo-tratamiento-datos: get: tags: - tenants summary: Listar Acuerdos Tratamiento Datos Endpoint description: 'Historial completo del tenant del contexto, la vigente primero (mismo orden que `consultar_historial_acuerdos` ya devuelve).' operationId: listar_acuerdos_tratamiento_datos_endpoint_tenants_acuerdo_tratamiento_datos_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/AcuerdoTratamientoDatosResponse' type: array title: Response Listar Acuerdos Tratamiento Datos Endpoint Tenants Acuerdo Tratamiento Datos Get post: tags: - tenants summary: Aceptar Acuerdo Tratamiento Datos Endpoint description: 'S4.3, ADR-021 M-03. El tenant del acuerdo es SIEMPRE el del contexto (JWT), nunca un parámetro -- mismo principio de aislamiento que el resto del módulo.' operationId: aceptar_acuerdo_tratamiento_datos_endpoint_tenants_acuerdo_tratamiento_datos_post requestBody: content: application/json: schema: $ref: '#/components/schemas/AcuerdoTratamientoDatosRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AcuerdoTratamientoDatosResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /tenants/{tenant_id}: get: tags: - tenants summary: Obtener Tenant Endpoint operationId: obtener_tenant_endpoint_tenants__tenant_id__get parameters: - name: tenant_id in: path required: true schema: type: integer title: Tenant Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TenantResumenResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - tenants summary: Actualizar Tenant Endpoint operationId: actualizar_tenant_endpoint_tenants__tenant_id__patch parameters: - name: tenant_id in: path required: true schema: type: integer title: Tenant Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TenantActualizarRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TenantResumenResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' delete: tags: - tenants summary: Eliminar Tenant Endpoint description: Borrado fisico permanente de un tenant y todos sus registros asociados. operationId: eliminar_tenant_endpoint_tenants__tenant_id__delete parameters: - name: tenant_id in: path required: true schema: type: integer title: Tenant Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /tenants/{tenant_id}/estado: post: tags: - tenants summary: Cambiar Estado Tenant Endpoint description: 'Transiciones validas por domain/tenant.py -- p. ej. dar de baja es terminal, no se puede reactivar un tenant ''dado_de_baja''.' operationId: cambiar_estado_tenant_endpoint_tenants__tenant_id__estado_post parameters: - name: tenant_id in: path required: true schema: type: integer title: Tenant Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/TenantCambiarEstadoRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TenantResumenResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api-keys: get: tags: - tenants summary: Listar Api Keys Endpoint description: Lista las API Keys asociadas al tenant del usuario autenticado. operationId: listar_api_keys_endpoint_api_keys_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/ApiKeyResumenResponse' type: array title: Response Listar Api Keys Endpoint Api Keys Get post: tags: - tenants summary: Crear Api Key Endpoint description: 'Genera una API Key nueva para el tenant del llamador (RF-O12). El secreto en claro se devuelve UNA sola vez -- no se puede recuperar despues, solo revocar y crear una nueva.' operationId: crear_api_key_endpoint_api_keys_post responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ApiKeyCrearResponse' /licencias/mi-tenant: get: tags: - tenants summary: Listar Licencias Mi Tenant Endpoint description: Lista las licencias contratadas por el tenant del usuario autenticado. operationId: listar_licencias_mi_tenant_endpoint_licencias_mi_tenant_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/LicenciaResumenResponse' type: array title: Response Listar Licencias Mi Tenant Endpoint Licencias Mi Tenant Get /licencias/{licencia_id}/suspender: post: tags: - tenants summary: Suspender Licencia Endpoint description: 'S4.3 (ADR-021 M-05) -- decisión de plataforma, nunca del propio tenant: `role_platform_admin` suspende el módulo de una organización ajena (impago, incumplimiento), mismo criterio que `eliminar_tenant_fisico`.' operationId: suspender_licencia_endpoint_licencias__licencia_id__suspender_post parameters: - name: licencia_id in: path required: true schema: type: integer title: Licencia Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/LicenciaSuspenderRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LicenciaResumenResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /licencias/{licencia_id}/reactivar: post: tags: - tenants summary: Reactivar Licencia Endpoint operationId: reactivar_licencia_endpoint_licencias__licencia_id__reactivar_post parameters: - name: licencia_id in: path required: true schema: type: integer title: Licencia Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LicenciaResumenResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api-keys/{api_key_id}/revocar: post: tags: - tenants summary: Revocar Api Key Endpoint description: 'Revoca una API Key del propio tenant (PN-06: deja de aceptarse de inmediato).' operationId: revocar_api_key_endpoint_api_keys__api_key_id__revocar_post parameters: - name: api_key_id in: path required: true schema: type: integer title: Api Key Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /api-keys/{api_key_id}/rotar: post: tags: - tenants summary: Rotar Api Key Endpoint description: 'RF-O12 -- emite un secreto nuevo sin interrumpir el servicio: la key anterior queda revocada (con `rotada_en`), la nueva es la credencial activa desde ahora. Evento auditado (SC-004).' operationId: rotar_api_key_endpoint_api_keys__api_key_id__rotar_post parameters: - name: api_key_id in: path required: true schema: type: integer title: Api Key Id responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/ApiKeyCrearResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /tenants/informes/simple: get: tags: - tenants summary: Informe Tenants Simple Endpoint operationId: informe_tenants_simple_endpoint_tenants_informes_simple_get parameters: - name: estado in: query required: false schema: anyOf: - type: string - type: 'null' title: Estado - name: formato in: query required: false schema: type: string default: json title: Formato responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /tenants/informes/compuesto: get: tags: - tenants summary: Informe Tenants Compuesto Endpoint operationId: informe_tenants_compuesto_endpoint_tenants_informes_compuesto_get parameters: - name: formato in: query required: false schema: type: string default: json title: Formato responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /auth/login: post: tags: - auth summary: Login description: 'FR-001..FR-004: nunca distingue en la respuesta si fallo el correo o la contrasena -- un solo 401 para todos los casos de credencial invalida, cuenta inactiva, bloqueada o sin rol vigente.' operationId: login_auth_login_post requestBody: content: application/json: schema: $ref: '#/components/schemas/LoginRequest' required: true responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/LoginResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /auth/yo: get: tags: - auth summary: Obtener Mi Perfil operationId: obtener_mi_perfil_auth_yo_get responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PerfilResponse' /auth/logout: post: tags: - auth summary: Logout operationId: logout_auth_logout_post responses: '200': description: Successful Response content: application/json: schema: additionalProperties: type: string type: object title: Response Logout Auth Logout Post /auth/cambiar-password: post: tags: - auth summary: Cambiar Mi Password operationId: cambiar_mi_password_auth_cambiar_password_post requestBody: content: application/json: schema: $ref: '#/components/schemas/CambiarPasswordRequest' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: type: string type: object title: Response Cambiar Mi Password Auth Cambiar Password Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /auth/recuperar: post: tags: - auth summary: Recuperar Password description: 'FR-021: SIEMPRE 202, exista o no la cuenta -- no se puede usar para descubrir que correos estan registrados.' operationId: recuperar_password_auth_recuperar_post requestBody: content: application/json: schema: $ref: '#/components/schemas/RecuperarRequest' required: true responses: '202': description: Successful Response content: application/json: schema: additionalProperties: type: string type: object title: Response Recuperar Password Auth Recuperar Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /auth/restablecer: post: tags: - auth summary: Restablecer Mi Password operationId: restablecer_mi_password_auth_restablecer_post requestBody: content: application/json: schema: $ref: '#/components/schemas/RestablecerRequest' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: type: string type: object title: Response Restablecer Mi Password Auth Restablecer Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /auth/verificar-correo: post: tags: - auth summary: Verificar Mi Correo operationId: verificar_mi_correo_auth_verificar_correo_post requestBody: content: application/json: schema: $ref: '#/components/schemas/VerificarCorreoRequest' required: true responses: '200': description: Successful Response content: application/json: schema: additionalProperties: type: string type: object title: Response Verificar Mi Correo Auth Verificar Correo Post '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /auth/solicitar-verificacion: post: tags: - auth summary: Pedir Verificacion De Correo operationId: pedir_verificacion_de_correo_auth_solicitar_verificacion_post responses: '202': description: Successful Response content: application/json: schema: additionalProperties: type: string type: object title: Response Pedir Verificacion De Correo Auth Solicitar Verificacion Post /usuarios/invitaciones: post: tags: - auth summary: Invitar operationId: invitar_usuarios_invitaciones_post requestBody: content: application/json: schema: $ref: '#/components/schemas/InvitarRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/InvitarResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /usuarios/aceptar-invitacion: post: tags: - auth summary: Aceptar operationId: aceptar_usuarios_aceptar_invitacion_post requestBody: content: application/json: schema: $ref: '#/components/schemas/AceptarInvitacionRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AceptarInvitacionResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /usuarios: get: tags: - auth summary: Listar Usuarios operationId: listar_usuarios_usuarios_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/UsuarioResumenResponse' type: array title: Response Listar Usuarios Usuarios Get /usuarios/{usuario_id}: get: tags: - auth summary: Obtener Usuario Endpoint operationId: obtener_usuario_endpoint_usuarios__usuario_id__get parameters: - name: usuario_id in: path required: true schema: type: integer title: Usuario Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/UsuarioDetalleResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' patch: tags: - auth summary: Actualizar Usuario Endpoint operationId: actualizar_usuario_endpoint_usuarios__usuario_id__patch parameters: - name: usuario_id in: path required: true schema: type: integer title: Usuario Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UsuarioActualizarRolRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/UsuarioDetalleResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /usuarios/{usuario_id}/aerolinea: patch: tags: - auth summary: Asignar Aerolinea Endpoint description: 'Hallazgo 3 de la auditoria de la capa operativa (2026-08-08): puebla `tenants.usuario.aerolinea_id`, de la que depende el recorte "solo sus itinerarios"/"sus cargos" de role_airline_coordinator. Sin este endpoint la columna no tendria forma de poblarse y todo coordinador veria 0 vuelos (el filtro es fail-closed a proposito).' operationId: asignar_aerolinea_endpoint_usuarios__usuario_id__aerolinea_patch parameters: - name: usuario_id in: path required: true schema: type: integer title: Usuario Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UsuarioAsignarAerolineaRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/UsuarioDetalleResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /usuarios/{usuario_id}/estado: post: tags: - auth summary: Cambiar Estado Usuario Endpoint operationId: cambiar_estado_usuario_endpoint_usuarios__usuario_id__estado_post parameters: - name: usuario_id in: path required: true schema: type: integer title: Usuario Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UsuarioCambiarEstadoRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/UsuarioDetalleResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /vuelos/catalogo/aerolineas: get: tags: - vuelos summary: Listar Aerolineas Endpoint description: 'Catalogo global para el select de aerolinea del formulario de alta de vuelo -- sin esto, el formulario pediria un id Snowflake a mano (Sprint S1.15, FR-010).' operationId: listar_aerolineas_endpoint_vuelos_catalogo_aerolineas_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/AerolineaResponse' type: array title: Response Listar Aerolineas Endpoint Vuelos Catalogo Aerolineas Get /vuelos/catalogo/aeronaves: get: tags: - vuelos summary: Listar Aeronaves Endpoint operationId: listar_aeronaves_endpoint_vuelos_catalogo_aeronaves_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/AeronaveResponse' type: array title: Response Listar Aeronaves Endpoint Vuelos Catalogo Aeronaves Get /vuelos/catalogo/tipos-vuelo: get: tags: - vuelos summary: Listar Tipos Vuelo Endpoint operationId: listar_tipos_vuelo_endpoint_vuelos_catalogo_tipos_vuelo_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/TipoVueloResponse' type: array title: Response Listar Tipos Vuelo Endpoint Vuelos Catalogo Tipos Vuelo Get /vuelos/catalogo/aeropuertos: get: tags: - vuelos summary: Listar Aeropuertos Endpoint description: 'Redeclarado aqui bajo ''vuelos:leer'' (hallazgo empirico, ver consultas_catalogo.py): GET /catalogo/aeropuertos de aerohub_tenancy exige ''tenants:crear'', que un rol operativo no tiene.' operationId: listar_aeropuertos_endpoint_vuelos_catalogo_aeropuertos_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/AeropuertoResponse' type: array title: Response Listar Aeropuertos Endpoint Vuelos Catalogo Aeropuertos Get /vuelos: post: tags: - vuelos summary: Crear Vuelo description: Da de alta un vuelo para el tenant del llamador (RF-O02 parcial). operationId: crear_vuelo_vuelos_post requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/VueloCrearRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/VueloCrearResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' get: tags: - vuelos summary: Listar Vuelos Endpoint description: 'Listado de vuelos del tenant, mas reciente primero, con filtros opcionales de fecha y estado actual (Fase 3 de docs/diseno/PLAN_CORRECCION_MODULOS.md, causa raiz D): antes de este endpoint la vista nucleo no podia mostrar nada al entrar, solo tras un evento de WebSocket.' operationId: listar_vuelos_endpoint_vuelos_get parameters: - name: fecha_operacion in: query required: false schema: anyOf: - type: string format: date - type: 'null' title: Fecha Operacion - name: codigo_estado in: query required: false schema: anyOf: - type: string - type: 'null' title: Codigo Estado responses: '200': description: Successful Response content: application/json: schema: type: array items: $ref: '#/components/schemas/VueloListadoResponse' title: Response Listar Vuelos Endpoint Vuelos Get '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /vuelos/{vuelo_id}: get: tags: - vuelos summary: Obtener Vuelo description: 'Consulta un vuelo por id (PN-01: 404 si es de otro tenant).' operationId: obtener_vuelo_vuelos__vuelo_id__get parameters: - name: vuelo_id in: path required: true schema: type: integer title: Vuelo Id responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/VueloConsultaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /vuelos/{vuelo_id}/estados: post: tags: - vuelos summary: Cambiar Estado Vuelo description: 'Registra un cambio de estado y lo publica en el canal en tiempo real /vuelos/ws/estado (RF-O04, RNF-P01).' operationId: cambiar_estado_vuelo_vuelos__vuelo_id__estados_post parameters: - name: vuelo_id in: path required: true schema: type: integer title: Vuelo Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CambioEstadoRequest' responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CambioEstadoResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /vuelos/informes/simple: get: tags: - vuelos summary: Informe Vuelos Simple Endpoint operationId: informe_vuelos_simple_endpoint_vuelos_informes_simple_get parameters: - name: periodo_inicio in: query required: true schema: type: string format: date title: Periodo Inicio - name: periodo_fin in: query required: true schema: type: string format: date title: Periodo Fin - name: aerolinea_id in: query required: false schema: anyOf: - type: string - type: 'null' title: Aerolinea Id - name: formato in: query required: false schema: type: string default: json title: Formato responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /vuelos/informes/compuesto: get: tags: - vuelos summary: Informe Vuelos Compuesto Endpoint operationId: informe_vuelos_compuesto_endpoint_vuelos_informes_compuesto_get parameters: - name: periodo_inicio in: query required: true schema: type: string format: date title: Periodo Inicio - name: periodo_fin in: query required: true schema: type: string format: date title: Periodo Fin - name: formato in: query required: false schema: type: string default: json title: Formato responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /fids/plantillas: get: tags: - fids summary: Listar Plantillas Endpoint description: 'Listado de plantillas -- solo la ultima version de cada nombre (Sprint S1.16, research.md Decision 2).' operationId: listar_plantillas_endpoint_fids_plantillas_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/PlantillaResumenResponse' type: array title: Response Listar Plantillas Endpoint Fids Plantillas Get post: tags: - fids summary: Publicar Plantilla Endpoint description: Publica una version nueva de plantilla FIDS (RF-T03). operationId: publicar_plantilla_endpoint_fids_plantillas_post requestBody: content: application/json: schema: $ref: '#/components/schemas/PlantillaPublicarRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PlantillaPublicarResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /fids/pantallas: get: tags: - fids summary: Listar Pantallas Endpoint description: 'Tablero de telemetria: pantallas del tenant con su estado y ultima senal (Sprint S1.16, research.md Decision 3).' operationId: listar_pantallas_endpoint_fids_pantallas_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/PantallaResumenResponse' type: array title: Response Listar Pantallas Endpoint Fids Pantallas Get post: tags: - fids summary: Registrar Pantalla Endpoint description: Registra una pantalla fisica nueva (RF-O07). operationId: registrar_pantalla_endpoint_fids_pantallas_post requestBody: content: application/json: schema: $ref: '#/components/schemas/PantallaRegistrarRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PantallaRegistrarResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /fids/catalogo/terminales: get: tags: - fids summary: Listar Terminales Endpoint description: 'Catalogo de terminales del tenant, para el select del formulario de registro de pantalla (Sprint S1.16, research.md Decision 4).' operationId: listar_terminales_endpoint_fids_catalogo_terminales_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/TerminalResponse' type: array title: Response Listar Terminales Endpoint Fids Catalogo Terminales Get /fids/pantallas/{pantalla_id}/plantilla: patch: tags: - fids summary: Asignar Plantilla Endpoint description: 'Cambia la plantilla vigente de una pantalla (RF-T03, RNF-P02: <1s).' operationId: asignar_plantilla_endpoint_fids_pantallas__pantalla_id__plantilla_patch parameters: - name: pantalla_id in: path required: true schema: type: integer title: Pantalla Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AsignarPlantillaRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /fids/pantallas/{pantalla_id}/heartbeat: post: tags: - fids summary: Heartbeat Endpoint description: Telemetria periodica de la pantalla fisica (RF-O07, RNF-R04). operationId: heartbeat_endpoint_fids_pantallas__pantalla_id__heartbeat_post parameters: - name: pantalla_id in: path required: true schema: type: integer title: Pantalla Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/HeartbeatRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /fids/pantallas/{codigo}: get: tags: - fids summary: Obtener Pantalla Endpoint description: Consulta la pantalla y su plantilla vigente por codigo (arranque del reproductor). operationId: obtener_pantalla_endpoint_fids_pantallas__codigo__get parameters: - name: codigo in: path required: true schema: type: string title: Codigo responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PantallaConsultaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /puertas/asignaciones: post: tags: - puertas summary: Asignar Puerta Endpoint description: Asigna una puerta a un vuelo (RF-O02, PN-05). operationId: asignar_puerta_endpoint_puertas_asignaciones_post requestBody: content: application/json: schema: $ref: '#/components/schemas/AsignarPuertaRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AsignarPuertaResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /puertas/asignaciones/{asignacion_id}/cancelar: post: tags: - puertas summary: Cancelar Asignacion Endpoint description: 'Cancela una asignacion, liberando la puerta (baja logica, P5: nunca un DELETE de motor sobre la fila).' operationId: cancelar_asignacion_endpoint_puertas_asignaciones__asignacion_id__cancelar_post parameters: - name: asignacion_id in: path required: true schema: type: integer title: Asignacion Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /puertas/terminales: get: tags: - puertas summary: Listar Terminales Endpoint operationId: listar_terminales_endpoint_puertas_terminales_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/TerminalListadoResponse' type: array title: Response Listar Terminales Endpoint Puertas Terminales Get post: tags: - puertas summary: Crear Terminal Endpoint description: 'Alta de terminal (Fase 3 de docs/diseno/PLAN_CORRECCION_MODULOS.md, causa raiz backend: M3 no tenia forma de crear terminales, solo se veian si un seed las insertaba a mano).' operationId: crear_terminal_endpoint_puertas_terminales_post requestBody: content: application/json: schema: $ref: '#/components/schemas/TerminalCrearRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/TerminalCrearResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /puertas: post: tags: - puertas summary: Crear Puerta Endpoint description: 'Alta de puerta (Fase 3 de docs/diseno/PLAN_CORRECCION_MODULOS.md, causa raiz backend: el tablero solo listaba puertas ya existentes, ninguna forma de crearlas desde la API).' operationId: crear_puerta_endpoint_puertas_post requestBody: content: application/json: schema: $ref: '#/components/schemas/PuertaCrearRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/PuertaCrearResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /puertas/{puerta_id}: patch: tags: - puertas summary: Editar Puerta Endpoint description: 'Edicion de puerta -- terminal, codigo, tipo, envergadura y pasarela (Fase 3, mismo hallazgo que el alta: no existia ninguna forma de editar una puerta ya creada).' operationId: editar_puerta_endpoint_puertas__puerta_id__patch parameters: - name: puerta_id in: path required: true schema: type: integer title: Puerta Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PuertaEditarRequest' responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /puertas/vuelos-sin-asignar: get: tags: - puertas summary: Listar Vuelos Sin Asignar Endpoint description: 'Catalogo para el real (cierre de brecha de workpanel post-S1.20).' operationId: listar_tipos_tarea_endpoint_rampa_catalogo_tipos_tarea_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/TipoTareaResponse' type: array title: Response Listar Tipos Tarea Endpoint Rampa Catalogo Tipos Tarea Get /rampa/informes/simple: get: tags: - rampa summary: Informe Turnarounds Simple Endpoint operationId: informe_turnarounds_simple_endpoint_rampa_informes_simple_get parameters: - name: periodo_inicio in: query required: true schema: type: string format: date title: Periodo Inicio - name: periodo_fin in: query required: true schema: type: string format: date title: Periodo Fin - name: estado in: query required: false schema: anyOf: - type: string - type: 'null' title: Estado - name: formato in: query required: false schema: type: string default: json title: Formato responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /rampa/informes/mis-tareas: get: tags: - rampa summary: Informe Mis Tareas Endpoint description: 'Hallazgo 4 de la auditoria de la capa operativa (2026-08-08): las tareas del periodo asignadas a quien consulta. Sin parametro de usuario a proposito -- se resuelve de la sesion. El scope es `rampa:leer` (no uno nuevo): cualquiera que pueda leer rampa puede ver SUS PROPIAS tareas, que es un subconjunto de lo que ya ve.' operationId: informe_mis_tareas_endpoint_rampa_informes_mis_tareas_get parameters: - name: periodo_inicio in: query required: true schema: type: string format: date title: Periodo Inicio - name: periodo_fin in: query required: true schema: type: string format: date title: Periodo Fin - name: formato in: query required: false schema: type: string default: json title: Formato responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /rampa/informes/compuesto: get: tags: - rampa summary: Informe Turnarounds Compuesto Endpoint operationId: informe_turnarounds_compuesto_endpoint_rampa_informes_compuesto_get parameters: - name: periodo_inicio in: query required: true schema: type: string format: date title: Periodo Inicio - name: periodo_fin in: query required: true schema: type: string format: date title: Periodo Fin - name: formato in: query required: false schema: type: string default: json title: Formato responses: '200': description: Successful Response content: application/json: schema: {} '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /billing/tarifarios: get: tags: - facturacion summary: Listar Tarifarios Endpoint description: 'Historial completo del tenant (todos los estados), no solo el vigente -- Sprint S1.17, cierra RF-T10 en el fondo (spec.md US2).' operationId: listar_tarifarios_endpoint_billing_tarifarios_get responses: '200': description: Successful Response content: application/json: schema: items: $ref: '#/components/schemas/TarifarioResponse' type: array title: Response Listar Tarifarios Endpoint Billing Tarifarios Get post: tags: - facturacion summary: Crear Tarifario Endpoint operationId: crear_tarifario_endpoint_billing_tarifarios_post requestBody: content: application/json: schema: $ref: '#/components/schemas/CrearTarifarioRequest' required: true responses: '201': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/CrearTarifarioResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /billing/tarifarios/{tarifario_id}/conceptos: post: tags: - facturacion summary: Agregar Concepto Endpoint operationId: agregar_concepto_endpoint_billing_tarifarios__tarifario_id__conceptos_post parameters: - name: tarifario_id in: path required: true schema: type: integer title: Tarifario Id requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AgregarConceptoRequest' responses: '200': description: Successful Response content: application/json: schema: $ref: '#/components/schemas/AgregarConceptoResponse' '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /billing/tarifarios/{tarifario_id}/activar: post: tags: - facturacion summary: Activar Tarifario Endpoint operationId: activar_tarifario_endpoint_billing_tarifarios__tarifario_id__activar_post parameters: - name: tarifario_id in: path required: true schema: type: integer title: Tarifario Id responses: '204': description: Successful Response '422': description: Validation Error content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' /billing/catalogo/conceptos-cargo: get: tags: - facturacion summary: Listar Conceptos Cargo Endpoint description: 'Catalogo de solo lectura para el