Skip to main content
GET
/
api
/
dashboard
curl -X GET "https://api.iclcotizaciones.com/api/dashboard?tipo=general" \
  -H "Cookie: session=your_session_token"
{
  "porSemana": [
    {
      "semana": 9,
      "anio": 2024,
      "total": 45,
      "cerradas": 12,
      "profit_total": 8750.50
    }
  ],
  "porMes": [
    {
      "mes": 3,
      "anio": 2024,
      "total": 180,
      "cerradas": 48,
      "profit_total": 35200.75
    }
  ],
  "topClientes": [
    {
      "cliente_nombre": "Acme Corporation",
      "total": 28
    },
    {
      "cliente_nombre": "Global Imports SA",
      "total": 22
    }
  ],
  "topClientesGanadas": [
    {
      "cliente_nombre": "Acme Corporation",
      "total": 8
    },
    {
      "cliente_nombre": "Tech Solutions Ltd",
      "total": 6
    }
  ],
  "porEstado": [
    {
      "estado": "SI",
      "total": 48
    },
    {
      "estado": "NO",
      "total": 35
    },
    {
      "estado": "PEND",
      "total": 42
    },
    {
      "estado": "ENCOTIZACION",
      "total": 55
    }
  ]
}
Retrieves comprehensive analytics and statistics for quotations. Supports multiple report types for different dashboard views.

Query Parameters

tipo
string
default:"general"
Type of analytics report to retrieve:
  • general - Weekly/monthly stats, top clients, status breakdown
  • filtradas - Filtered quotations with summary statistics
  • por-vendedor - Sales performance by salesperson
  • contactos - Client activity and engagement tracking
cliente_id
integer
Filter by client ID
vendedor_id
integer
Filter by salesperson user ID
fecha_desde
string
Filter from date (YYYY-MM-DD)
fecha_hasta
string
Filter to date (YYYY-MM-DD)
estado
string
Filter by quote status (only for tipo=filtradas): SI, NO, PEND, ENCOTIZACION, PEND A/C
Non-admin users can only see their own quotations. Admin users (DIRECTOR, GERENTE) can see all quotations.

Response Types

General Dashboard (tipo=general)

Provides high-level statistics broken down by time periods and client performance.
porSemana
array
Weekly statistics with total quotes, closed quotes, and profit
porMes
array
Monthly statistics with total quotes, closed quotes, and profit
topClientes
array
Top 10 clients by quotation volume (last 30 days)
topClientesGanadas
array
Top 10 clients by won quotations (last 30 days)
porEstado
array
Breakdown by quotation status

Filtered Dashboard (tipo=filtradas)

Provides filtered quotation list with summary statistics.
total
integer
Total number of quotations matching filters
cerradas
integer
Number of closed quotations (status = SI)
profit
number
Total profit from closed quotations
porEstado
array
Breakdown by status
cotizaciones
array
List of quotations

Sales Performance (tipo=por-vendedor)

Provides sales statistics grouped by salesperson.
vendedores
array
Overall performance by salesperson
vendedoresMes
array
Monthly performance by salesperson

Contact Activity (tipo=contactos)

Tracks salesperson activity and identifies clients without recent quotations.
actividad
array
Salesperson activity (last 30 days)
sinCotizar
array
Active clients without quotes in last 30 days

Request Examples

curl -X GET "https://api.iclcotizaciones.com/api/dashboard?tipo=general" \
  -H "Cookie: session=your_session_token"

Response Examples

{
  "porSemana": [
    {
      "semana": 9,
      "anio": 2024,
      "total": 45,
      "cerradas": 12,
      "profit_total": 8750.50
    }
  ],
  "porMes": [
    {
      "mes": 3,
      "anio": 2024,
      "total": 180,
      "cerradas": 48,
      "profit_total": 35200.75
    }
  ],
  "topClientes": [
    {
      "cliente_nombre": "Acme Corporation",
      "total": 28
    },
    {
      "cliente_nombre": "Global Imports SA",
      "total": 22
    }
  ],
  "topClientesGanadas": [
    {
      "cliente_nombre": "Acme Corporation",
      "total": 8
    },
    {
      "cliente_nombre": "Tech Solutions Ltd",
      "total": 6
    }
  ],
  "porEstado": [
    {
      "estado": "SI",
      "total": 48
    },
    {
      "estado": "NO",
      "total": 35
    },
    {
      "estado": "PEND",
      "total": 42
    },
    {
      "estado": "ENCOTIZACION",
      "total": 55
    }
  ]
}

Build docs developers (and LLMs) love