Overview
Retrieve scrap records grouped by shift (turno) to analyze performance across different work shifts. Useful for identifying shift-specific quality issues.
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)
Request Example
cURL - All Time
cURL - Date Range
JavaScript
curl -X GET http://localhost:3001/api/reports/by-turno \
-H "Authorization: Bearer YOUR_TOKEN"
Response
Returns an array of shift statistics.
Shift identifier (TURNO value)
Total scrap quantity for this shift
Total scrap cost for this shift
Response Example
[
{
"name" : "1" ,
"cantidad" : 520 ,
"costo" : 17256.30
},
{
"name" : "2" ,
"cantidad" : 480 ,
"costo" : 15890.45
},
{
"name" : "3" ,
"cantidad" : 380 ,
"costo" : 12450.75
}
]
Results are ordered by TURNO field (shift identifier), not by cost or quantity.
By Area Scrap aggregated by area
By Chain Scrap aggregated by production chain