The Reports API provides pre-computed analytics by querying PostgreSQL (orders, assignments, conductors, payments) and MongoDB (tracking, geofences, evidences, notifications). All endpoints are read-only and require theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/JorLOrT/rappi2/llms.txt
Use this file to discover all available pages before exploring further.
reportes:read permission.
All endpoints require
Authorization: Bearer <token> and the reportes:read permission.Dashboard
GET /reportes/dashboard
High-level operational KPIs for the past 24 hours and overall entity counts.
Count of active entities per type.
Order count keyed by
EstadoOrden value.Driver count keyed by
DisponibilidadConductor value.Vehicle count keyed by
EstadoVehiculo value.Sum of confirmed payments (
estado = "Pagado") in the last 24 hours.Count of incidents with
severidad >= 3.Sales report
GET /reportes/ventas
Revenue aggregated by day or month. Defaults to the last 30 days when desde/hasta are omitted.
ISO 8601 datetime — start of the reporting window. Defaults to 30 days before
hasta.ISO 8601 datetime — end of the reporting window. Defaults to now.
Aggregation bucket:
dia (daily) or mes (monthly).Top clients
GET /reportes/top-clientes
Ranks clients by total confirmed payment amount.
Number of top clients to return (
1–50).Driver metrics
GET /reportes/conductores
Per-driver summary: total assignments, completed, active, and linked incident count.
Driver efficiency
GET /reportes/conductores/eficiencia
Per-driver efficiency metrics: deliveries per hour and incident rate, for active drivers only.
ISO 8601 datetime — start of the analysis window.
ISO 8601 datetime — end of the analysis window.
Maximum rows to return (
1–200). Ordered by entregas_por_hora descending.Driver ID.
Driver name.
Number of completed deliveries in the window.
Total active hours (sum of assignment durations).
Deliveries per active hour.
null when horas_activas is 0.Total incidents across all assignments.
Incidents with
severidad >= 3.Incidents per delivery.
null when entregas_finalizadas is 0.Incident summary
GET /reportes/incidencias
Incident counts broken down by severity level and type, in an optional time window.
ISO 8601 datetime — start of the window.
ISO 8601 datetime — end of the window.
Delivery times
GET /reportes/tiempos-entrega
Statistical summary (average, min, max) of assignment durations for completed assignments.
ISO 8601 datetime — filter by
fecha_fin >= desde.ISO 8601 datetime — filter by
fecha_fin <= hasta.SLA compliance
GET /reportes/sla-entregas
Percentage of completed assignments delivered within a configurable SLA threshold, plus p50/p95 duration percentiles.
ISO 8601 datetime — start of the window.
ISO 8601 datetime — end of the window.
SLA target in minutes (
1–1440). Assignments completed within this threshold count as on-time.Percentage of deliveries completed within
sla_minutos. null when there are no deliveries.Median delivery duration in minutes.
null when there are no deliveries.95th-percentile delivery duration in minutes.
null when there are no deliveries.Operational report
GET /reportes/operativo
Real-time cross-source snapshot combining PostgreSQL (active assignments, driver availability) and MongoDB (online drivers, GPS coverage, geofences, recent incidents).
Time window in minutes for considering a driver “online” based on recent pings (
1–60).Distinct driver IDs with a ping within the
ventana_minutos window.Active assignments (
EnCurso) with no GPS ping in the current window.Distinct assignments that have received at least one ping today (since midnight UTC).
Evidence report
GET /reportes/evidencias
MongoDB-sourced KPIs for evidence documents: count by type, total files in GridFS, and storage size.
Notifications report
GET /reportes/notificaciones
Summary of notifications created within a configurable time window, broken down by recipient type and read status.
Time window in hours (
1–720).Geographic distribution
GET /reportes/distribucion-geografica
Top districts by order volume (origin and destination) in a time window.
ISO 8601 datetime — start of the window.
ISO 8601 datetime — end of the window.
Number of top districts to return per dimension (
1–100).Client summary
GET /reportes/cliente/{cliente_id}/resumen
360-degree view of a single client: order counts by status, total revenue collected, and total invoiced.
Client ID.
Assignment complete report
GET /reportes/asignacion/{asignacion_id}/completo
Cross-source 360-degree view of a single assignment: assignment metadata from PostgreSQL, incident breakdown, GPS tracking statistics from MongoDB, evidence counts, and notification count for the driver.
Assignment ID.