Skip to main content

Documentation 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.

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 the 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.
curl -X GET "https://api.rappi2.com/reportes/dashboard" \
  -H "Authorization: Bearer <token>"
{
  "totales": {
    "clientes": 142,
    "usuarios": 18,
    "conductores": 34,
    "vehiculos": 29,
    "ordenes": 1820,
    "asignaciones": 1750
  },
  "ordenes_por_estado": {
    "Pendiente": 42,
    "En Proceso": 15,
    "En Tránsito": 8,
    "Entregado": 1700,
    "Cancelado": 55
  },
  "conductores_por_disponibilidad": {
    "Disponible": 20,
    "Ocupado": 12,
    "Inactivo": 2
  },
  "vehiculos_por_estado": {
    "Operativo": 25,
    "Mantenimiento": 3,
    "Inactivo": 1
  },
  "recaudacion_ultimas_24h": 4820.50,
  "incidencias_severidad_alta": 3
}
totales
object
required
Count of active entities per type.
ordenes_por_estado
object
required
Order count keyed by EstadoOrden value.
conductores_por_disponibilidad
object
required
Driver count keyed by DisponibilidadConductor value.
vehiculos_por_estado
object
required
Vehicle count keyed by EstadoVehiculo value.
recaudacion_ultimas_24h
number
required
Sum of confirmed payments (estado = "Pagado") in the last 24 hours.
incidencias_severidad_alta
integer
required
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.
desde
string
ISO 8601 datetime — start of the reporting window. Defaults to 30 days before hasta.
hasta
string
ISO 8601 datetime — end of the reporting window. Defaults to now.
granularidad
string
default:"dia"
Aggregation bucket: dia (daily) or mes (monthly).
curl -X GET "https://api.rappi2.com/reportes/ventas?granularidad=mes&desde=2026-01-01T00:00:00Z" \
  -H "Authorization: Bearer <token>"
{
  "desde": "2026-01-01T00:00:00Z",
  "hasta": "2026-05-22T14:00:00Z",
  "granularidad": "mes",
  "series": [
    {"periodo": "2026-01-01T00:00:00Z", "pagos": 320, "monto": 48200.00},
    {"periodo": "2026-02-01T00:00:00Z", "pagos": 290, "monto": 43500.00}
  ],
  "total_recaudado": 91700.00,
  "total_facturado": 95000.00
}

Top clients

GET /reportes/top-clientes Ranks clients by total confirmed payment amount.
limit
integer
default:"10"
Number of top clients to return (150).
curl -X GET "https://api.rappi2.com/reportes/top-clientes?limit=5" \
  -H "Authorization: Bearer <token>"
[
  {
    "cliente_id": 7,
    "nombre": "Logística Sur S.A.",
    "email": "contacto@logisticasur.pe",
    "ordenes": 142,
    "recaudado": 28400.00
  }
]

Driver metrics

GET /reportes/conductores Per-driver summary: total assignments, completed, active, and linked incident count.
curl -X GET "https://api.rappi2.com/reportes/conductores" \
  -H "Authorization: Bearer <token>"
[
  {
    "conductor_id": 5,
    "nombre": "Carlos Quispe",
    "disponibilidad": "Disponible",
    "vehiculo_placa": "ABC-123",
    "total_asignaciones": 87,
    "finalizadas": 82,
    "en_curso": 1,
    "incidencias": 3
  }
]

Driver efficiency

GET /reportes/conductores/eficiencia Per-driver efficiency metrics: deliveries per hour and incident rate, for active drivers only.
desde
string
ISO 8601 datetime — start of the analysis window.
hasta
string
ISO 8601 datetime — end of the analysis window.
limit
integer
default:"20"
Maximum rows to return (1200). Ordered by entregas_por_hora descending.
curl -X GET "https://api.rappi2.com/reportes/conductores/eficiencia?desde=2026-05-01T00:00:00Z&limit=10" \
  -H "Authorization: Bearer <token>"
