Skip to main content
GET
/
api
/
reports
/
top-fallas
Top Failure Modes
curl --request GET \
  --url https://api.example.com/api/reports/top-fallas
{
  "name": "<string>",
  "count": 123,
  "costo": 123
}

Overview

Retrieve the top N failure modes by occurrence count to identify the most common quality issues.

Authentication

Requires valid JWT token with view_area_reports or view_global_reports permission.
Authorization: Bearer <token>

Query Parameters

fecha_inicio
string
Start date filter (YYYY-MM-DD format or ISO datetime)
fecha_fin
string
End date filter (YYYY-MM-DD format or ISO datetime)
limit
number
default:10
Number of top failure modes to return

Request Example

curl -X GET "http://localhost:3001/api/reports/top-fallas?limit=10" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

Returns an array of failure mode statistics ordered by count (descending).
name
string
Failure mode description (MODO_FALLA value)
count
number
Number of occurrences of this failure mode
costo
number
Total scrap cost associated with this failure mode

Response Example

[
  {
    "name": "Conector dañado",
    "count": 125,
    "costo": 4250.50
  },
  {
    "name": "Material defectuoso",
    "count": 98,
    "costo": 3890.25
  },
  {
    "name": "Error de ensamble",
    "count": 87,
    "costo": 2975.75
  },
  {
    "name": "Pieza fuera de especificación",
    "count": 76,
    "costo": 2650.00
  }
]
Failure modes with value ”-” (no failure specified) are excluded from results.

Use Cases

  • Root Cause Analysis: Identify systemic quality issues affecting production
  • Process Improvement: Prioritize corrective actions based on failure frequency
  • Training Programs: Develop targeted training for most common failure modes
  • Supplier Feedback: Communicate recurring material defects to suppliers

Top Parts

Parts with highest scrap cost

By Category

Scrap by category

Build docs developers (and LLMs) love