Sofia - Debug de API DNCP

1. Configuracion

Customer Key a7003085-e8a0-40e0-9... OK
Customer Secret ba6e33b0-6... OK
Request Token YTcwMDMwODUtZThhMC00MGUwLTljM2... OK
Token URL https://contrataciones.gov.py/datos/api/oauth/token -
API Base https://www.contrataciones.gov.py/datos/api/v3/doc -

2. Test OAuth Token

Solicitando token...

HTTP Code: 200
cURL Error: Ninguno
URL: https://contrataciones.gov.py/datos/api/oauth/token
Total Time: 0.340905s

TOKEN OBTENIDO EXITOSAMENTE

Access Token: $2a$10$yzNUrJpV2oA7eiVYAmGZCeHGNwmzwCa1aToDmO/oghw...
Token Type: bearer
Expires In: N/A

3. Descubrimiento de Endpoints

== v3 sin www ==
URL: https://contrataciones.gov.py/datos/api/v3

  [404]  - Base URL directa
  [404] / - Con slash
  [404] /search/processes?limit=1 - Search processes
  [404] /ocds/releases?limit=1 - OCDS Releases
  [404] /ocds/release?limit=1 - OCDS Release
  [404] /bulk/releases?limit=1 - Bulk releases
  [404] /tender?limit=1 - Tender
  [404] /planning?limit=1 - Planning
  [404] /record?limit=1 - Record

------------------------------------------------------------

== v3 con www ==
URL: https://www.contrataciones.gov.py/datos/api/v3

  [404]  - Base URL directa
  [404] / - Con slash
  [404] /search/processes?limit=1 - Search processes
  [404] /ocds/releases?limit=1 - OCDS Releases
  [404] /ocds/release?limit=1 - OCDS Release
  [404] /bulk/releases?limit=1 - Bulk releases
  [404] /tender?limit=1 - Tender
  [404] /planning?limit=1 - Planning
  [404] /record?limit=1 - Record

------------------------------------------------------------

== v3/doc ==
URL: https://contrataciones.gov.py/datos/api/v3/doc

  [200]  - Base URL directa
       -> Redirect a: https://contrataciones.gov.py/datos/api/v3/doc/
       (HTML o formato no JSON)
  [200] / - Con slash
       (HTML o formato no JSON)
  [404] /search/processes?limit=1 - Search processes
  [404] /ocds/releases?limit=1 - OCDS Releases
  [404] /ocds/release?limit=1 - OCDS Release
  [404] /bulk/releases?limit=1 - Bulk releases
  [404] /tender?limit=1 - Tender
  [404] /planning?limit=1 - Planning
  [404] /record?limit=1 - Record

------------------------------------------------------------

== v2 ==
URL: https://contrataciones.gov.py/datos/api/v2

  [404]  - Base URL directa
  [200] / - Con slash
       (HTML o formato no JSON)
  [404] /search/processes?limit=1 - Search processes
  [404] /ocds/releases?limit=1 - OCDS Releases
  [404] /ocds/release?limit=1 - OCDS Release
  [404] /bulk/releases?limit=1 - Bulk releases
  [404] /tender?limit=1 - Tender
  [404] /planning?limit=1 - Planning
  [404] /record?limit=1 - Record

------------------------------------------------------------

4. Test Busqueda de Licitaciones

== Search Processes (Hoy) ==
URL: https://www.contrataciones.gov.py/datos/api/v3/doc/search/processes?fecha_desde=2026-01-22&fecha_hasta=2026-01-22&tipo_fecha=tender.tenderPeriod.startDate&limit=5

HTTP Code: 400
Error HTTP 400
Response: {"message": "El tipo de fecha debe ser ['entrega_ofertas', 'adjudicacion', 'publicacion_llamado', 'firma_contrato', 'fecha_release']", "status": 400}


------------------------------------------------------------

== Search Processes (Ayer) ==
URL: https://www.contrataciones.gov.py/datos/api/v3/doc/search/processes?fecha_desde=2026-01-21&fecha_hasta=2026-01-21&tipo_fecha=tender.tenderPeriod.startDate&limit=5

HTTP Code: 400
Error HTTP 400
Response: {"message": "El tipo de fecha debe ser ['entrega_ofertas', 'adjudicacion', 'publicacion_llamado', 'firma_contrato', 'fecha_release']", "status": 400}