[
  {
    "conductor_id": 5,
    "nombre": "Carlos Quispe",
    "entregas_finalizadas": 82,
    "horas_activas": 134.5,
    "entregas_por_hora": 0.61,
    "incidencias": 3,
    "incidencias_severas": 1,
    "tasa_incidencias": 0.037
  }
]
conductor_id
integer
required
Driver ID.
nombre
string
required
Driver name.
entregas_finalizadas
integer
required
Number of completed deliveries in the window.
horas_activas
number
required
Total active hours (sum of assignment durations).
entregas_por_hora
number
Deliveries per active hour. null when horas_activas is 0.
incidencias
integer
required
Total incidents across all assignments.
incidencias_severas
integer
required
Incidents with severidad >= 3.
tasa_incidencias
number
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.
desde
string
ISO 8601 datetime — start of the window.
hasta
string
ISO 8601 datetime — end of the window.
curl -X GET "https://api.rappi2.com/reportes/incidencias?desde=2026-05-01T00:00:00Z" \
  -H "Authorization: Bearer <token>"
{
  "desde": "2026-05-01T00:00:00Z",
  "hasta": null,
  "total": 28,
  "por_severidad": {"1": 8, "2": 10, "3": 6, "4": 3, "5": 1},
  "por_tipo": [
    {"tipo": "paquete_dañado", "count": 12},
    {"tipo": "demora", "count": 9}
  ]
}

Delivery times

GET /reportes/tiempos-entrega Statistical summary (average, min, max) of assignment durations for completed assignments.
desde
string
ISO 8601 datetime — filter by fecha_fin >= desde.
hasta
string
ISO 8601 datetime — filter by fecha_fin <= hasta.
curl -X GET "https://api.rappi2.com/reportes/tiempos-entrega" \
  -H "Authorization: Bearer <token>"
{
  "desde": null,
  "hasta": null,
  "asignaciones_finalizadas": 1750,
  "tiempo_promedio_segundos": 2340.5,
  "tiempo_minimo_segundos": 180.0,
  "tiempo_maximo_segundos": 9600.0,
  "tiempo_promedio_minutos": 39.01
}

SLA compliance

GET /reportes/sla-entregas Percentage of completed assignments delivered within a configurable SLA threshold, plus p50/p95 duration percentiles.
desde
string
ISO 8601 datetime — start of the window.
hasta
string
ISO 8601 datetime — end of the window.
sla_minutos
integer
default:"60"
SLA target in minutes (11440). Assignments completed within this threshold count as on-time.
curl -X GET "https://api.rappi2.com/reportes/sla-entregas?sla_minutos=45" \
  -H "Authorization: Bearer <token>"
{
  "desde": null,
  "hasta": null,
  "sla_minutos": 45,
  "total_entregas": 1750,
  "on_time": 1435,
  "off_time": 315,
  "on_time_pct": 82.0,
  "p50_minutos": 31.5,
  "p95_minutos": 67.2
}
on_time_pct
number
Percentage of deliveries completed within sla_minutos. null when there are no deliveries.
p50_minutos
number
Median delivery duration in minutes. null when there are no deliveries.
p95_minutos
number
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).
ventana_minutos
integer
default:"5"
Time window in minutes for considering a driver “online” based on recent pings (160).
curl -X GET "https://api.rappi2.com/reportes/operativo?ventana_minutos=10" \
  -H "Authorization: Bearer <token>"
{
  "ventana_minutos": 10,
  "asignaciones_en_curso": 12,
  "conductores_ocupados_postgres": 12,
  "conductores_online_mongo": 10,
  "asignaciones_activas_sin_tracking": 2,
  "asignaciones_con_ping_hoy": 34,
  "geocercas_activas": 18,
  "incidencias_ultimas_24h": 5
}
conductores_online_mongo
integer
required
Distinct driver IDs with a ping within the ventana_minutos window.
asignaciones_activas_sin_tracking
integer
required
Active assignments (EnCurso) with no GPS ping in the current window.
asignaciones_con_ping_hoy
integer
required
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.
curl -X GET "https://api.rappi2.com/reportes/evidencias" \
  -H "Authorization: Bearer <token>"
{
  "total_evidencias": 340,
  "por_tipo": {
    "foto": 280,
    "video": 40,
    "audio": 10,
    "documento": 10
  },
  "archivos_en_gridfs": 412,
  "bytes_totales": 524288000,
  "megabytes_totales": 500.0,
  "top_incidencias_con_evidencias": [
    {"incidencia_id": 15, "evidencias": 8},
    {"incidencia_id": 7, "evidencias": 6}
  ]
}

