> ## Documentation Index
> Fetch the complete documentation index at: https://docs.industrialpmr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Reports & Analytics API

> Programmatic access to shift production summaries, downtime Pareto analyses, and energy consumption logs.

Industrial PMR allows ERP connectors and BI pipelines to retrieve aggregated shift reports, downtime breakdowns, and machine energy metrics.

***

## Query Shift Summary Report

Retrieve verified production and downtime statistics for a specific shift and date.

### Endpoint

```http theme={null}
GET https://us-central1-industrialpmr.cloudfunctions.net/admin/reports/shift
```

#### Query Parameters

| Parameter | Type | Required | Description |
| :- | :- | :- | :- |
| `date` | string (YYYY-MM-DD) | Yes | Calendar date to query (e.g., `2026-10-27`). |
| `shift` | string | Yes | Shift identifier (`A`, `B`, or `C`). |
| `department` | string | No | Optional departmental filter code. |

#### Sample Response

```json theme={null}
{
  "success": true,
  "data": {
    "date": "2026-10-27",
    "shift": "A",
    "supervisor": "Shakir",
    "total_shots": 12840,
    "total_pieces": 12840,
    "total_energy_kwh": 482.5,
    "total_material_kg": 245.8,
    "floor_oee_percentage": 88.4,
    "machines": [
      {
        "id": "plastisol_imm01",
        "name": "NISSEI 120",
        "shots": 2840,
        "mold": "TEST_FILAMENT",
        "on_time_hours": 9.2,
        "idle_time_hours": 0.5,
        "off_time_hours": 0.3,
        "oee": 91.2
      }
    ],
    "downtime_summary": [
      { "category": "Tooling & Mold", "duration_minutes": 18 },
      { "category": "Material Starvation", "duration_minutes": 12 }
    ]
  },
  "timestamp": 1713802000
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.