{"openapi":"3.1.0","info":{"title":"Telvant · API pública","version":"1.0.0","description":"API `/api/v1` (SPEC §14.1). Autenticación `Authorization: Bearer tlv_live_…` o `tlv_test_…`.\nPaginación por cursor, filtros por fecha y estado, `Idempotency-Key` obligatoria en POST.\nMontos en centavos enteros con `moneda`; fechas ISO 8601 en UTC.\n\nErrores: `{ error: { codigo, mensaje, campo? } }`.\n\n| Código | HTTP | Mensaje predeterminado |\n|---|---|---|\n| `NO_AUTENTICADO` | 401 | Falta la credencial o ya no es válida. Inicia sesión de nuevo o revisa el encabezado Authorization. |\n| `TOKEN_VENCIDO` | 401 | La sesión venció. Renueva el token con /auth/renovar y repite la petición. |\n| `DISPOSITIVO_REVOCADO` | 401 | Este teléfono se desvinculó desde el panel. Borra los datos locales y entra con un código nuevo. |\n| `CODIGO_INVALIDO` | 401 | El código no coincide o ya venció. Pide un código nuevo. |\n| `PERMISO_DENEGADO` | 403 | Tu rol no permite esta acción. Pide al propietario de la cuenta que te dé el permiso. |\n| `NO_ENCONTRADO` | 404 | No encontramos el recurso en esta organización. Revisa el identificador. |\n| `VALIDACION` | 422 | Un dato no tiene el formato esperado. Corrige el campo indicado y vuelve a enviar. |\n| `IDEMPOTENCIA_REQUERIDA` | 400 | Falta el encabezado Idempotency-Key. Agrega una clave única por operación y vuelve a enviar. |\n| `IDEMPOTENCIA_CONFLICTO` | 409 | Esa Idempotency-Key ya se usó con otro contenido. Usa una clave nueva para una operación distinta. |\n| `ESTADO_NO_PERMITE` | 409 | El estado actual del recurso no permite esta acción. Consulta su estado y elige otra acción. |\n| `OPERADOR_FUERA_DE_SERVICIO` | 409 | Estás fuera de servicio y no se guardan posiciones del celular. Inicia turno para enviarlas. |\n| `UNIDAD_EN_MOVIMIENTO` | 409 | La unidad va en movimiento. Escribe el mensaje cuando la unidad esté detenida. |\n| `ARCHIVO_INCOMPLETO` | 409 | Aún no recibimos el archivo completo. Termina la subida y vuelve a completarlo. |\n| `ARCHIVO_NO_COINCIDE` | 422 | El archivo recibido no coincide con la huella o el tamaño declarados. Súbelo de nuevo desde el inicio. |\n| `ARCHIVO_DEMASIADO_GRANDE` | 413 | El archivo pesa más de 15 MB. Reduce la foto o divide el PDF y vuelve a intentarlo. |\n| `ARCHIVO_TIPO_NO_PERMITIDO` | 415 | Solo se aceptan fotos (JPG, PNG, HEIC, WebP) y PDF. Cambia el formato del archivo. |\n| `LOTE_DEMASIADO_GRANDE` | 413 | El lote supera el máximo permitido (100 eventos o 500 posiciones). Divídelo y envía cada parte. |\n| `LIMITE_PETICIONES` | 429 | Llegaste al límite de peticiones. Espera los segundos que indica Retry-After y reintenta. |\n| `VERSION_NO_SOPORTADA` | 426 | Esta versión de la app ya no es compatible. Actualízala desde la tienda para seguir. |\n| `ERROR_INTERNO` | 500 | Algo falló de nuestro lado. Reintenta en unos minutos; si sigue, escribe a soporte con el id de la petición. |\n| `SERVICIO_NO_DISPONIBLE` | 503 | El servicio está en mantenimiento. Reintenta en unos minutos. |"},"servers":[{"url":"/api/v1"}],"components":{"securitySchemes":{"llaveApi":{"type":"http","scheme":"bearer","bearerFormat":"tlv_live_… | tlv_test_…","description":"Llave de API de la organización. Las llaves `tlv_test_` están ligadas al modo demo."}},"schemas":{"WebhookEstadiaCreada":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f","description":"Identificador del evento; úsalo para descartar entregas repetidas."},"tipo":{"type":"string","enum":["estadia.creada"]},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"organizacion_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"modo":{"type":"string","enum":["live","test"],"description":"`test` para organizaciones en modo demo."},"datos":{"type":"object","properties":{"estadia":{"$ref":"#/components/schemas/Estadia"}},"required":["estadia"]}},"required":["id","tipo","creado_en","organizacion_id","modo","datos"]},"Estadia":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"folio":{"type":"string","example":"EST-000123"},"estado":{"$ref":"#/components/schemas/EstadoEstadia"},"viaje_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"parada_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"embarcador_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"ubicacion_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"unidad_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"operador_id":{"type":["string","null"],"format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"llegada":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"inicio_conteo":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"fin_tiempo_libre":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"salida":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"},"minutos_cobrables":{"type":"integer","minimum":0},"cargo_centavos":{"type":"integer","minimum":0,"example":65000,"description":"Cargo calculado por el servidor. En `en_espera` es el acumulado hasta ahora."},"moneda":{"type":"string","enum":["MXN","USD"],"example":"MXN"},"calidad_evidencia":{"$ref":"#/components/schemas/CalidadEvidencia"},"autorizada_en":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"},"motivo_descarte":{"type":["string","null"]},"factura_id":{"type":["string","null"],"format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"actualizado_en":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"}},"required":["id","folio","estado","viaje_id","parada_id","embarcador_id","ubicacion_id","unidad_id","operador_id","llegada","inicio_conteo","fin_tiempo_libre","salida","minutos_cobrables","cargo_centavos","moneda","calidad_evidencia","autorizada_en","motivo_descarte","factura_id","creado_en","actualizado_en"]},"EstadoEstadia":{"type":"string","enum":["tiempo_libre","en_espera","por_facturar","facturada","cobrada","en_disputa","descartada"],"description":"Tiempo libre, En espera, Por facturar, Facturada, Cobrada, En disputa o Descartada (BRAND.md §3.6)."},"CalidadEvidencia":{"type":"string","enum":["tiempo_real","cada_minuto","basica"]},"WebhookEstadiaEnEspera":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f","description":"Identificador del evento; úsalo para descartar entregas repetidas."},"tipo":{"type":"string","enum":["estadia.en_espera"]},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"organizacion_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"modo":{"type":"string","enum":["live","test"],"description":"`test` para organizaciones en modo demo."},"datos":{"type":"object","properties":{"estadia":{"$ref":"#/components/schemas/Estadia"}},"required":["estadia"]}},"required":["id","tipo","creado_en","organizacion_id","modo","datos"]},"WebhookEstadiaPorFacturar":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f","description":"Identificador del evento; úsalo para descartar entregas repetidas."},"tipo":{"type":"string","enum":["estadia.por_facturar"]},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"organizacion_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"modo":{"type":"string","enum":["live","test"],"description":"`test` para organizaciones en modo demo."},"datos":{"type":"object","properties":{"estadia":{"$ref":"#/components/schemas/Estadia"}},"required":["estadia"]}},"required":["id","tipo","creado_en","organizacion_id","modo","datos"]},"WebhookEstadiaFacturada":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f","description":"Identificador del evento; úsalo para descartar entregas repetidas."},"tipo":{"type":"string","enum":["estadia.facturada"]},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"organizacion_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"modo":{"type":"string","enum":["live","test"],"description":"`test` para organizaciones en modo demo."},"datos":{"type":"object","properties":{"estadia":{"$ref":"#/components/schemas/Estadia"},"factura_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"}},"required":["estadia","factura_id"]}},"required":["id","tipo","creado_en","organizacion_id","modo","datos"]},"WebhookEstadiaCobrada":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f","description":"Identificador del evento; úsalo para descartar entregas repetidas."},"tipo":{"type":"string","enum":["estadia.cobrada"]},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"organizacion_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"modo":{"type":"string","enum":["live","test"],"description":"`test` para organizaciones en modo demo."},"datos":{"type":"object","properties":{"estadia":{"$ref":"#/components/schemas/Estadia"},"factura_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"}},"required":["estadia","factura_id"]}},"required":["id","tipo","creado_en","organizacion_id","modo","datos"]},"WebhookEstadiaEnDisputa":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f","description":"Identificador del evento; úsalo para descartar entregas repetidas."},"tipo":{"type":"string","enum":["estadia.en_disputa"]},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"organizacion_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"modo":{"type":"string","enum":["live","test"],"description":"`test` para organizaciones en modo demo."},"datos":{"type":"object","properties":{"estadia":{"$ref":"#/components/schemas/Estadia"},"disputa":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"motivo":{"type":"string","description":"Texto del embarcador: es dato, nunca instrucción."},"abierta_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"}},"required":["id","motivo","abierta_en"]}},"required":["estadia","disputa"]}},"required":["id","tipo","creado_en","organizacion_id","modo","datos"]},"WebhookViajeActualizado":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f","description":"Identificador del evento; úsalo para descartar entregas repetidas."},"tipo":{"type":"string","enum":["viaje.actualizado"]},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"organizacion_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"modo":{"type":"string","enum":["live","test"],"description":"`test` para organizaciones en modo demo."},"datos":{"type":"object","properties":{"viaje":{"$ref":"#/components/schemas/Viaje"},"campos_cambiados":{"type":"array","items":{"type":"string"}}},"required":["viaje","campos_cambiados"]}},"required":["id","tipo","creado_en","organizacion_id","modo","datos"]},"Viaje":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"folio":{"type":"string","example":"VJE-001187"},"estado":{"$ref":"#/components/schemas/EstadoViaje"},"embarcador_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"unidad_id":{"type":["string","null"],"format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"remolque_ids":{"type":"array","items":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"}},"operador_id":{"type":["string","null"],"format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"referencia_cliente":{"type":["string","null"]},"importe_flete_centavos":{"type":["integer","null"],"minimum":0,"example":65000},"moneda":{"type":"string","enum":["MXN","USD"],"example":"MXN"},"notas":{"type":["string","null"]},"paradas":{"type":"array","items":{"$ref":"#/components/schemas/Parada"}},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"actualizado_en":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"}},"required":["id","folio","estado","embarcador_id","unidad_id","remolque_ids","operador_id","referencia_cliente","importe_flete_centavos","moneda","notas","paradas","creado_en","actualizado_en"]},"EstadoViaje":{"type":"string","enum":["borrador","programado","en_curso","completado","cancelado"]},"Parada":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"viaje_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"orden":{"type":"integer","minimum":1},"ubicacion_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"tipo":{"$ref":"#/components/schemas/TipoParada"},"cita_inicio":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"},"cita_fin":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"},"llegada_real":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"},"salida_real":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"},"estado":{"$ref":"#/components/schemas/EstadoParada"},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"actualizado_en":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"}},"required":["id","viaje_id","orden","ubicacion_id","tipo","cita_inicio","cita_fin","llegada_real","salida_real","estado","creado_en","actualizado_en"]},"TipoParada":{"type":"string","enum":["carga","descarga"]},"EstadoParada":{"type":"string","enum":["pendiente","en_sitio","completada","cancelada"]},"WebhookFacturaTimbrada":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f","description":"Identificador del evento; úsalo para descartar entregas repetidas."},"tipo":{"type":"string","enum":["factura.timbrada"]},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"organizacion_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"modo":{"type":"string","enum":["live","test"],"description":"`test` para organizaciones en modo demo."},"datos":{"type":"object","properties":{"factura":{"$ref":"#/components/schemas/Factura"}},"required":["factura"]}},"required":["id","tipo","creado_en","organizacion_id","modo","datos"]},"Factura":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"tipo":{"type":"string","enum":["I","E","P","T"]},"serie":{"type":["string","null"]},"folio":{"type":["string","null"]},"uuid_sat":{"type":["string","null"],"format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"estado":{"$ref":"#/components/schemas/EstadoFactura"},"embarcador_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"metodo_pago":{"type":"string","enum":["PUE","PPD"]},"forma_pago":{"type":"string","example":"99"},"uso_cfdi":{"type":"string"},"subtotal_centavos":{"type":"integer","minimum":0,"example":65000},"iva_trasladado_centavos":{"type":"integer","minimum":0,"example":65000},"iva_retenido_centavos":{"type":"integer","minimum":0,"example":65000},"total_centavos":{"type":"integer","minimum":0,"example":65000},"saldo_centavos":{"type":"integer","example":65000},"moneda":{"type":"string","enum":["MXN","USD"],"example":"MXN"},"fecha_emision":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"},"fecha_vencimiento":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"},"estadia_ids":{"type":"array","items":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"}},"relacionada_con":{"type":["string","null"],"format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"actualizado_en":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"}},"required":["id","tipo","serie","folio","uuid_sat","estado","embarcador_id","metodo_pago","forma_pago","uso_cfdi","subtotal_centavos","iva_trasladado_centavos","iva_retenido_centavos","total_centavos","saldo_centavos","moneda","fecha_emision","fecha_vencimiento","estadia_ids","relacionada_con","creado_en","actualizado_en"]},"EstadoFactura":{"type":"string","enum":["borrador","timbrando","timbrada","error","cancelando","cancelada"]},"WebhookFacturaPagada":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f","description":"Identificador del evento; úsalo para descartar entregas repetidas."},"tipo":{"type":"string","enum":["factura.pagada"]},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"organizacion_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"modo":{"type":"string","enum":["live","test"],"description":"`test` para organizaciones en modo demo."},"datos":{"type":"object","properties":{"factura":{"$ref":"#/components/schemas/Factura"},"pago":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"fecha":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"monto_centavos":{"type":"integer","minimum":0,"example":65000},"moneda":{"type":"string","enum":["MXN","USD"],"example":"MXN"}},"required":["id","fecha","monto_centavos","moneda"]}},"required":["factura","pago"]}},"required":["id","tipo","creado_en","organizacion_id","modo","datos"]},"PaginaViajes":{"type":"object","properties":{"datos":{"type":"array","items":{"$ref":"#/components/schemas/Viaje"}},"siguiente_cursor":{"type":["string","null"]}},"required":["datos","siguiente_cursor"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"codigo":{"$ref":"#/components/schemas/CodigoError"},"mensaje":{"type":"string","minLength":1,"description":"Qué pasó y cómo se arregla, en español de México."},"campo":{"type":"string","description":"Ruta del campo que falló, separada por puntos (por ejemplo `eventos.3.datos.monto_centavos`)."},"id_peticion":{"type":"string","description":"Identificador de la petición para soporte."}},"required":["codigo","mensaje"]}},"required":["error"]},"CodigoError":{"type":"string","enum":["NO_AUTENTICADO","TOKEN_VENCIDO","DISPOSITIVO_REVOCADO","CODIGO_INVALIDO","PERMISO_DENEGADO","NO_ENCONTRADO","VALIDACION","IDEMPOTENCIA_REQUERIDA","IDEMPOTENCIA_CONFLICTO","ESTADO_NO_PERMITE","OPERADOR_FUERA_DE_SERVICIO","UNIDAD_EN_MOVIMIENTO","ARCHIVO_INCOMPLETO","ARCHIVO_NO_COINCIDE","ARCHIVO_DEMASIADO_GRANDE","ARCHIVO_TIPO_NO_PERMITIDO","LOTE_DEMASIADO_GRANDE","LIMITE_PETICIONES","VERSION_NO_SOPORTADA","ERROR_INTERNO","SERVICIO_NO_DISPONIBLE"]},"CrearViajeEntrada":{"type":"object","properties":{"embarcador_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"estado":{"type":"string","enum":["borrador","programado"],"default":"borrador"},"unidad_id":{"type":["string","null"],"format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"remolque_ids":{"type":"array","items":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"maxItems":3,"default":[]},"operador_id":{"type":["string","null"],"format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"referencia_cliente":{"type":["string","null"],"maxLength":120},"importe_flete_centavos":{"type":["integer","null"],"minimum":0,"example":65000},"moneda":{"type":"string","enum":["MXN","USD"],"default":"MXN","example":"MXN"},"notas":{"type":["string","null"],"maxLength":2000},"paradas":{"type":"array","items":{"$ref":"#/components/schemas/ParadaEntrada"},"minItems":1,"maxItems":50}},"required":["embarcador_id","paradas"]},"ParadaEntrada":{"type":"object","properties":{"ubicacion_id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"tipo":{"$ref":"#/components/schemas/TipoParada"},"cita_inicio":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"},"cita_fin":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"}},"required":["ubicacion_id","tipo"],"description":"El orden de las paradas es el del arreglo."},"ActualizarViajeEntrada":{"type":"object","properties":{"estado":{"type":"string","enum":["borrador","programado","en_curso","completado"]},"unidad_id":{"type":["string","null"],"format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"remolque_ids":{"type":"array","items":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"maxItems":3},"operador_id":{"type":["string","null"],"format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"referencia_cliente":{"type":["string","null"],"maxLength":120},"importe_flete_centavos":{"type":["integer","null"],"minimum":0,"example":65000},"moneda":{"type":"string","enum":["MXN","USD"],"example":"MXN"},"notas":{"type":["string","null"],"maxLength":2000},"paradas":{"type":"array","items":{"$ref":"#/components/schemas/ParadaEntrada"},"minItems":1,"maxItems":50,"description":"Reemplaza las paradas; solo en borrador o programado."}},"description":"Solo los campos enviados cambian. Para cancelar, usa DELETE."},"PaginaParadas":{"type":"object","properties":{"datos":{"type":"array","items":{"$ref":"#/components/schemas/Parada"}},"siguiente_cursor":{"type":["string","null"]}},"required":["datos","siguiente_cursor"]},"PaginaUnidades":{"type":"object","properties":{"datos":{"type":"array","items":{"$ref":"#/components/schemas/Unidad"}},"siguiente_cursor":{"type":["string","null"]}},"required":["datos","siguiente_cursor"]},"Unidad":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"numero_economico":{"type":"string","example":"214"},"placas":{"type":["string","null"]},"tipo":{"type":"string","enum":["tracto","rigido","camioneta"]},"marca":{"type":["string","null"]},"modelo":{"type":["string","null"]},"anio":{"type":["integer","null"],"minimum":1950,"maximum":2100},"vin":{"type":["string","null"]},"activa":{"type":"boolean"},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"actualizado_en":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"}},"required":["id","numero_economico","placas","tipo","marca","modelo","anio","vin","activa","creado_en","actualizado_en"]},"PaginaOperadores":{"type":"object","properties":{"datos":{"type":"array","items":{"$ref":"#/components/schemas/Operador"}},"siguiente_cursor":{"type":["string","null"]}},"required":["datos","siguiente_cursor"]},"Operador":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"nombre":{"type":"string"},"activo":{"type":"boolean"},"tiene_app":{"type":"boolean","description":"Tiene al menos un dispositivo vinculado."},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"actualizado_en":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"}},"required":["id","nombre","activo","tiene_app","creado_en","actualizado_en"]},"PaginaEmbarcadores":{"type":"object","properties":{"datos":{"type":"array","items":{"$ref":"#/components/schemas/Embarcador"}},"siguiente_cursor":{"type":["string","null"]}},"required":["datos","siguiente_cursor"]},"Embarcador":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"razon_social":{"type":"string"},"rfc":{"type":"string","description":"RFC fiscal del embarcador (dato fiscal de la empresa).","example":"ABC010203XY1"},"regimen_fiscal":{"type":"string","example":"601"},"codigo_postal_fiscal":{"type":"string","pattern":"^\\d{5}$"},"uso_cfdi":{"type":"string","example":"G03"},"correo_facturacion":{"type":["string","null"],"format":"email"},"dias_credito":{"type":"integer","minimum":0},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"actualizado_en":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"}},"required":["id","razon_social","rfc","regimen_fiscal","codigo_postal_fiscal","uso_cfdi","correo_facturacion","dias_credito","creado_en","actualizado_en"]},"PaginaUbicaciones":{"type":"object","properties":{"datos":{"type":"array","items":{"$ref":"#/components/schemas/Ubicacion"}},"siguiente_cursor":{"type":["string","null"]}},"required":["datos","siguiente_cursor"]},"Ubicacion":{"type":"object","properties":{"id":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"embarcador_id":{"type":["string","null"],"format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"nombre":{"type":"string"},"direccion":{"type":"string"},"codigo_postal":{"type":["string","null"]},"estado":{"type":["string","null"],"description":"Entidad federativa."},"municipio":{"type":["string","null"]},"zona_horaria":{"type":"string","example":"America/Mexico_City"},"punto":{"$ref":"#/components/schemas/Punto"},"geocerca":{"$ref":"#/components/schemas/PoligonoGeoJson"},"creado_en":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z"},"actualizado_en":{"type":["string","null"],"format":"date-time","example":"2026-10-17T20:32:05Z"}},"required":["id","embarcador_id","nombre","direccion","codigo_postal","estado","municipio","zona_horaria","punto","geocerca","creado_en","actualizado_en"]},"Punto":{"type":"object","properties":{"lat":{"type":"number","minimum":-90,"maximum":90},"lon":{"type":"number","minimum":-180,"maximum":180}},"required":["lat","lon"],"example":{"lat":19.65,"lon":-99.17}},"PoligonoGeoJson":{"type":"object","properties":{"type":{"type":"string","enum":["Polygon"]},"coordinates":{"type":"array","items":{"type":"array","items":{"type":"array","prefixItems":[{"type":"number","minimum":-180,"maximum":180},{"type":"number","minimum":-90,"maximum":90}]},"minItems":4},"minItems":1}},"required":["type","coordinates"]},"PaginaEstadias":{"type":"object","properties":{"datos":{"type":"array","items":{"$ref":"#/components/schemas/Estadia"}},"siguiente_cursor":{"type":["string","null"]}},"required":["datos","siguiente_cursor"]},"DescartarEstadiaEntrada":{"type":"object","properties":{"motivo":{"type":"string","minLength":3,"maxLength":500,"example":"El embarcador pagó la espera por fuera del sistema."}},"required":["motivo"]},"PaginaFacturas":{"type":"object","properties":{"datos":{"type":"array","items":{"$ref":"#/components/schemas/Factura"}},"siguiente_cursor":{"type":["string","null"]}},"required":["datos","siguiente_cursor"]},"PaginaEventos":{"type":"object","properties":{"datos":{"type":"array","items":{"$ref":"#/components/schemas/EventoWebhook"}},"siguiente_cursor":{"type":["string","null"]}},"required":["datos","siguiente_cursor"]},"EventoWebhook":{"oneOf":[{"$ref":"#/components/schemas/WebhookEstadiaCreada"},{"$ref":"#/components/schemas/WebhookEstadiaEnEspera"},{"$ref":"#/components/schemas/WebhookEstadiaPorFacturar"},{"$ref":"#/components/schemas/WebhookEstadiaFacturada"},{"$ref":"#/components/schemas/WebhookEstadiaCobrada"},{"$ref":"#/components/schemas/WebhookEstadiaEnDisputa"},{"$ref":"#/components/schemas/WebhookViajeActualizado"},{"$ref":"#/components/schemas/WebhookFacturaTimbrada"},{"$ref":"#/components/schemas/WebhookFacturaPagada"}],"discriminator":{"propertyName":"tipo","mapping":{"estadia.creada":"#/components/schemas/WebhookEstadiaCreada","estadia.en_espera":"#/components/schemas/WebhookEstadiaEnEspera","estadia.por_facturar":"#/components/schemas/WebhookEstadiaPorFacturar","estadia.facturada":"#/components/schemas/WebhookEstadiaFacturada","estadia.cobrada":"#/components/schemas/WebhookEstadiaCobrada","estadia.en_disputa":"#/components/schemas/WebhookEstadiaEnDisputa","viaje.actualizado":"#/components/schemas/WebhookViajeActualizado","factura.timbrada":"#/components/schemas/WebhookFacturaTimbrada","factura.pagada":"#/components/schemas/WebhookFacturaPagada"}}},"TipoEventoWebhook":{"type":"string","enum":["estadia.creada","estadia.en_espera","estadia.por_facturar","estadia.facturada","estadia.cobrada","estadia.en_disputa","viaje.actualizado","factura.timbrada","factura.pagada"]}},"parameters":{}},"paths":{"/viajes":{"get":{"operationId":"listarViajes","tags":["Viajes"],"summary":"Listar viajes","description":"Filtros por `estado`, `embarcador_id`, `unidad_id` y fecha de creación (`desde`, `hasta`).","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior."},"required":false,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Elementos por página (1 a 100)."},"required":false,"description":"Elementos por página (1 a 100).","name":"limite","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos desde esta fecha (UTC, inclusiva)."},"required":false,"description":"Incluye elementos desde esta fecha (UTC, inclusiva).","name":"desde","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos antes de esta fecha (UTC, exclusiva)."},"required":false,"description":"Incluye elementos antes de esta fecha (UTC, exclusiva).","name":"hasta","in":"query"},{"schema":{"$ref":"#/components/schemas/EstadoViaje"},"required":false,"name":"estado","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":false,"name":"embarcador_id","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":false,"name":"unidad_id","in":"query"}],"responses":{"200":{"description":"Página de viajes","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginaViajes"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"crearViaje","tags":["Viajes"],"summary":"Crear viaje con paradas","description":"Idempotente por `Idempotency-Key`: repetir con la misma clave y el mismo cuerpo devuelve el viaje original.","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","minLength":8,"maxLength":255,"description":"Clave única por operación. Reintentar con la misma clave y el mismo cuerpo devuelve la respuesta original.","example":"b7c1a6e2-viaje-1187"},"required":true,"description":"Clave única por operación. Reintentar con la misma clave y el mismo cuerpo devuelve la respuesta original.","name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrearViajeEntrada"}}}},"responses":{"201":{"description":"Viaje creado","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Viaje"}}}},"400":{"description":"Petición incompleta (IDEMPOTENCIA_REQUERIDA)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicto con el estado actual (IDEMPOTENCIA_CONFLICTO, ESTADO_NO_PERMITE, OPERADOR_FUERA_DE_SERVICIO, UNIDAD_EN_MOVIMIENTO, ARCHIVO_INCOMPLETO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/viajes/{id}":{"get":{"operationId":"obtenerViajes","tags":["Viajes"],"summary":"Obtener viajes por id","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Viajes","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Viaje"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No encontrado (NO_ENCONTRADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"operationId":"actualizarViaje","tags":["Viajes"],"summary":"Actualizar viaje","description":"Solo cambian los campos enviados. Las paradas se reemplazan solo en borrador o programado.","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":true,"name":"id","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActualizarViajeEntrada"}}}},"responses":{"200":{"description":"Viaje actualizado","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Viaje"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No encontrado (NO_ENCONTRADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicto con el estado actual (IDEMPOTENCIA_CONFLICTO, ESTADO_NO_PERMITE, OPERADOR_FUERA_DE_SERVICIO, UNIDAD_EN_MOVIMIENTO, ARCHIVO_INCOMPLETO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"cancelarViaje","tags":["Viajes"],"summary":"Cancelar viaje","description":"Pasa el viaje a `cancelado`; nunca borra evidencia ni estadías. Un viaje completado no se cancela (409 `ESTADO_NO_PERMITE`).","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Viaje cancelado","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Viaje"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No encontrado (NO_ENCONTRADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicto con el estado actual (IDEMPOTENCIA_CONFLICTO, ESTADO_NO_PERMITE, OPERADOR_FUERA_DE_SERVICIO, UNIDAD_EN_MOVIMIENTO, ARCHIVO_INCOMPLETO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/paradas":{"get":{"operationId":"listarParadas","tags":["Paradas"],"summary":"Listar paradas","description":"Filtros por `viaje_id`, `estado` y fecha de cita (`desde`, `hasta`).","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior."},"required":false,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Elementos por página (1 a 100)."},"required":false,"description":"Elementos por página (1 a 100).","name":"limite","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos desde esta fecha (UTC, inclusiva)."},"required":false,"description":"Incluye elementos desde esta fecha (UTC, inclusiva).","name":"desde","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos antes de esta fecha (UTC, exclusiva)."},"required":false,"description":"Incluye elementos antes de esta fecha (UTC, exclusiva).","name":"hasta","in":"query"},{"schema":{"$ref":"#/components/schemas/EstadoParada"},"required":false,"name":"estado","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":false,"name":"viaje_id","in":"query"}],"responses":{"200":{"description":"Página de paradas","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginaParadas"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/paradas/{id}":{"get":{"operationId":"obtenerParadas","tags":["Paradas"],"summary":"Obtener paradas por id","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Paradas","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Parada"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No encontrado (NO_ENCONTRADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/unidades":{"get":{"operationId":"listarUnidades","tags":["Unidades"],"summary":"Listar unidades","description":"Paginado por cursor; filtros por fecha (`desde`, `hasta`) y estado cuando aplica.","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior."},"required":false,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Elementos por página (1 a 100)."},"required":false,"description":"Elementos por página (1 a 100).","name":"limite","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos desde esta fecha (UTC, inclusiva)."},"required":false,"description":"Incluye elementos desde esta fecha (UTC, inclusiva).","name":"desde","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos antes de esta fecha (UTC, exclusiva)."},"required":false,"description":"Incluye elementos antes de esta fecha (UTC, exclusiva).","name":"hasta","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"activa","in":"query"},{"schema":{"type":"string","enum":["tracto","rigido","camioneta"]},"required":false,"name":"tipo","in":"query"}],"responses":{"200":{"description":"Página de unidades","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginaUnidades"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/unidades/{id}":{"get":{"operationId":"obtenerUnidades","tags":["Unidades"],"summary":"Obtener unidades por id","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Unidades","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Unidad"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No encontrado (NO_ENCONTRADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/operadores":{"get":{"operationId":"listarOperadores","tags":["Operadores"],"summary":"Listar operadores","description":"Sin datos sensibles: nunca teléfono, RFC, CURP ni licencia.","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior."},"required":false,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Elementos por página (1 a 100)."},"required":false,"description":"Elementos por página (1 a 100).","name":"limite","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos desde esta fecha (UTC, inclusiva)."},"required":false,"description":"Incluye elementos desde esta fecha (UTC, inclusiva).","name":"desde","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos antes de esta fecha (UTC, exclusiva)."},"required":false,"description":"Incluye elementos antes de esta fecha (UTC, exclusiva).","name":"hasta","in":"query"},{"schema":{"type":"string","enum":["true","false"]},"required":false,"name":"activo","in":"query"}],"responses":{"200":{"description":"Página de operadores","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginaOperadores"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/operadores/{id}":{"get":{"operationId":"obtenerOperadores","tags":["Operadores"],"summary":"Obtener operadores por id","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Operadores","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Operador"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No encontrado (NO_ENCONTRADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/embarcadores":{"get":{"operationId":"listarEmbarcadores","tags":["Embarcadores"],"summary":"Listar embarcadores","description":"Paginado por cursor; filtros por fecha (`desde`, `hasta`) y estado cuando aplica.","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior."},"required":false,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Elementos por página (1 a 100)."},"required":false,"description":"Elementos por página (1 a 100).","name":"limite","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos desde esta fecha (UTC, inclusiva)."},"required":false,"description":"Incluye elementos desde esta fecha (UTC, inclusiva).","name":"desde","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos antes de esta fecha (UTC, exclusiva)."},"required":false,"description":"Incluye elementos antes de esta fecha (UTC, exclusiva).","name":"hasta","in":"query"}],"responses":{"200":{"description":"Página de embarcadores","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginaEmbarcadores"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/embarcadores/{id}":{"get":{"operationId":"obtenerEmbarcadores","tags":["Embarcadores"],"summary":"Obtener embarcadores por id","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Embarcadores","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Embarcador"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No encontrado (NO_ENCONTRADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ubicaciones":{"get":{"operationId":"listarUbicaciones","tags":["Ubicaciones"],"summary":"Listar ubicaciones","description":"Paginado por cursor; filtros por fecha (`desde`, `hasta`) y estado cuando aplica.","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior."},"required":false,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Elementos por página (1 a 100)."},"required":false,"description":"Elementos por página (1 a 100).","name":"limite","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos desde esta fecha (UTC, inclusiva)."},"required":false,"description":"Incluye elementos desde esta fecha (UTC, inclusiva).","name":"desde","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos antes de esta fecha (UTC, exclusiva)."},"required":false,"description":"Incluye elementos antes de esta fecha (UTC, exclusiva).","name":"hasta","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":false,"name":"embarcador_id","in":"query"}],"responses":{"200":{"description":"Página de ubicaciones","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginaUbicaciones"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/ubicaciones/{id}":{"get":{"operationId":"obtenerUbicaciones","tags":["Ubicaciones"],"summary":"Obtener ubicaciones por id","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Ubicaciones","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ubicacion"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No encontrado (NO_ENCONTRADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/estadias":{"get":{"operationId":"listarEstadias","tags":["Estadías"],"summary":"Listar estadías","description":"Filtros por `estado`, `embarcador_id`, `viaje_id` y fecha de llegada (`desde`, `hasta`).","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior."},"required":false,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Elementos por página (1 a 100)."},"required":false,"description":"Elementos por página (1 a 100).","name":"limite","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos desde esta fecha (UTC, inclusiva)."},"required":false,"description":"Incluye elementos desde esta fecha (UTC, inclusiva).","name":"desde","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos antes de esta fecha (UTC, exclusiva)."},"required":false,"description":"Incluye elementos antes de esta fecha (UTC, exclusiva).","name":"hasta","in":"query"},{"schema":{"$ref":"#/components/schemas/EstadoEstadia"},"required":false,"description":"Tiempo libre, En espera, Por facturar, Facturada, Cobrada, En disputa o Descartada (BRAND.md §3.6).","name":"estado","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":false,"name":"embarcador_id","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":false,"name":"viaje_id","in":"query"}],"responses":{"200":{"description":"Página de estadías","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginaEstadias"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/estadias/{id}":{"get":{"operationId":"obtenerEstadias","tags":["Estadías"],"summary":"Obtener estadías por id","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Estadías","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Estadia"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No encontrado (NO_ENCONTRADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/estadias/{id}/descartar":{"post":{"operationId":"descartarEstadia","tags":["Estadías"],"summary":"Descartar estadía con motivo","description":"Pasa la estadía a Descartada (estado final, sin cargo). Solo desde Tiempo libre, En espera o Por facturar; en otro estado responde 409 `ESTADO_NO_PERMITE`.","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","minLength":8,"maxLength":255,"description":"Clave única por operación. Reintentar con la misma clave y el mismo cuerpo devuelve la respuesta original.","example":"b7c1a6e2-viaje-1187"},"required":true,"description":"Clave única por operación. Reintentar con la misma clave y el mismo cuerpo devuelve la respuesta original.","name":"idempotency-key","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DescartarEstadiaEntrada"}}}},"responses":{"200":{"description":"Estadía descartada","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Estadia"}}}},"400":{"description":"Petición incompleta (IDEMPOTENCIA_REQUERIDA)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No encontrado (NO_ENCONTRADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflicto con el estado actual (IDEMPOTENCIA_CONFLICTO, ESTADO_NO_PERMITE, OPERADOR_FUERA_DE_SERVICIO, UNIDAD_EN_MOVIMIENTO, ARCHIVO_INCOMPLETO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/facturas":{"get":{"operationId":"listarFacturas","tags":["Facturas"],"summary":"Listar facturas","description":"Filtros por `estado`, `embarcador_id` y fecha de emisión (`desde`, `hasta`).","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior."},"required":false,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Elementos por página (1 a 100)."},"required":false,"description":"Elementos por página (1 a 100).","name":"limite","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos desde esta fecha (UTC, inclusiva)."},"required":false,"description":"Incluye elementos desde esta fecha (UTC, inclusiva).","name":"desde","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos antes de esta fecha (UTC, exclusiva)."},"required":false,"description":"Incluye elementos antes de esta fecha (UTC, exclusiva).","name":"hasta","in":"query"},{"schema":{"$ref":"#/components/schemas/EstadoFactura"},"required":false,"name":"estado","in":"query"},{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":false,"name":"embarcador_id","in":"query"}],"responses":{"200":{"description":"Página de facturas","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginaFacturas"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/facturas/{id}":{"get":{"operationId":"obtenerFacturas","tags":["Facturas"],"summary":"Obtener facturas por id","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Facturas","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Factura"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No encontrado (NO_ENCONTRADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/eventos":{"get":{"operationId":"listarEventos","tags":["Eventos"],"summary":"Listar eventos","description":"Los mismos eventos que se entregan por webhook (§14.2), para consultarlos o reconciliar entregas perdidas.","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","minLength":1,"maxLength":512,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior."},"required":false,"description":"Cursor opaco devuelto en `siguiente_cursor` de la página anterior.","name":"cursor","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"description":"Elementos por página (1 a 100)."},"required":false,"description":"Elementos por página (1 a 100).","name":"limite","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos desde esta fecha (UTC, inclusiva)."},"required":false,"description":"Incluye elementos desde esta fecha (UTC, inclusiva).","name":"desde","in":"query"},{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Incluye elementos antes de esta fecha (UTC, exclusiva)."},"required":false,"description":"Incluye elementos antes de esta fecha (UTC, exclusiva).","name":"hasta","in":"query"},{"schema":{"$ref":"#/components/schemas/TipoEventoWebhook"},"required":false,"name":"tipo","in":"query"}],"responses":{"200":{"description":"Página de eventos","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginaEventos"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/eventos/{id}":{"get":{"operationId":"obtenerEventos","tags":["Eventos"],"summary":"Obtener eventos por id","security":[{"llaveApi":[]}],"parameters":[{"schema":{"type":"string","format":"uuid","example":"0192f1c2-7a3b-7c4d-8e5f-0a1b2c3d4e5f"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"Eventos","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventoWebhook"}}}},"401":{"description":"Sin autenticación válida (NO_AUTENTICADO, TOKEN_VENCIDO, DISPOSITIVO_REVOCADO, CODIGO_INVALIDO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Sin permiso (PERMISO_DENEGADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No encontrado (NO_ENCONTRADO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Datos inválidos (VALIDACION, ARCHIVO_NO_COINCIDE)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Límite de peticiones (LIMITE_PETICIONES)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."},"Retry-After":{"schema":{"type":"string","description":"Segundos que hay que esperar antes de reintentar.","example":"60"},"required":true,"description":"Segundos que hay que esperar antes de reintentar."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Error interno (ERROR_INTERNO)","headers":{"X-Server-Time":{"schema":{"type":"string","format":"date-time","example":"2026-10-17T20:32:05Z","description":"Hora del servidor en UTC al responder."},"required":true,"description":"Hora del servidor en UTC al responder."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"estadia.creada":{"post":{"summary":"Evento estadia.creada","description":"Firmado con `Telvant-Signature: t=<unix>,v1=<hex HMAC-SHA256 de \"t.cuerpo\">`. Responde 2xx en menos de 10 s; se reintenta con espera creciente durante 24 h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEstadiaCreada"}}}},"responses":{"200":{"description":"Entrega recibida"}}}},"estadia.en_espera":{"post":{"summary":"Evento estadia.en_espera","description":"Firmado con `Telvant-Signature: t=<unix>,v1=<hex HMAC-SHA256 de \"t.cuerpo\">`. Responde 2xx en menos de 10 s; se reintenta con espera creciente durante 24 h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEstadiaEnEspera"}}}},"responses":{"200":{"description":"Entrega recibida"}}}},"estadia.por_facturar":{"post":{"summary":"Evento estadia.por_facturar","description":"Firmado con `Telvant-Signature: t=<unix>,v1=<hex HMAC-SHA256 de \"t.cuerpo\">`. Responde 2xx en menos de 10 s; se reintenta con espera creciente durante 24 h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEstadiaPorFacturar"}}}},"responses":{"200":{"description":"Entrega recibida"}}}},"estadia.facturada":{"post":{"summary":"Evento estadia.facturada","description":"Firmado con `Telvant-Signature: t=<unix>,v1=<hex HMAC-SHA256 de \"t.cuerpo\">`. Responde 2xx en menos de 10 s; se reintenta con espera creciente durante 24 h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEstadiaFacturada"}}}},"responses":{"200":{"description":"Entrega recibida"}}}},"estadia.cobrada":{"post":{"summary":"Evento estadia.cobrada","description":"Firmado con `Telvant-Signature: t=<unix>,v1=<hex HMAC-SHA256 de \"t.cuerpo\">`. Responde 2xx en menos de 10 s; se reintenta con espera creciente durante 24 h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEstadiaCobrada"}}}},"responses":{"200":{"description":"Entrega recibida"}}}},"estadia.en_disputa":{"post":{"summary":"Evento estadia.en_disputa","description":"Firmado con `Telvant-Signature: t=<unix>,v1=<hex HMAC-SHA256 de \"t.cuerpo\">`. Responde 2xx en menos de 10 s; se reintenta con espera creciente durante 24 h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEstadiaEnDisputa"}}}},"responses":{"200":{"description":"Entrega recibida"}}}},"viaje.actualizado":{"post":{"summary":"Evento viaje.actualizado","description":"Firmado con `Telvant-Signature: t=<unix>,v1=<hex HMAC-SHA256 de \"t.cuerpo\">`. Responde 2xx en menos de 10 s; se reintenta con espera creciente durante 24 h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookViajeActualizado"}}}},"responses":{"200":{"description":"Entrega recibida"}}}},"factura.timbrada":{"post":{"summary":"Evento factura.timbrada","description":"Firmado con `Telvant-Signature: t=<unix>,v1=<hex HMAC-SHA256 de \"t.cuerpo\">`. Responde 2xx en menos de 10 s; se reintenta con espera creciente durante 24 h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookFacturaTimbrada"}}}},"responses":{"200":{"description":"Entrega recibida"}}}},"factura.pagada":{"post":{"summary":"Evento factura.pagada","description":"Firmado con `Telvant-Signature: t=<unix>,v1=<hex HMAC-SHA256 de \"t.cuerpo\">`. Responde 2xx en menos de 10 s; se reintenta con espera creciente durante 24 h.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookFacturaPagada"}}}},"responses":{"200":{"description":"Entrega recibida"}}}}}}