Notifications report

GET /reportes/notificaciones Summary of notifications created within a configurable time window, broken down by recipient type and read status.
horas
integer
default:"24"
Time window in hours (1720).
curl -X GET "https://api.rappi2.com/reportes/notificaciones?horas=48" \
  -H "Authorization: Bearer <token>"
{
  "ventana_horas": 48,
  "desde": "2026-05-20T14:00:00Z",
  "total": 185,
  "leidas": 130,
  "pendientes": 55,
  "por_destinatario": [
    {"tipo": "usuario", "total": 120, "leidas": 90, "pendientes": 30},
    {"tipo": "cliente", "total": 65, "leidas": 40, "pendientes": 25}
  ]
}

Geographic distribution

GET /reportes/distribucion-geografica Top districts by order volume (origin and destination) in a time window.
desde
string
ISO 8601 datetime — start of the window.
hasta
string
ISO 8601 datetime — end of the window.
top
integer
default:"10"
Number of top districts to return per dimension (1100).
curl -X GET "https://api.rappi2.com/reportes/distribucion-geografica?top=5" \
  -H "Authorization: Bearer <token>"
{
  "desde": null,
  "hasta": null,
  "top": 5,
  "total_ordenes": 1820,
  "top_origen": [
    {"distrito": "Miraflores", "ordenes": 320},
    {"distrito": "San Isidro", "ordenes": 280}
  ],
  "top_destino": [
    {"distrito": "Surco", "ordenes": 410},
    {"distrito": "La Molina", "ordenes": 195}
  ]
}

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.
cliente_id
integer
required
Client ID.
curl -X GET "https://api.rappi2.com/reportes/cliente/7/resumen" \
  -H "Authorization: Bearer <token>"
{
  "cliente": {
    "id": 7,
    "nombre": "Logística Sur S.A.",
    "email": "contacto@logisticasur.pe",
    "activo": true
  },
  "total_ordenes": 142,
  "ordenes_por_estado": {
    "Entregado": 130,
    "Cancelado": 8,
    "En Proceso": 4
  },
  "total_recaudado": 28400.00,
  "total_facturado": 29200.00
}

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.
asignacion_id
integer
required
Assignment ID.
curl -X GET "https://api.rappi2.com/reportes/asignacion/101/completo" \
  -H "Authorization: Bearer <token>"
{
  "asignacion": {
    "id": 101,
    "estado": "Finalizada",
    "conductor_id": 5,
    "vehiculo_placa": "ABC-123",
    "orden_id": 42,
    "fecha_inicio": "2026-05-22T13:37:30Z",
    "fecha_fin": "2026-05-22T14:00:00Z"
  },
  "incidencias": {
    "total": 1,
    "por_severidad": {"4": 1}
  },
  "tracking": {
    "asignacion_id": 101,
    "pings": 48,
    "distancia_total_m": 9830.45,
    "distancia_total_km": 9.830,
    "duracion_segundos": 1350.0,
    "duracion_minutos": 22.5,
    "velocidad_promedio_kmh": 26.21,
    "primer_ping": "2026-05-22T13:37:30Z",
    "ultimo_ping": "2026-05-22T14:00:00Z"
  },
  "evidencias": {
    "total": 2,
    "por_tipo": {"foto": 2}
  },
  "notificaciones_al_conductor": 3
}

Build docs developers (and LLMs) love