Overview
Retrieve the top N parts by scrap cost to identify which parts are most expensive to waste.
Authentication
Requires valid JWT token with view_area_reports or view_global_reports permission.
Authorization: Bearer <token>
Query Parameters
Start date filter (YYYY-MM-DD format or ISO datetime)
End date filter (YYYY-MM-DD format or ISO datetime)
Number of top parts to return
Request Example
curl -X GET "http://localhost:3001/api/reports/top-parts?limit=10" \
-H "Authorization: Bearer YOUR_TOKEN"
Response
Returns an array of part statistics ordered by cost (descending).
Total scrap cost for this part
Total scrap quantity for this part
Response Example
[
{
"name": "12345678",
"costo": 3250.00,
"cantidad": 85
},
{
"name": "87654321",
"costo": 2890.50,
"cantidad": 62
},
{
"name": "11223344",
"costo": 2450.75,
"cantidad": 98
}
]
Use Cases
- Cost Reduction: Identify most expensive parts to prioritize process improvements
- Supplier Quality: Track parts from specific suppliers with high scrap rates
- Training Focus: Target operator training on high-cost parts
Top Failures
Most common failure modes
Summary Report
Overall statistics