 {
    "openapi": "3.0.3",
    "info": {
        "title": "FastTrack TMS API",
        "description": "Esta documentación describe los endpoints disponibles en la API FastTrack TMS (Transport Management System) para la gestión integral de guías, cotizaciones, seguimiento, impresión de etiquetas y webhooks.\n\n### Convención de Parámetros\n- **🔴 [REQUERIDO]:** Campos obligatorios que deben enviarse en la solicitud.\n- **⚪ [OPCIONAL]:** Campos que pueden omitirse o enviarse vacíos según corresponda.\n\n### Autenticación\nPara acceder a los endpoints de TMS, debe incluirse el token generado por el sistema en el encabezado `Authorization: Bearer {access_token}`. El sistema inyectará automáticamente el token correspondiente de FastTrack.",
        "version": "2.0.0",
        "contact": {
            "name": "Soporte Proteus FastTrack",
            "email": "proteus@proteus.com.ar"
        }
    },
    "servers": [
        {
            "url": "https://fasttrack.proteus.com.ar/api/tms",
            "description": "Servidor Principal TMS (Default)"
        },
        {
            "url": "https://fasttrack.proteus.com.ar/api/{ambiente}/tms",
            "description": "Ambiente Específico TMS (ej: prod)",
            "variables": {
                "ambiente": {
                    "default": "prod",
                    "description": "Nombre del ambiente (ej: prod)"
                }
            }
        }
    ],
    "tags": [
        {
            "name": "Información Base",
            "description": "Operaciones del módulo de Información Base"
        },
        {
            "name": "Gestión de Guías",
            "description": "Operaciones del módulo de Gestión de Guías"
        },
        {
            "name": "Seguimiento y Estados",
            "description": "Operaciones del módulo de Seguimiento y Estados"
        },
        {
            "name": "Impresión de Etiquetas",
            "description": "Operaciones del módulo de Impresión de Etiquetas"
        },
        {
            "name": "Integraciones y Webhooks",
            "description": "Operaciones del módulo de Integraciones y Webhooks"
        }
    ],
    "paths": {
        "/v1/servicios": {
            "post": {
                "tags": [
                    "Información Base"
                ],
                "summary": "Consulta el catálogo de servicios de entrega habilitados y disponibles para la cuenta según la sucursal de origen y el código postal de destino.",
                "description": "Consulta el catálogo de servicios de entrega habilitados y disponibles para la cuenta según la sucursal de origen y el código postal de destino.",
                "operationId": "v1_servicios_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "id": {
                                                "type": "integer",
                                                "example": 16
                                            },
                                            "cod_serv": {
                                                "type": "string",
                                                "example": "007"
                                            },
                                            "descripcion": {
                                                "type": "string",
                                                "example": "00HS"
                                            }
                                        }
                                    }
                                },
                                "example": [
                                    {
                                        "id": 16,
                                        "cod_serv": "007",
                                        "descripcion": "00HS"
                                    },
                                    {
                                        "id": 9,
                                        "cod_serv": "003",
                                        "descripcion": "72HS"
                                    },
                                    {
                                        "id": 11,
                                        "cod_serv": "004",
                                        "descripcion": "STD"
                                    }
                                ]
                            }
                        }
                    },
                    "400": {
                        "description": "Parámetro inválido",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al consultar servicios"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al consultar servicios"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "No autorizado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al consultar servicios"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al consultar servicios"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Usuario no encontrado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al consultar servicios"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al consultar servicios"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Cuerpo de la solicitud JSON",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "ConsultaServiciosRequest",
                                "type": "object",
                                "properties": {
                                    "sucursal": {
                                        "type": "string",
                                        "example": "9001",
                                        "description": "🔴 [REQUERIDO] Código de sucursal del cliente"
                                    },
                                    "servicio": {
                                        "type": "string",
                                        "example": "",
                                        "description": "🔴 [REQUERIDO] Código específico o vacío para listar todos"
                                    },
                                    "cp_entrega": {
                                        "type": "string",
                                        "example": "1884",
                                        "description": "⚪ [OPCIONAL] Código postal del comprador"
                                    },
                                    "tiempo": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Tiempo de entrega a filtrar"
                                    },
                                    "destino": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Destino a filtrar"
                                    }
                                },
                                "required": [
                                    "sucursal",
                                    "servicio"
                                ]
                            },
                            "example": {
                                "sucursal": "9001",
                                "servicio": "",
                                "cp_entrega": "1884",
                                "tiempo": "",
                                "destino": ""
                            }
                        }
                    }
                }
            }
        },
        "/v1/precios": {
            "post": {
                "tags": [
                    "Información Base"
                ],
                "summary": "Calcula el precio de un envío en base a sucursal, CP de entrega, servicio y dimensiones de bultos.",
                "description": "Calcula el precio de un envío en base a sucursal, CP de entrega, servicio y dimensiones de bultos.",
                "operationId": "v1_precios_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "total": {
                                            "type": "integer",
                                            "example": 200
                                        }
                                    }
                                },
                                "example": {
                                    "total": 200
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Parámetro inválido",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al calcular precio"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al calcular precio"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "No autorizado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al calcular precio"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al calcular precio"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al calcular precio"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al calcular precio"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "**Campos Requeridos:**\n- `sucursal` (string): 🔴 [REQUERIDO] Código de sucursal del cliente\n- `servicio` (string): 🔴 [REQUERIDO] Código del servicio a cotizar\n- `productos` (array): 🔴 [REQUERIDO] Listado de bultos a cotizar (`bultos`, `peso`, `descripcion`)\n\n**Campos Opcionales:**\n- `cp_entrega` (string): ⚪ [OPCIONAL] Código postal del destinatario\n- `tiempo` (string): ⚪ [OPCIONAL] Tiempo estimado asociado al servicio\n- `destino` (string): ⚪ [OPCIONAL] Destino asociado al servicio",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "CotizacionPreciosRequest",
                                "type": "object",
                                "properties": {
                                    "sucursal": {
                                        "type": "string",
                                        "example": "9999",
                                        "description": "🔴 [REQUERIDO] Código de sucursal"
                                    },
                                    "servicio": {
                                        "type": "string",
                                        "example": "004",
                                        "description": "🔴 [REQUERIDO] Código del servicio a cotizar"
                                    },
                                    "cp_entrega": {
                                        "type": "string",
                                        "example": "1001",
                                        "description": "⚪ [OPCIONAL] CP destino"
                                    },
                                    "tiempo": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Tiempo estimado"
                                    },
                                    "destino": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Destino"
                                    },
                                    "productos": {
                                        "type": "array",
                                        "description": "🔴 [REQUERIDO] Listado de bultos a cotizar",
                                        "items": {
                                            "title": "ProductoItem",
                                            "type": "object",
                                            "properties": {
                                                "bultos": {
                                                    "type": "integer",
                                                    "example": 1,
                                                    "description": "🔴 [REQUERIDO] Cantidad de bultos"
                                                },
                                                "peso": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1.5,
                                                    "description": "🔴 [REQUERIDO] Peso en kg"
                                                },
                                                "descripcion": {
                                                    "type": "string",
                                                    "example": "prueba precios",
                                                    "description": "🔴 [REQUERIDO] Descripción de la carga"
                                                },
                                                "dimensiones": {
                                                    "type": "object",
                                                    "description": "⚪ [OPCIONAL] Dimensiones del bulto",
                                                    "properties": {
                                                        "alto": {
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 0.25,
                                                            "description": "⚪ [OPCIONAL] Alto"
                                                        },
                                                        "largo": {
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 0.25,
                                                            "description": "⚪ [OPCIONAL] Largo"
                                                        },
                                                        "profundidad": {
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 0.25,
                                                            "description": "⚪ [OPCIONAL] Profundidad"
                                                        }
                                                    }
                                                }
                                            },
                                            "required": [
                                                "bultos",
                                                "peso",
                                                "descripcion"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "sucursal",
                                    "servicio",
                                    "productos"
                                ]
                            },
                            "example": {
                                "sucursal": "9999",
                                "servicio": "004",
                                "cp_entrega": "1001",
                                "tiempo": "",
                                "destino": "",
                                "productos": [
                                    {
                                        "bultos": 1,
                                        "peso": 1.5,
                                        "descripcion": "prueba precios",
                                        "dimensiones": {
                                            "alto": 0.25,
                                            "largo": 0.25,
                                            "profundidad": 0.25
                                        }
                                    }
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v2/cotizador": {
            "post": {
                "tags": [
                    "Información Base"
                ],
                "summary": "Calcula la cotización de un envío (Cotizador V2) según servicio, CP de origen y destino, valor declarado y paquetes.",
                "description": "Calcula la cotización de un envío (Cotizador V2) según servicio, CP de origen y destino, valor declarado y paquetes.",
                "operationId": "v2_cotizador_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "total": {
                                            "type": "number",
                                            "format": "float",
                                            "example": 2500.5
                                        }
                                    }
                                },
                                "example": {
                                    "total": 2500.5
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Parámetro inválido",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al calcular cotización"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al calcular cotización"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "No autorizado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al calcular cotización"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al calcular cotización"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al calcular cotización"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al calcular cotización"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "**Campos Requeridos:**\n- `codigo_servicio` (string): 🔴 [REQUERIDO] Código del servicio a cotizar\n- `cp_origen` (string): 🔴 [REQUERIDO] Código postal de origen\n- `cp_destino` (string): 🔴 [REQUERIDO] Código postal de destino\n- `valor_declarado` (number): 🔴 [REQUERIDO] Valor declarado de la mercadería para el seguro\n- `productos` (array): 🔴 [REQUERIDO] Listado de bultos a cotizar (`bultos`, `peso`)\n\n**Campos Opcionales:**\n- `tiempo` (string): ⚪ [OPCIONAL] Tiempo estimado asociado al servicio\n- `destino` (string): ⚪ [OPCIONAL] Destino asociado al servicio\n- `is_urgente` (boolean): ⚪ [OPCIONAL] Indica si es envío urgente",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "CotizadorRequest",
                                "type": "object",
                                "properties": {
                                    "codigo_servicio": {
                                        "type": "string",
                                        "example": "004",
                                        "description": "🔴 [REQUERIDO] Código del servicio a cotizar"
                                    },
                                    "cp_origen": {
                                        "type": "string",
                                        "example": "1425",
                                        "description": "🔴 [REQUERIDO] Código postal de origen"
                                    },
                                    "cp_destino": {
                                        "type": "string",
                                        "example": "9000",
                                        "description": "🔴 [REQUERIDO] Código postal de destino"
                                    },
                                    "tiempo": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Tiempo estimado"
                                    },
                                    "destino": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Destino"
                                    },
                                    "is_urgente": {
                                        "type": "boolean",
                                        "example": false,
                                        "description": "⚪ [OPCIONAL] Envío urgente"
                                    },
                                    "valor_declarado": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 130000,
                                        "description": "🔴 [REQUERIDO] Valor declarado para el seguro"
                                    },
                                    "productos": {
                                        "type": "array",
                                        "description": "🔴 [REQUERIDO] Listado de bultos a cotizar",
                                        "items": {
                                            "title": "ProductoCotizadorItem",
                                            "type": "object",
                                            "properties": {
                                                "bultos": {
                                                    "type": "integer",
                                                    "example": 1,
                                                    "description": "🔴 [REQUERIDO] Cantidad de bultos"
                                                },
                                                "peso": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 1,
                                                    "description": "🔴 [REQUERIDO] Peso en kg"
                                                },
                                                "descripcion": {
                                                    "type": "string",
                                                    "example": "",
                                                    "description": "⚪ [OPCIONAL] Descripción de la carga"
                                                },
                                                "dimensiones": {
                                                    "type": "object",
                                                    "description": "⚪ [OPCIONAL] Dimensiones del bulto",
                                                    "properties": {
                                                        "alto": {
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 10,
                                                            "description": "⚪ [OPCIONAL] Alto"
                                                        },
                                                        "largo": {
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 10,
                                                            "description": "⚪ [OPCIONAL] Largo"
                                                        },
                                                        "profundidad": {
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 10,
                                                            "description": "⚪ [OPCIONAL] Profundidad"
                                                        }
                                                    }
                                                }
                                            },
                                            "required": [
                                                "bultos",
                                                "peso"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "codigo_servicio",
                                    "cp_origen",
                                    "cp_destino",
                                    "valor_declarado",
                                    "productos"
                                ]
                            },
                            "example": {
                                "codigo_servicio": "004",
                                "cp_origen": "1425",
                                "cp_destino": "9000",
                                "tiempo": "",
                                "destino": "",
                                "is_urgente": false,
                                "valor_declarado": 130000,
                                "productos": [
                                    {
                                        "bultos": 1,
                                        "peso": 1,
                                        "descripcion": "",
                                        "dimensiones": {
                                            "alto": 10,
                                            "largo": 10,
                                            "profundidad": 10
                                        }
                                    }
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v1/solicitar-retiro": {
            "post": {
                "tags": [
                    "Información Base"
                ],
                "summary": "Registra la solicitud de recolección en una sucursal para envíos generados previamente.",
                "description": "Registra la solicitud de recolección en una sucursal para envíos generados previamente.",
                "operationId": "v1_solicitarRetiro_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "ok"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Retiro guardado Correctamente. Fecha de Retiro: 06/01/2026 POR LA TARDE Nro Retiro: 178632"
                                        }
                                    }
                                },
                                "example": {
                                    "status": "ok",
                                    "message": "Retiro guardado Correctamente. Fecha de Retiro: 06/01/2026 POR LA TARDE Nro Retiro: 178632"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Datos incompletos o inválidos",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al procesar solicitud de retiro"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al procesar solicitud de retiro"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al procesar solicitud de retiro"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al procesar solicitud de retiro"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "**Campos Requeridos:**\n- `sucursal` (string): 🔴 [REQUERIDO] Código de la sucursal del cliente\n- `fecha` (string): 🔴 [REQUERIDO] Fecha de retiro (DD/MM/YYYY)\n- `calle` (string): 🔴 [REQUERIDO] Calle de la sucursal\n- `altura` (string): 🔴 [REQUERIDO] Número de la calle\n- `localidad` (string): 🔴 [REQUERIDO] Localidad del retiro\n- `provincia` (string): 🔴 [REQUERIDO] Provincia del retiro\n- `cp` (integer): 🔴 [REQUERIDO] Código postal numérico\n- `contacto` (string): 🔴 [REQUERIDO] Persona por quien preguntar\n- `franja` (string): 🔴 [REQUERIDO] POR LA MAÑANA / TODO EL DIA / POR LA TARDE\n- `peso` (string): 🔴 [REQUERIDO] Peso aproximado\n- `bultos` (string): 🔴 [REQUERIDO] Bultos totales a retirar\n\n**Campos Opcionales:**\n- `piso` (string): ⚪ [OPCIONAL] Piso\n- `dpto` (string): ⚪ [OPCIONAL] Departamento\n- `telefono` (string): ⚪ [OPCIONAL] Teléfono de contacto\n- `mail` (string): ⚪ [OPCIONAL] Correo de contacto\n- `observaciones` (string): ⚪ [OPCIONAL] Aclaraciones sobre el retiro",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "SolicitudRetiroRequest",
                                "type": "object",
                                "properties": {
                                    "sucursal": {
                                        "type": "string",
                                        "example": "75",
                                        "description": "🔴 [REQUERIDO] Código de sucursal"
                                    },
                                    "fecha": {
                                        "type": "string",
                                        "example": "06/01/2026",
                                        "description": "🔴 [REQUERIDO] Fecha de retiro (DD/MM/YYYY)"
                                    },
                                    "calle": {
                                        "type": "string",
                                        "example": "Mariano Ferreyra",
                                        "description": "🔴 [REQUERIDO] Calle del retiro"
                                    },
                                    "altura": {
                                        "type": "string",
                                        "example": "302",
                                        "description": "🔴 [REQUERIDO] Altura de la calle"
                                    },
                                    "piso": {
                                        "type": "string",
                                        "example": "PB",
                                        "description": "⚪ [OPCIONAL] Piso"
                                    },
                                    "dpto": {
                                        "type": "string",
                                        "example": "-",
                                        "description": "⚪ [OPCIONAL] Departamento"
                                    },
                                    "localidad": {
                                        "type": "string",
                                        "example": "Avellaneda",
                                        "description": "🔴 [REQUERIDO] Localidad"
                                    },
                                    "provincia": {
                                        "type": "string",
                                        "example": "Buenos Aires",
                                        "description": "🔴 [REQUERIDO] Provincia"
                                    },
                                    "cp": {
                                        "type": "integer",
                                        "example": 1870,
                                        "description": "🔴 [REQUERIDO] Código postal numérico"
                                    },
                                    "contacto": {
                                        "type": "string",
                                        "example": "expediciones",
                                        "description": "🔴 [REQUERIDO] Persona de contacto"
                                    },
                                    "telefono": {
                                        "type": "string",
                                        "example": "08108883278",
                                        "description": "⚪ [OPCIONAL] Teléfono de contacto"
                                    },
                                    "mail": {
                                        "type": "string",
                                        "example": "expediciones@fasttrack.com.ar",
                                        "description": "⚪ [OPCIONAL] Correo de contacto"
                                    },
                                    "franja": {
                                        "type": "string",
                                        "example": "POR LA TARDE",
                                        "description": "🔴 [REQUERIDO] POR LA MAÑANA / TODO EL DIA / POR LA TARDE"
                                    },
                                    "peso": {
                                        "type": "string",
                                        "example": "10",
                                        "description": "🔴 [REQUERIDO] Peso total aproximado en kg"
                                    },
                                    "bultos": {
                                        "type": "string",
                                        "example": "9",
                                        "description": "🔴 [REQUERIDO] Total de bultos a retirar"
                                    },
                                    "observaciones": {
                                        "type": "string",
                                        "example": "Prueba solicitud retiro",
                                        "description": "⚪ [OPCIONAL] Aclaraciones sobre la carga"
                                    }
                                },
                                "required": [
                                    "sucursal",
                                    "fecha",
                                    "calle",
                                    "altura",
                                    "localidad",
                                    "provincia",
                                    "cp",
                                    "contacto",
                                    "franja",
                                    "peso",
                                    "bultos"
                                ]
                            },
                            "example": {
                                "sucursal": "75",
                                "fecha": "06/01/2026",
                                "calle": "Mariano Ferreyra",
                                "altura": "302",
                                "piso": "PB",
                                "dpto": "-",
                                "localidad": "Avellaneda",
                                "provincia": "Buenos Aires",
                                "cp": 1870,
                                "contacto": "expedicones",
                                "telefono": "08108883278",
                                "mail": "expediciones@fasttrack.com.ar",
                                "franja": "POR LA TARDE",
                                "peso": "10",
                                "bultos": "9",
                                "observaciones": "prueba API retiros"
                            }
                        }
                    }
                }
            }
        },
        "/v2/dummy-test": {
            "post": {
                "tags": [
                    "Información Base"
                ],
                "summary": "Verifica el estado y conectividad con la API externa de FastTrack.",
                "description": "Verifica el estado y conectividad con la API externa de FastTrack.",
                "operationId": "v2_dummy_test_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "API is working"
                                        }
                                    }
                                },
                                "example": {
                                    "success": true,
                                    "message": "API is working"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "No autorizado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error en la API"
                                        },
                                        "error_details": {
                                            "type": "string",
                                            "example": "..."
                                        }
                                    }
                                },
                                "example": {
                                    "success": false,
                                    "message": "Error en la API",
                                    "error_details": "..."
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "api_token no configurado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error en la API"
                                        },
                                        "error_details": {
                                            "type": "string",
                                            "example": "..."
                                        }
                                    }
                                },
                                "example": {
                                    "success": false,
                                    "message": "Error en la API",
                                    "error_details": "..."
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error en la API"
                                        },
                                        "error_details": {
                                            "type": "string",
                                            "example": "..."
                                        }
                                    }
                                },
                                "example": {
                                    "success": false,
                                    "message": "Error en la API",
                                    "error_details": "..."
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": false,
                    "description": "Cuerpo de prueba opcional.",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "DummyTestRequest",
                                "type": "object"
                            },
                            "example": {}
                        }
                    }
                }
            }
        },
        "/v2/localidades": {
            "post": {
                "tags": [
                    "Información Base"
                ],
                "summary": "Consulta la base de códigos postales (CP) y localidades.",
                "description": "Consulta la base de códigos postales (CP) y localidades.",
                "operationId": "v2_localidades_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "localidades": {
                                            "type": "object",
                                            "example": {}
                                        }
                                    }
                                },
                                "example": {
                                    "success": true,
                                    "localidades": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "No autorizado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error al consultar localidades"
                                        },
                                        "error_details": {
                                            "type": "string",
                                            "example": "..."
                                        }
                                    }
                                },
                                "example": {
                                    "success": false,
                                    "message": "Error al consultar localidades",
                                    "error_details": "..."
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "api_token no configurado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error al consultar localidades"
                                        },
                                        "error_details": {
                                            "type": "string",
                                            "example": "..."
                                        }
                                    }
                                },
                                "example": {
                                    "success": false,
                                    "message": "Error al consultar localidades",
                                    "error_details": "..."
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error al consultar localidades"
                                        },
                                        "error_details": {
                                            "type": "string",
                                            "example": "..."
                                        }
                                    }
                                },
                                "example": {
                                    "success": false,
                                    "message": "Error al consultar localidades",
                                    "error_details": "..."
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": false,
                    "description": "Cuerpo de la solicitud JSON",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "LocalidadesRequest",
                                "type": "object"
                            },
                            "example": {}
                        }
                    }
                }
            }
        },
        "/v2/provincias": {
            "post": {
                "tags": [
                    "Información Base"
                ],
                "summary": "Consulta la base de provincias.",
                "description": "Consulta la base de provincias.",
                "operationId": "v2_provincias_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "provincias": {
                                            "type": "object",
                                            "example": {}
                                        }
                                    }
                                },
                                "example": {
                                    "success": true,
                                    "provincias": []
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "No autorizado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error al consultar provincias"
                                        },
                                        "error_details": {
                                            "type": "string",
                                            "example": "..."
                                        }
                                    }
                                },
                                "example": {
                                    "success": false,
                                    "message": "Error al consultar provincias",
                                    "error_details": "..."
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "api_token no configurado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error al consultar provincias"
                                        },
                                        "error_details": {
                                            "type": "string",
                                            "example": "..."
                                        }
                                    }
                                },
                                "example": {
                                    "success": false,
                                    "message": "Error al consultar provincias",
                                    "error_details": "..."
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error al consultar provincias"
                                        },
                                        "error_details": {
                                            "type": "string",
                                            "example": "..."
                                        }
                                    }
                                },
                                "example": {
                                    "success": false,
                                    "message": "Error al consultar provincias",
                                    "error_details": "..."
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": false,
                    "description": "Cuerpo de la solicitud JSON",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "ProvinciasRequest",
                                "type": "object"
                            },
                            "example": {}
                        }
                    }
                }
            }
        },
        "/v2/guias": {
            "post": {
                "tags": [
                    "Gestión de Guías"
                ],
                "summary": "Genera una nueva guía de envío. Valida destino, comprador y composición de paquetes.",
                "description": "Genera una nueva guía de envío. Valida destino, comprador y composición de paquetes.",
                "operationId": "v2_guias_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "guia": {
                                            "type": "integer",
                                            "example": 101851884
                                        },
                                        "importe": {
                                            "type": "integer",
                                            "example": 500
                                        },
                                        "sub_zona_destino": {
                                            "type": "string",
                                            "example": "CABA"
                                        },
                                        "remito": {
                                            "type": "string",
                                            "example": "0019"
                                        },
                                        "zona": {
                                            "type": "string",
                                            "example": "ZONA A"
                                        }
                                    }
                                },
                                "example": {
                                    "guia": 101851884,
                                    "importe": 500,
                                    "sub_zona_destino": "CABA",
                                    "remito": "0019",
                                    "zona": "ZONA A"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Datos inválidos",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al crear la guía o parámetros inválidos"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al crear la guía o parámetros inválidos"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "No autorizado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al crear la guía o parámetros inválidos"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al crear la guía o parámetros inválidos"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "api_token no configurado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al crear la guía o parámetros inválidos"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al crear la guía o parámetros inválidos"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al crear la guía o parámetros inválidos"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al crear la guía o parámetros inválidos"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Cuerpo de la solicitud JSON",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "CrearGuiaRequest",
                                "type": "object",
                                "properties": {
                                    "codigo_sucursal": {
                                        "type": "string",
                                        "example": "9999",
                                        "description": "🔴 [REQUERIDO] Código de sucursal"
                                    },
                                    "codigo_servicio": {
                                        "type": "string",
                                        "example": "004",
                                        "description": "🔴 [REQUERIDO] Código de servicio"
                                    },
                                    "tiempo": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Tiempo estimado"
                                    },
                                    "destino": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Destino"
                                    },
                                    "fragil": {
                                        "type": "boolean",
                                        "example": false,
                                        "description": "🔴 [REQUERIDO] true / false"
                                    },
                                    "envio_segurizado": {
                                        "type": "boolean",
                                        "example": true,
                                        "description": "⚪ [OPCIONAL] Código de seguridad en entrega"
                                    },
                                    "palabra_clave": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Palabra clave para entrega"
                                    },
                                    "remito": {
                                        "type": "string",
                                        "example": "0011250819",
                                        "description": "⚪ [OPCIONAL] Número de remito"
                                    },
                                    "guia_agente": {
                                        "type": "string",
                                        "example": "222",
                                        "description": "⚪ [OPCIONAL] Segundo remito / guía externa"
                                    },
                                    "fob": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Valor FOB para aduana"
                                    },
                                    "internacional": {
                                        "type": "boolean",
                                        "example": false,
                                        "description": "🔴 [REQUERIDO] Si el origen es exterior"
                                    },
                                    "valor_declarado": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 0,
                                        "description": "🔴 [REQUERIDO] Valor declarado para el seguro"
                                    },
                                    "volumetrico_estimado": {
                                        "type": "number",
                                        "format": "float",
                                        "example": 16290.7,
                                        "description": "⚪ [OPCIONAL] Volumen estimado"
                                    },
                                    "isInversa": {
                                        "type": "boolean",
                                        "example": false,
                                        "description": "🔴 [REQUERIDO] false para entrega normal"
                                    },
                                    "observaciones": {
                                        "type": "string",
                                        "example": "prueba API V2",
                                        "description": "⚪ [OPCIONAL] Comentarios adicionales"
                                    },
                                    "codigo_ceco": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Centro de costo"
                                    },
                                    "contrareembolso": {
                                        "type": "integer",
                                        "example": 0,
                                        "description": "⚪ [OPCIONAL] Monto a cobrar en entrega"
                                    },
                                    "cobro_efectivo": {
                                        "type": "integer",
                                        "example": 0,
                                        "description": "⚪ [OPCIONAL] Importe efectivo"
                                    },
                                    "cobro_cheque": {
                                        "type": "integer",
                                        "example": 0,
                                        "description": "⚪ [OPCIONAL] Importe cheque"
                                    },
                                    "precinto": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Número de precinto"
                                    },
                                    "pago_en": {
                                        "type": "string",
                                        "example": "ORIGEN",
                                        "description": "🔴 [REQUERIDO] \"ORIGEN\" o \"DESTINO\""
                                    },
                                    "tipo_operacion": {
                                        "type": "string",
                                        "example": "ENTREGA PAQUETERIA",
                                        "description": "🔴 [REQUERIDO] ENTREGA, RETIRO, ENTREGA PAQUETERIA, etc."
                                    },
                                    "is_urgente": {
                                        "type": "boolean",
                                        "example": false,
                                        "description": "🔴 [REQUERIDO] Indica urgencia (true/false)"
                                    },
                                    "valida_stock": {
                                        "type": "boolean",
                                        "example": false,
                                        "description": "⚪ [OPCIONAL] No disponible por el momento"
                                    },
                                    "canal": {
                                        "type": "string",
                                        "example": "",
                                        "description": "⚪ [OPCIONAL] Canal de venta"
                                    },
                                    "comprador": {
                                        "title": "DatosComprador",
                                        "type": "object",
                                        "description": "🔴 [REQUERIDO] Datos del comprador y destino",
                                        "properties": {
                                            "empresa": {
                                                "type": "string",
                                                "example": "Fasttrack",
                                                "description": "🔴 [REQUERIDO] Razón social o \"Particular\""
                                            },
                                            "destinatario": {
                                                "type": "string",
                                                "example": "Cristian Escudero",
                                                "description": "🔴 [REQUERIDO] Nombre y apellido destinatario"
                                            },
                                            "horario": {
                                                "type": "string",
                                                "example": "",
                                                "description": "⚪ [OPCIONAL] Rango horario"
                                            },
                                            "calle": {
                                                "type": "string",
                                                "example": "Mariano Ferreyra",
                                                "description": "🔴 [REQUERIDO] Calle de destino"
                                            },
                                            "altura": {
                                                "type": "string",
                                                "example": "1302",
                                                "description": "🔴 [REQUERIDO] Altura / número"
                                            },
                                            "piso": {
                                                "type": "string",
                                                "example": "",
                                                "description": "⚪ [OPCIONAL] Piso"
                                            },
                                            "dpto": {
                                                "type": "string",
                                                "example": "",
                                                "description": "⚪ [OPCIONAL] Departamento"
                                            },
                                            "localidad": {
                                                "type": "string",
                                                "example": "Avellaneda",
                                                "description": "🔴 [REQUERIDO] Localidad"
                                            },
                                            "provincia": {
                                                "type": "string",
                                                "example": "BUENOS AIRES",
                                                "description": "🔴 [REQUERIDO] Provincia"
                                            },
                                            "info_adicional_1": {
                                                "type": "string",
                                                "example": "obs1",
                                                "description": "⚪ [OPCIONAL] Observación 1"
                                            },
                                            "info_adicional_2": {
                                                "type": "string",
                                                "example": "obs2",
                                                "description": "⚪ [OPCIONAL] Observación 2"
                                            },
                                            "info_adicional_3": {
                                                "type": "string",
                                                "example": "obs3",
                                                "description": "⚪ [OPCIONAL] Observación 3"
                                            },
                                            "info_adicional_4": {
                                                "type": "string",
                                                "example": "obs4",
                                                "description": "⚪ [OPCIONAL] Observación 4"
                                            },
                                            "info_adicional_5": {
                                                "type": "string",
                                                "example": "observacion vieja",
                                                "description": "⚪ [OPCIONAL] Observación 5"
                                            },
                                            "otra_info": {
                                                "type": "string",
                                                "example": "",
                                                "description": "⚪ [OPCIONAL] Observación general"
                                            },
                                            "cp": {
                                                "type": "string",
                                                "example": "1001",
                                                "description": "🔴 [REQUERIDO] Código postal destino"
                                            },
                                            "email": {
                                                "type": "string",
                                                "example": "",
                                                "description": "⚪ [OPCIONAL] Email destinatario"
                                            },
                                            "celular": {
                                                "type": "string",
                                                "example": "+5491111111111",
                                                "description": "⚪ [OPCIONAL] Teléfono celular"
                                            },
                                            "cuit": {
                                                "type": "string",
                                                "example": "",
                                                "description": "⚪ [OPCIONAL] CUIT/DNI"
                                            },
                                            "contenido": {
                                                "type": "string",
                                                "example": "",
                                                "description": "⚪ [OPCIONAL] Contenido"
                                            },
                                            "latitud": {
                                                "type": "string",
                                                "example": "",
                                                "description": "⚪ [OPCIONAL] Coordenadas latitud"
                                            },
                                            "longitud": {
                                                "type": "string",
                                                "example": "",
                                                "description": "⚪ [OPCIONAL] Coordenadas longitud"
                                            }
                                        },
                                        "required": [
                                            "empresa",
                                            "destinatario",
                                            "calle",
                                            "altura",
                                            "localidad",
                                            "provincia",
                                            "cp"
                                        ]
                                    },
                                    "productos": {
                                        "type": "array",
                                        "description": "🔴 [REQUERIDO] Array de paquetes a enviar",
                                        "items": {
                                            "title": "ProductoGuia",
                                            "type": "object",
                                            "properties": {
                                                "bultos": {
                                                    "type": "integer",
                                                    "example": 2,
                                                    "description": "🔴 [REQUERIDO] Cantidad de bultos"
                                                },
                                                "peso": {
                                                    "type": "integer",
                                                    "example": 2,
                                                    "description": "🔴 [REQUERIDO] Peso en kg"
                                                },
                                                "descripcion": {
                                                    "type": "string",
                                                    "example": "Caja de zapatos roja",
                                                    "description": "🔴 [REQUERIDO] Descripción del producto"
                                                },
                                                "dimensiones": {
                                                    "type": "object",
                                                    "description": "⚪ [OPCIONAL] Dimensiones del producto",
                                                    "properties": {
                                                        "alto": {
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 0.25,
                                                            "description": "⚪ [OPCIONAL] Alto"
                                                        },
                                                        "largo": {
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 0.25,
                                                            "description": "⚪ [OPCIONAL] Largo"
                                                        },
                                                        "profundidad": {
                                                            "type": "number",
                                                            "format": "float",
                                                            "example": 0.25,
                                                            "description": "⚪ [OPCIONAL] Profundidad"
                                                        }
                                                    }
                                                }
                                            },
                                            "required": [
                                                "bultos",
                                                "peso",
                                                "descripcion"
                                            ]
                                        }
                                    }
                                },
                                "required": [
                                    "codigo_sucursal",
                                    "codigo_servicio",
                                    "fragil",
                                    "internacional",
                                    "valor_declarado",
                                    "isInversa",
                                    "pago_en",
                                    "tipo_operacion",
                                    "is_urgente",
                                    "comprador",
                                    "productos"
                                ]
                            },
                            "example": {
                                "codigo_sucursal": "9999",
                                "codigo_servicio": "004",
                                "tiempo": "",
                                "destino": "",
                                "fragil": false,
                                "envio_segurizado": false,
                                "palabra_clave": "",
                                "remito": "0011250819",
                                "guia_agente": "222",
                                "fob": "",
                                "internacional": false,
                                "valor_declarado": 0,
                                "volumetrico_estimado": 16290.7,
                                "isInversa": false,
                                "observaciones": "prueba API V2",
                                "codigo_ceco": "",
                                "contrareembolso": 0,
                                "cobro_efectivo": 0,
                                "cobro_cheque": 0,
                                "precinto": "",
                                "pago_en": "ORIGEN",
                                "tipo_operacion": "ENTREGA PAQUETERIA",
                                "is_urgente": false,
                                "valida_stock": false,
                                "canal": "",
                                "comprador": {
                                    "empresa": "particular",
                                    "destinatario": "nombre y apellido",
                                    "horario": "",
                                    "calle": "LA CALLE",
                                    "altura": "1302",
                                    "piso": "",
                                    "dpto": "",
                                    "localidad": "CABA",
                                    "provincia": "CABA",
                                    "info_adicional_1": "obs1",
                                    "info_adicional_2": "obs2",
                                    "info_adicional_3": "obs3",
                                    "info_adicional_4": "obs4",
                                    "info_adicional_5": "observacion vieja",
                                    "otra_info": "",
                                    "cp": "1001",
                                    "email": "",
                                    "celular": "+5491111111111",
                                    "cuit": "",
                                    "contenido": "",
                                    "latitud": "",
                                    "longitud": ""
                                },
                                "productos": [
                                    {
                                        "bultos": 2,
                                        "peso": 2,
                                        "descripcion": "Caja de zapatos roja",
                                        "dimensiones": {
                                            "alto": 0.25,
                                            "largo": 0.25,
                                            "profundidad": 0.25
                                        }
                                    }
                                ]
                            }
                        }
                    }
                }
            }
        },
        "/v2/seguimiento": {
            "post": {
                "tags": [
                    "Seguimiento y Estados"
                ],
                "summary": "Consulta el seguimiento de un paquete por remito de cliente o por número de guía FastTrack.",
                "description": "Consulta el seguimiento de un paquete por remito de cliente o por número de guía FastTrack.",
                "operationId": "v2_seguimiento_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "ok"
                                        },
                                        "guia": {
                                            "type": "object",
                                            "properties": {
                                                "fechas": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "fecha": {
                                                                "type": "string",
                                                                "example": "01/09/2022"
                                                            },
                                                            "hora": {
                                                                "type": "string",
                                                                "example": "15:25"
                                                            },
                                                            "estado": {
                                                                "type": "string",
                                                                "example": "Solicitud Confirmada"
                                                            },
                                                            "codigo_estado": {
                                                                "type": "integer",
                                                                "example": 41
                                                            },
                                                            "receptor": {
                                                                "type": "string",
                                                                "nullable": true
                                                            },
                                                            "fecha_pactada": {
                                                                "type": "string",
                                                                "nullable": true
                                                            },
                                                            "activo": {
                                                                "type": "string",
                                                                "example": "1"
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "example": {
                                    "status": "ok",
                                    "guia": {
                                        "fechas": [
                                            {
                                                "fecha": "01/09/2022",
                                                "hora": "15:25",
                                                "estado": "Solicitud Confirmada",
                                                "codigo_estado": 41,
                                                "receptor": null,
                                                "fecha_pactada": null,
                                                "activo": "1"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Pieza no encontrada",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Guía no encontrada"
                                        }
                                    }
                                },
                                "example": {
                                    "status": "error",
                                    "message": "Guía no encontrada"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "error"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Guía no encontrada"
                                        }
                                    }
                                },
                                "example": {
                                    "status": "error",
                                    "message": "Guía no encontrada"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Cuerpo de la solicitud JSON",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "SeguimientoRequest",
                                "type": "object",
                                "properties": {
                                    "remito": {
                                        "type": "string",
                                        "example": "",
                                        "description": "🔴 [REQUERIDO CONDICIONAL] Remito de cliente (enviar remito o nro_guia)"
                                    },
                                    "nro_guia": {
                                        "type": "integer",
                                        "example": 101556064,
                                        "description": "🔴 [REQUERIDO CONDICIONAL] Número de guía FastTrack (enviar remito o nro_guia)"
                                    }
                                },
                                "anyOf": [
                                    {
                                        "required": [
                                            "remito"
                                        ]
                                    },
                                    {
                                        "required": [
                                            "nro_guia"
                                        ]
                                    }
                                ]
                            },
                            "example": {
                                "remito": "",
                                "nro_guia": 101556064
                            }
                        }
                    }
                }
            }
        },
        "/v1/tracking": {
            "post": {
                "tags": [
                    "Seguimiento y Estados"
                ],
                "summary": "Consulta el histórico de tracking por número de pieza/guía.",
                "description": "Consulta el histórico de tracking por número de pieza/guía.",
                "operationId": "v1_tracking_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "ok"
                                        },
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "guia_agente": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "tracker": {
                                                    "type": "object",
                                                    "properties": {
                                                        "historico": {
                                                            "type": "array",
                                                            "items": {
                                                                "type": "object",
                                                                "properties": {
                                                                    "estado_codigo": {
                                                                        "type": "string",
                                                                        "example": "SC"
                                                                    },
                                                                    "estado": {
                                                                        "type": "string",
                                                                        "example": "Solicitud Confirmada"
                                                                    },
                                                                    "detalles": {
                                                                        "type": "string",
                                                                        "example": "INGRESO POR API"
                                                                    },
                                                                    "receptor_nombre": {
                                                                        "type": "string",
                                                                        "nullable": true,
                                                                        "example": " "
                                                                    },
                                                                    "receptor_fecha_hora": {
                                                                        "type": "string",
                                                                        "example": "2022-09-01 15:25:50"
                                                                    },
                                                                    "dni": {
                                                                        "type": "string",
                                                                        "nullable": true
                                                                    }
                                                                }
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                },
                                "example": {
                                    "status": "ok",
                                    "data": {
                                        "guia_agente": null,
                                        "tracker": {
                                            "historico": [
                                                {
                                                    "estado_codigo": "SC",
                                                    "estado": "Solicitud Confirmada",
                                                    "detalles": "INGRESO POR API",
                                                    "receptor_nombre": " ",
                                                    "receptor_fecha_hora": "2022-09-01 15:25:50",
                                                    "dni": null
                                                }
                                            ]
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Guía no encontrada",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al consultar tracking"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al consultar tracking"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al consultar tracking"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al consultar tracking"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Cuerpo de la solicitud JSON",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "TrackingRequest",
                                "type": "object",
                                "properties": {
                                    "tracking": {
                                        "type": "string",
                                        "example": "101556064",
                                        "description": "🔴 [REQUERIDO] Número de pieza"
                                    }
                                },
                                "required": [
                                    "tracking"
                                ]
                            },
                            "example": {
                                "tracking": "101556064"
                            }
                        }
                    }
                }
            }
        },
        "/v2/get-info-guia": {
            "post": {
                "tags": [
                    "Seguimiento y Estados"
                ],
                "summary": "Obtiene la ficha técnica y comercial completa de un envío a partir de su número de guía FastTrack.",
                "description": "Obtiene la ficha técnica y comercial completa de un envío a partir de su número de guía FastTrack.",
                "operationId": "v2_getInfoGuia_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "guia": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer",
                                                    "example": 102070450
                                                },
                                                "cliente_id": {
                                                    "type": "integer",
                                                    "example": 44
                                                },
                                                "tipo_operacion": {
                                                    "type": "string",
                                                    "example": "ENTREGA"
                                                },
                                                "fecha_hora": {
                                                    "type": "string",
                                                    "example": "2024-03-26 13:40:36"
                                                },
                                                "cliente": {
                                                    "type": "string",
                                                    "example": "EMPRESA PRUEBA IT"
                                                },
                                                "remito": {
                                                    "type": "string",
                                                    "example": "R0013-00001284"
                                                },
                                                "servicio": {
                                                    "type": "string",
                                                    "example": "STD"
                                                },
                                                "comprador_empresa": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "comprador_apellido_nombre": {
                                                    "type": "string",
                                                    "example": "ECN ARGENTINA S.A."
                                                },
                                                "domicilio": {
                                                    "type": "string",
                                                    "example": "Avenida Juan Bautista Justo 9100 "
                                                },
                                                "comprador_localidad": {
                                                    "type": "string",
                                                    "example": "Liniers"
                                                },
                                                "comprador_provincia": {
                                                    "type": "string",
                                                    "example": "Ciudad Autonoma de Buenos Aires"
                                                },
                                                "estado": {
                                                    "type": "string",
                                                    "example": "Guía Emitida"
                                                },
                                                "peso": {
                                                    "type": "number",
                                                    "example": 6
                                                },
                                                "bultos": {
                                                    "type": "integer",
                                                    "example": 2
                                                },
                                                "fechaplanilla": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "nroPlanilla": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "fecharendicion": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "planillarendicion": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "fecha_hora_entrega": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "lote": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "datos_envios_flete": {
                                                    "type": "number",
                                                    "example": 9048.7
                                                },
                                                "datos_envios_valor_declarado": {
                                                    "type": "number",
                                                    "example": 6.33
                                                },
                                                "datos_envios_contrareembolso": {
                                                    "type": "number",
                                                    "example": 0
                                                },
                                                "sender_other_info": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "comprador_obs1": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "comprador_obs2": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "comprador_obs3": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "comprador_obs4": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "guia_agente": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "alto": {
                                                    "type": "number",
                                                    "example": 0
                                                },
                                                "largo": {
                                                    "type": "number",
                                                    "example": 0
                                                },
                                                "ancho": {
                                                    "type": "number",
                                                    "example": 0
                                                },
                                                "volumen": {
                                                    "type": "number",
                                                    "example": 6
                                                },
                                                "peso_volumetrico": {
                                                    "type": "number",
                                                    "nullable": true
                                                },
                                                "datos_envios_observaciones": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "costo_por_contrareembolso": {
                                                    "type": "number",
                                                    "nullable": true
                                                },
                                                "seguro": {
                                                    "type": "number",
                                                    "example": 1
                                                },
                                                "src": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "costo_despacho_a_expreso": {
                                                    "type": "number",
                                                    "nullable": true
                                                },
                                                "custodia": {
                                                    "type": "number",
                                                    "example": 0
                                                },
                                                "monto_guia_web": {
                                                    "type": "number",
                                                    "example": 0
                                                },
                                                "costo_por_monitoreo_activo": {
                                                    "type": "number",
                                                    "nullable": true
                                                },
                                                "costo_adicional1": {
                                                    "type": "number",
                                                    "nullable": true
                                                },
                                                "costo_adicional2": {
                                                    "type": "number",
                                                    "nullable": true
                                                },
                                                "costo_adicional3": {
                                                    "type": "number",
                                                    "nullable": true
                                                },
                                                "totalFlete": {
                                                    "type": "number",
                                                    "example": 9049.7
                                                },
                                                "fecha_pactada": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "fecha_confirmada": {
                                                    "type": "string",
                                                    "example": "2024-03-26"
                                                },
                                                "csr": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "fecha_factura": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "ceco_codigo": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "ceco_descripcion": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "horario": {
                                                    "type": "string",
                                                    "example": "string"
                                                },
                                                "nro_socio": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "nro_prestador": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "comprador_cp": {
                                                    "type": "integer",
                                                    "example": 1408
                                                },
                                                "comprador_telefono": {
                                                    "type": "integer",
                                                    "example": 0
                                                },
                                                "comprador_email": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "comprador_celular": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "comprador_other_info": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "comprador_documento": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "comprador_zona": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "comprador_obsEstado": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "detalle_entrega": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "zona_destino": {
                                                    "type": "string",
                                                    "example": "ZONA C"
                                                },
                                                "sub_zona_destino": {
                                                    "type": "string",
                                                    "example": "CABA"
                                                },
                                                "facturado_id": {
                                                    "type": "integer",
                                                    "nullable": true
                                                },
                                                "importe_urgente": {
                                                    "type": "number",
                                                    "nullable": true
                                                },
                                                "kg_exceso": {
                                                    "type": "number",
                                                    "nullable": true
                                                },
                                                "importe_exceso": {
                                                    "type": "number",
                                                    "nullable": true
                                                },
                                                "sector": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "trabajo": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "fecha_repactacion": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "constancia_retiro": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "nota_pedido_id": {
                                                    "type": "integer",
                                                    "nullable": true
                                                },
                                                "zona": {
                                                    "type": "string",
                                                    "example": "Gba Sur 1"
                                                },
                                                "precio": {
                                                    "type": "number",
                                                    "format": "float",
                                                    "example": 9048.7
                                                },
                                                "fechaUltimoEstado": {
                                                    "type": "string",
                                                    "example": "2024-03-26 13:40:36"
                                                },
                                                "importe_facturado": {
                                                    "type": "number",
                                                    "nullable": true
                                                },
                                                "rem_contacto": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "rem_empresa": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "rem_direccion": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "rem_localidad": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "rem_provincia": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "rem_cp": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "rem_celular": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "rem_other_info": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "sucursal_origen": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "sucursal_destino": {
                                                    "type": "string",
                                                    "example": ""
                                                },
                                                "nro_precinto": {
                                                    "type": "string",
                                                    "nullable": true
                                                },
                                                "tipo_operacion_nombre": {
                                                    "type": "string",
                                                    "example": "ENTREGA"
                                                }
                                            }
                                        }
                                    }
                                },
                                "example": {
                                    "guia": {
                                        "id": 102070450,
                                        "cliente_id": 44,
                                        "tipo_operacion": "ENTREGA",
                                        "fecha_hora": "2024-03-26 13:40:36",
                                        "cliente": "EMPRESA PRUEBA IT",
                                        "remito": "R0013-00001284",
                                        "servicio": "STD",
                                        "comprador_empresa": null,
                                        "comprador_apellido_nombre": "ECN ARGENTINA S.A.",
                                        "domicilio": "Avenida Juan Bautista Justo 9100 ",
                                        "comprador_localidad": "Liniers",
                                        "comprador_provincia": "Ciudad Autonoma de Buenos Aires",
                                        "estado": "Guía Emitida",
                                        "peso": 6,
                                        "bultos": 2,
                                        "fechaplanilla": "",
                                        "nroPlanilla": null,
                                        "fecharendicion": null,
                                        "planillarendicion": null,
                                        "fecha_hora_entrega": null,
                                        "lote": null,
                                        "datos_envios_flete": 9048.7,
                                        "datos_envios_valor_declarado": 6.33,
                                        "datos_envios_contrareembolso": 0,
                                        "sender_other_info": null,
                                        "comprador_obs1": null,
                                        "comprador_obs2": null,
                                        "comprador_obs3": null,
                                        "comprador_obs4": null,
                                        "guia_agente": null,
                                        "alto": 0,
                                        "largo": 0,
                                        "ancho": 0,
                                        "volumen": 6,
                                        "peso_volumetrico": null,
                                        "datos_envios_observaciones": null,
                                        "costo_por_contrareembolso": null,
                                        "seguro": 1,
                                        "src": null,
                                        "costo_despacho_a_expreso": null,
                                        "custodia": 0,
                                        "monto_guia_web": 0,
                                        "costo_por_monitoreo_activo": null,
                                        "costo_adicional1": null,
                                        "costo_adicional2": null,
                                        "costo_adicional3": null,
                                        "totalFlete": 9049.7,
                                        "fecha_pactada": null,
                                        "fecha_confirmada": "2024-03-26",
                                        "csr": null,
                                        "fecha_factura": null,
                                        "ceco_codigo": 0,
                                        "ceco_descripcion": "",
                                        "horario": "string",
                                        "nro_socio": null,
                                        "nro_prestador": null,
                                        "comprador_cp": 1408,
                                        "comprador_telefono": 0,
                                        "comprador_email": null,
                                        "comprador_celular": null,
                                        "comprador_other_info": null,
                                        "comprador_documento": null,
                                        "comprador_zona": null,
                                        "comprador_obsEstado": null,
                                        "detalle_entrega": null,
                                        "zona_destino": "ZONA C",
                                        "sub_zona_destino": "CABA",
                                        "facturado_id": null,
                                        "importe_urgente": null,
                                        "kg_exceso": null,
                                        "importe_exceso": null,
                                        "sector": "",
                                        "trabajo": null,
                                        "fecha_repactacion": null,
                                        "constancia_retiro": null,
                                        "nota_pedido_id": null,
                                        "zona": "Gba Sur 1",
                                        "precio": 9048.7,
                                        "fechaUltimoEstado": "2024-03-26 13:40:36",
                                        "importe_facturado": null,
                                        "rem_contacto": "",
                                        "rem_empresa": "",
                                        "rem_direccion": "",
                                        "rem_localidad": "",
                                        "rem_provincia": "",
                                        "rem_cp": "",
                                        "rem_celular": "",
                                        "rem_other_info": "",
                                        "sucursal_origen": "",
                                        "sucursal_destino": "",
                                        "nro_precinto": null,
                                        "tipo_operacion_nombre": "ENTREGA"
                                    }
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Guía no encontrada",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Guía no encontrada"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Guía no encontrada"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Guía no encontrada"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Guía no encontrada"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Cuerpo de la solicitud JSON",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "GetInfoGuiaRequest",
                                "type": "object",
                                "properties": {
                                    "nro_guia": {
                                        "type": "integer",
                                        "example": 102070450,
                                        "description": "🔴 [REQUERIDO] Número de guía FastTrack"
                                    }
                                },
                                "required": [
                                    "nro_guia"
                                ]
                            },
                            "example": {
                                "nro_guia": 102070450
                            }
                        }
                    }
                }
            }
        },
        "/v2/get-full-tracking": {
            "post": {
                "tags": [
                    "Seguimiento y Estados"
                ],
                "summary": "Devuelve el historial completo de entrega, datos del receptor, DNI, junto con la firma digital y la fotografía del comprobante de entrega.",
                "description": "Devuelve el historial completo de entrega, datos del receptor, DNI, junto con la firma digital y la fotografía del comprobante de entrega.",
                "operationId": "v2_getFullTracking_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "example": "ok"
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Se encontraron 6 registros tracker."
                                        },
                                        "datos": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "estado_codigo": {
                                                        "type": "string",
                                                        "example": "POD"
                                                    },
                                                    "estado": {
                                                        "type": "string",
                                                        "example": "Entregado"
                                                    },
                                                    "detalles": {
                                                        "type": "string",
                                                        "nullable": true
                                                    },
                                                    "receptor_fecha_hora": {
                                                        "type": "string",
                                                        "example": "2024-04-25 12:54:08"
                                                    },
                                                    "receptor_nombre": {
                                                        "type": "string",
                                                        "example": "Martin Gattelet"
                                                    },
                                                    "dni": {
                                                        "type": "string",
                                                        "example": "33880703"
                                                    }
                                                }
                                            }
                                        },
                                        "firma": {
                                            "type": "string",
                                            "example": "https://fasttracklv.epresis.com/uploadfirma/2024/04/102088855-662a7ca3c423f.jpg",
                                            "description": "URL de la firma digital de entrega"
                                        },
                                        "foto": {
                                            "type": "string",
                                            "example": "https://fasttracklv.epresis.com/fotos/2024/04/102088855-1714060449662a7ca1df479-(0)0.jpg",
                                            "description": "URL de la fotografía del comprobante"
                                        }
                                    }
                                },
                                "example": {
                                    "status": "ok",
                                    "message": "Se encontraron 6 registros tracker.",
                                    "datos": [
                                        {
                                            "estado_codigo": "POD",
                                            "estado": "Entregado",
                                            "detalles": null,
                                            "receptor_fecha_hora": "2024-04-25 12:54:08",
                                            "receptor_nombre": "Martin Gattelet",
                                            "dni": "33880703"
                                        }
                                    ],
                                    "firma": "https:",
                                    "foto": "https:"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No encontrado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Guía no encontrada o sin datos de entrega"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Guía no encontrada o sin datos de entrega"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Guía no encontrada o sin datos de entrega"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Guía no encontrada o sin datos de entrega"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Cuerpo de la solicitud JSON",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "GetFullTrackingRequest",
                                "type": "object",
                                "properties": {
                                    "nro_guia": {
                                        "type": "integer",
                                        "example": 102088855,
                                        "description": "🔴 [REQUERIDO] Número de guía FastTrack"
                                    }
                                },
                                "required": [
                                    "nro_guia"
                                ]
                            },
                            "example": {
                                "nro_guia": 102088855
                            }
                        }
                    }
                }
            }
        },
        "/v1/print-guias": {
            "post": {
                "tags": [
                    "Impresión de Etiquetas"
                ],
                "summary": "Genera e imprime el remito oficial en hoja A4 en formato PDF (codificado en Base64).",
                "description": "Genera e imprime el remito oficial en hoja A4 en formato PDF (codificado en Base64).",
                "operationId": "v1_print_guias_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "pdf_base64": {
                                            "type": "string",
                                            "example": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSA8RkVGRjAwNDQwMDZGMDA2MzAwNzUwMDZ..."
                                        }
                                    }
                                },
                                "example": {
                                    "pdf_base64": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSA8RkVGRjAwNDQwMDZGMDA2MzAwNzUwMDZ..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Parámetro inválido",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al generar remito A4"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al generar remito A4"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al generar remito A4"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al generar remito A4"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Cuerpo de la solicitud JSON",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "PrintGuiasRequest",
                                "type": "object",
                                "properties": {
                                    "ids": {
                                        "type": "string",
                                        "example": "101556064",
                                        "description": "🔴 [REQUERIDO] ID numérico de la guía a imprimir"
                                    }
                                },
                                "required": [
                                    "ids"
                                ]
                            },
                            "example": {
                                "ids": "101556064"
                            }
                        }
                    }
                }
            }
        },
        "/v1/print-etiquetas": {
            "post": {
                "tags": [
                    "Impresión de Etiquetas"
                ],
                "summary": "Genera etiquetas estándar en formato 10x15 cm en PDF codificado en Base64.",
                "description": "Genera etiquetas estándar en formato 10x15 cm en PDF codificado en Base64.",
                "operationId": "v1_print_etiquetas_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "pdf_base64": {
                                            "type": "string",
                                            "example": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSA8RkVGRjAwNDQwMDZGMDA2MzAwNzUwMDZ..."
                                        }
                                    }
                                },
                                "example": {
                                    "pdf_base64": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSA8RkVGRjAwNDQwMDZGMDA2MzAwNzUwMDZ..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Datos inválidos",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al generar etiquetas"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al generar etiquetas"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al generar etiquetas"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al generar etiquetas"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Cuerpo de la solicitud JSON",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "PrintEtiquetasRequest",
                                "type": "object",
                                "properties": {
                                    "ids": {
                                        "type": "string",
                                        "example": "101556064",
                                        "description": "🔴 [REQUERIDO] ID numérico de la guía a imprimir"
                                    }
                                },
                                "required": [
                                    "ids"
                                ]
                            },
                            "example": {
                                "ids": "101556064"
                            }
                        }
                    }
                }
            }
        },
        "/v2/print-etiquetas-custom": {
            "post": {
                "tags": [
                    "Impresión de Etiquetas"
                ],
                "summary": "Imprime etiquetas térmicas 10x15 separadas por bulto (Bulto 1/X, 2/X) o asociadas al remito de cliente.",
                "description": "Imprime etiquetas térmicas 10x15 separadas por bulto (Bulto 1/X, 2/X) o asociadas al remito de cliente.",
                "operationId": "v2_print_etiquetas_custom_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "pdf_base64": {
                                            "type": "string",
                                            "example": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSA8RkVGRjAwNDQwMDZGMDA2MzAwNzUwMDZ..."
                                        }
                                    }
                                },
                                "example": {
                                    "pdf_base64": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSA8RkVGRjAwNDQwMDZGMDA2MzAwNzUwMDZ..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Datos inválidos",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al generar etiquetas personalizadas"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al generar etiquetas personalizadas"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al generar etiquetas personalizadas"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al generar etiquetas personalizadas"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Cuerpo de la solicitud JSON",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "PrintEtiquetasCustomRequest",
                                "type": "object",
                                "properties": {
                                    "nombre": {
                                        "type": "string",
                                        "example": "ETIQUETA_10X15_BULTOS_FASTTRACK",
                                        "description": "🔴 [REQUERIDO] Plantilla: \"ETIQUETA_10X15_BULTOS_FASTTRACK\" o \"ETIQUETA_10X15_FASTTRACK_PDF\""
                                    },
                                    "ides": {
                                        "type": "array",
                                        "description": "🔴 [REQUERIDO] Array con número de guía o remitos",
                                        "items": {
                                            "type": "string",
                                            "example": "1383653015276-01"
                                        }
                                    },
                                    "tipo": {
                                        "type": "string",
                                        "example": "fixed",
                                        "description": "🔴 [REQUERIDO] Tipo de formato (\"fixed\")"
                                    },
                                    "is_remito": {
                                        "type": "boolean",
                                        "example": true,
                                        "description": "🔴 [REQUERIDO] true si se envía remito, false si es ID guía"
                                    }
                                },
                                "required": [
                                    "ides",
                                    "nombre",
                                    "tipo",
                                    "is_remito"
                                ]
                            },
                            "example": {
                                "nombre": "ETIQUETA_10X15_BULTOS_FASTTRACK",
                                "ides": [
                                    "1383653015276-01"
                                ],
                                "tipo": "fixed",
                                "is_remito": true
                            }
                        }
                    }
                }
            }
        },
        "/v2/print-etiquetas-base64": {
            "post": {
                "tags": [
                    "Impresión de Etiquetas"
                ],
                "summary": "Genera etiquetas estándar en formato PDF codificado en Base64.",
                "description": "Genera etiquetas estándar en formato PDF codificado en Base64.",
                "operationId": "v2_print_etiquetas_base64_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "pdf_base64": {
                                            "type": "string",
                                            "example": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSA8RkVGRjAwNDQwMDZGMDA2MzAwNzUwMDZ..."
                                        }
                                    }
                                },
                                "example": {
                                    "pdf_base64": "JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PC9UaXRsZSA8RkVGRjAwNDQwMDZGMDA2MzAwNzUwMDZ..."
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Datos inválidos",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al generar etiquetas"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al generar etiquetas"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "No autorizado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al generar etiquetas"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al generar etiquetas"
                                }
                            }
                        }
                    },
                    "403": {
                        "description": "api_token no configurado",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al generar etiquetas"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al generar etiquetas"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": false
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Error al generar etiquetas V1"
                                        },
                                        "error_details": {
                                            "type": "string",
                                            "example": "..."
                                        }
                                    }
                                },
                                "example": {
                                    "success": false,
                                    "message": "Error al generar etiquetas V1",
                                    "error_details": "..."
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "Cuerpo de la solicitud JSON",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "PrintEtiquetasBase64Request",
                                "type": "object",
                                "properties": {
                                    "ids": {
                                        "type": "string",
                                        "example": "101556064",
                                        "description": "🔴 [REQUERIDO] ID numérico de la guía"
                                    }
                                },
                                "required": [
                                    "ids"
                                ]
                            },
                            "example": {
                                "ids": "101556064"
                            }
                        }
                    }
                }
            }
        },
        "/v2/integracion": {
            "post": {
                "tags": [
                    "Integraciones y Webhooks"
                ],
                "summary": "Registra o configura un webhook para recibir notificaciones automáticas por cada cambio de estado de las piezas. Tu servidor receptor debe responder con código HTTP 200.",
                "description": "Registra o configura un webhook para recibir notificaciones automáticas por cada cambio de estado de las piezas. Tu servidor receptor debe responder con código HTTP 200.",
                "operationId": "v2_integracion_post",
                "responses": {
                    "200": {
                        "description": "Éxito",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "success": {
                                            "type": "boolean",
                                            "example": true
                                        },
                                        "message": {
                                            "type": "string",
                                            "example": "Webhook configurado correctamente"
                                        }
                                    }
                                },
                                "example": {
                                    "success": true,
                                    "message": "Webhook configurado correctamente"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Datos inválidos",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al configurar webhook"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al configurar webhook"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Error interno",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "type": "string",
                                            "example": "Error al configurar webhook"
                                        }
                                    }
                                },
                                "example": {
                                    "message": "Error al configurar webhook"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "required": true,
                    "description": "**Campos Requeridos:**\n- `url` (string): 🔴 [REQUERIDO] URL donde recibir el callback de notificación\n- `notificacion` (boolean): 🔴 [REQUERIDO] true para activar notificaciones automáticas\n- `token` (string): 🔴 [REQUERIDO] Token propio que FastTrack reenviará para validar autenticidad\n- `usuario` (string): 🔴 [REQUERIDO] Nombre de usuario / integrador\n- `sucursal` (string): 🔴 [REQUERIDO] Código de sucursal asociada\n\n*Nota:* Tu webhook recibirá un POST con formato: `{\"usuario\": \"Presis\", \"token\": \"...\", \"estado\": \"Entregada\", \"codigo_estado\": \"ENT\", \"remito\": \"255\", \"guia\": 220}` y debe responder con código HTTP 200.",
                    "content": {
                        "application/json": {
                            "schema": {
                                "title": "ConfiguracionWebhookRequest",
                                "type": "object",
                                "properties": {
                                    "url": {
                                        "type": "string",
                                        "example": "https://help.epresis.com",
                                        "description": "🔴 [REQUERIDO] URL donde recibir el callback"
                                    },
                                    "notificacion": {
                                        "type": "boolean",
                                        "example": true,
                                        "description": "🔴 [REQUERIDO] true para activar notificaciones"
                                    },
                                    "token": {
                                        "type": "string",
                                        "example": "JpppT58P$HumnbvasUtTTTRP88992dYrDQ",
                                        "description": "🔴 [REQUERIDO] Token secreto propio que FastTrack reenviará para validar autenticidad"
                                    },
                                    "usuario": {
                                        "type": "string",
                                        "example": "Presis",
                                        "description": "🔴 [REQUERIDO] Nombre de usuario / integrador"
                                    },
                                    "sucursal": {
                                        "type": "string",
                                        "example": "SUCU225",
                                        "description": "🔴 [REQUERIDO] Código de sucursal asociada"
                                    }
                                },
                                "required": [
                                    "url",
                                    "notificacion",
                                    "token",
                                    "usuario",
                                    "sucursal"
                                ]
                            },
                            "example": {
                                "url": "https://help.epresis.com",
                                "notificacion": true,
                                "token": "JpppT58P$HumnbvasUtTTTRP88992dYrDQ",
                                "usuario": "Presis",
                                "sucursal": "SUCU225"
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "Token",
                "description": "Ingrese el token `access_token` generado por el sistema (/api/auth/login)."
            }
        }
    }
