# Get module day history
URL: https://docs.fluenta.io/docs/reference/analytics/get-module-day-history
Operation: `getModuleDayHistory`
Required permission: `read`

`GET /v1/external/organizations/{organizationId}/modules/{moduleId}/days/{day}/history`

One módulo’s day, hour by hour and puesto by puesto: units, meta, efficiency, «Facturación» and pausas. The table of «Reportes por módulo».

What it is: the hour-by-hour table of «Reportes por módulo» for one «módulo» (a production line) on one plant day, the numbers the dashboard shows there. `hours` holds one entry per clock hour that had a «marca» or a «pausa», in order; each totals the hour (`units`, `goal`, `efficiency`, `billedAmount`, `secondsPerUnit`, `pausedMinutes`, `pauses`) and lists, in `rows`, one row per «puesto» and «referencia» worked in it. An hour with «pausas» and no «marca» has no rows.

How it is computed: a row’s `goal` is that «puesto»’s «meta» for the hour as it stood then (already shortened for «descansos», «pausas» and the edges of the «jornada»); the hour’s `goal` is the sum of its «puestos»’ and its `efficiency` is its `units` × 100 ÷ that `goal`.

`efficiency` is «Eficiencia»: units made × 100 ÷ the «meta» of the same span, a percentage with 2 decimals (100 = exactly the goal, it can pass 100; never a 0–1 ratio), null where the goal is 0. Every «puesto» counts towards it, a «puesto de salida» or not.

Money is «Facturación»: the units of the «puestos de salida» × the price per unit each was billed at, in the plant’s currency (`currency`, ISO 4217: `EUR` for a plant in España, `COP` for every other), in whole currency units with up to 2 decimals, never cents. Whether a money figure reads null or 0 where nothing was priced is stated on each field. A row’s `billedAmount` is null on a «puesto» that is not «de salida»; the hour’s is the sum over the ones that are.

Days and hours are the plant’s own: a plant day is a calendar day `YYYY-MM-DD` in the organization’s timezone (`getOrganization` `timezone`), never UTC, and an `hour` is the clock hour 0–23 that starts at it in that zone. The day is the path’s `day`, required.

Naming: each row’s `operationId` is its «puesto» (a numbered station of a «módulo»). A «puesto» is an `operation` in ids, filters and codes and a `station` in paths: the same number is the `id` `listStations` returns and the `stationId` of the station routes.

Plan: needs the plan feature `moduleReports` («Reportes por módulo»), the one its dashboard screen is gated by. Pro, a trial of Pro and an «exenta» organization answer it; a Light organization, of either plan version, does not: 403 `PLAN_LIMIT` with `feature: "moduleReports"`. `getPlan` `features` lists what the organization’s plan has.

See also: `getHoursBoard` for the same «módulo» and day as its «Tablero de producción» (typed counts, running totals), `getModuleEfficiency` for this «módulo» over a range, `getStationDayReport` for one of its «puestos».

### Authorization

- `apiToken` — Bearer token. An API token created in Configuración › Tokens de API, or a connected app’s access token

Send it as `Authorization: Bearer <your API token>`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `moduleId` | path | integer | yes | The «módulo» (a production line): the `id` of one from `listModules`. Unknown or of another organization: 404 `MODULE_NOT_FOUND`. |
| `day` | path | string (date) | yes | The plant day to read, `YYYY-MM-DD` on the organization’s own clock (its timezone, never UTC). Required here: it is part of the path. Not a real calendar day: 400 `INVALID_DAY`. |
| `organizationId` | path | integer | yes | The organization, from `getMe` or `listOrganizations`. |

### Responses

| Status | Description |
| --- | --- |
| `200` | The «módulo»’s day, hour by hour and «puesto» by «puesto». |
| `400` | `INVALID_DAY`: `day` is not a real calendar day written `YYYY-MM-DD`. Body: `{statusCode, code, message}`, the message in Spanish, for the usuario. |
| `401` | Missing, malformed, unknown, expired or revoked credential: `INVALID_API_TOKEN`. |
| `402` | The organization is blocked: `ORG_BLOCKED`. |
| `403` | `PLAN_LIMIT` with `feature: "moduleReports"`: the organization’s plan lacks «Reportes por módulo» (Pro, a trial of Pro and an «exenta» organization answer it; a Light organization, of either plan version, does not). `PLAN_LIMIT` with `feature: "aiConnector"`: a connected app reads an organization without «Conectar con IA». `INSUFFICIENT_SCOPE`: the credential lacks the «Permiso» `read`. Retrying does not help: the plan or the credential has to change. |
| `404` | `ORGANIZATION_NOT_FOUND`: the organization does not exist or is out of the credential’s reach. `MODULE_NOT_FOUND`: the «módulo» does not exist or is another organization’s. One body for a row that is missing and for one of another organization. |
| `429` | The credential is over its rate limit: `RATE_LIMITED`. Per credential, in fixed windows of 60 seconds: 60 requests in one organization on Light and 120 on Pro; 20 on the heavy reads (the range figures, the whole floor, the month and the pauses); 300 across every organization; 60 on the routes that name no organization. Wait `Retry-After` seconds; a refused request counts against nothing. |

### Example

```bash
curl -X GET 'https://api.fluenta.io/v1/external/organizations/{organizationId}/modules/{moduleId}/days/{day}/history' \
  -H 'Authorization: Bearer <your API token>'
```