------------------------------------------------------------

== Search Processes (Ultimos 7 dias) ==
URL: https://www.contrataciones.gov.py/datos/api/v3/doc/search/processes?fecha_desde=2026-01-15&fecha_hasta=2026-01-22&limit=5

HTTP Code: 404
Error HTTP 404
Response: {"message": "No encontrado", "status": 404}


------------------------------------------------------------

== Tenders Abiertos (Minimal) ==
URL: https://www.contrataciones.gov.py/datos/api/v3/doc/visualizations/minimal/tenders?limit=5

HTTP Code: 500
Error HTTP 500
Response: {"message": "Internal Server Error"}


------------------------------------------------------------

4. Estado de Base de Datos

licitaciones: 0 registros
seguimiento: 0 registros
categorias_interes: 9 registros
oauth_tokens: 1 registros
sync_log: 16 registros
alertas: 0 registros

Ultimo Sync:
Fecha: 2026-01-22 21:54:13
Nuevas: 0
Actualizadas: 0
Errores: 1
Detalles: {
    "nuevas": 0,
    "actualizadas": 0,
    "errores": 1,
    "duracion_ms": 375,
    "desde": "2026-01-15",
    "hasta": "2026-01-22",
    "debug": [
        {
            "time": "2026-01-22 18:54:12",
            "message": "Iniciando sync",
            "data": {
                "desde": "2026-01-15",
                "hasta": "2026-01-22"
            }
        },
        {
            "time": "2026-01-22 18:54:12",
            "message": "Probando endpoint de licitaciones abiertas",
            "data": []
        },
        {
            "time": "2026-01-22 18:54:13",
            "message": "Endpoint abiertas OK",
            "data": {
                "keys": [
                    "uri",
                    "publishedDate",
                    "publisher",
                    "license",
                    "publicationPolicy",
                    "version",
                    "records",
                    "pagination"
                ]
            }
        },
        {
            "time": "2026-01-22 18:54:13",
            "message": "Consultando API",
            "data": {
                "page": 1,
                "limit": 100
            }
        },
        {
            "time": "2026-01-22 18:54:13",
            "message": "Respuesta recibida",
            "data": {
                "keys": [
                    "error",
                    "response",
                    "http_code"
                ],
                "type": "array",
                "has_error": true,
                "has_results": false,
                "has_records": false,
                "has_list": false,
                "has_pagination": false,
                "sample": "{\"error\":\"HTTP 404\",\"response\":\"{\\\"message\\\": \\\"No encontrado\\\", \\\"status\\\": 404}\\n\"}"
            }
        },
        {
            "time": "2026-01-22 18:54:13",
            "message": "Error en API",
            "data": {
                "error": "HTTP 404",
                "http_code": 404,
                "response_preview": "{\"message\": \"No encontrado\", \"status\": 404}\n"
            }
        },
        {
            "time": "2026-01-22 18:54:13",
            "message": "Sync completado",
            "data": {
                "total_procesados": 0,
                "nuevas": 0,
                "actualizadas": 0,
                "errores": 1
            }
        }
    ]
}

5. Logs de Seguridad Recientes

[2026-01-22 17:35:08] oauth_success
[2026-01-22 17:35:09] sync_completado
[2026-01-22 17:35:20] oauth_success
[2026-01-22 18:18:20] oauth_success
[2026-01-22 18:18:29] oauth_success
[2026-01-22 18:18:36] sync_inicio
[2026-01-22 18:18:37] oauth_success
[2026-01-22 18:18:37] sync_completado
[2026-01-22 18:18:44] categoria_eliminar
[2026-01-22 18:18:48] oauth_success
[2026-01-22 18:18:50] oauth_success
[2026-01-22 18:21:40] oauth_success
[2026-01-22 18:21:45] sync_inicio
[2026-01-22 18:21:45] oauth_success
[2026-01-22 18:21:45] sync_completado
[2026-01-22 18:21:49] oauth_success
[2026-01-22 18:51:14] sync_inicio
[2026-01-22 18:51:15] sync_completado
[2026-01-22 18:54:12] sync_inicio
[2026-01-22 18:54:13] sync_completado

6. PHP Info

PHP Version 8.3.24
cURL Disponible
JSON Disponible
PDO MySQL Disponible
Timezone America/Asuncion (2026-01-22 19:06:11)

Acceso: debug.php?key=sofia2026