Skip to main content
GET
/
api
/
reports
/
by-turno
Reports by Shift
curl --request GET \
  --url https://api.example.com/api/reports/by-turno
{
  "name": "<string>",
  "cantidad": 123,
  "costo": 123
}

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

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)

Request Example

curl -X GET http://localhost:3001/api/reports/by-turno \
  -H "Authorization: Bearer YOUR_TOKEN"

Response

Returns an array of shift statistics.
name
string
Shift identifier (TURNO value)
cantidad
number
Total scrap quantity for this shift
costo
number
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

Build docs developers (and LLMs) love