# Get efficiency by module
URL: https://docs.fluenta.io/en/docs/reference/analytics/get-efficiency-by-module
Operation: `getEfficiencyByModule`
Required permission: `read`

`GET /v1/external/organizations/{organizationId}/analytics/efficiency/modules`

Reportes › Eficiencia for one plant day, módulo by módulo: units, meta, efficiency and pausas.

What it is: the table of the dashboard’s «Reportes», tab «Eficiencia», for one plant day: one row per «módulo» (a production line) with the `units` every one of its «puestos» made, the `goal` (the sum of each «puesto»’s «meta» for each hour it worked), the `efficiency` and the day’s «pausas» (`pausedMinutes`, `pauses`). `modules` is ordered by name; a «módulo» with only «pausas» that day is a row too, and one with nothing is no row.

The dashboard’s table groups by the «módulo»’s name, and so does this: two «módulos» that share a name are one row, whose `moduleId` is then null. `getEfficiency` with `groupBy=module` keeps them apart by id.

`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.

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. `day` is optional: without it, the plant’s today on the organization’s own clock, as on every single-day route of the API externa; the answer’s `day` says which day was read.

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

See also: `getDayReport` for the same day with each «módulo» hour by hour; `getBillingByModule` for the day’s «Facturación» by «módulo».

### 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 |
| --- | --- | --- | --- | --- |
| `day` | query | string | no | Plant day, YYYY-MM-DD on the plant’s clock. Omitted: the plant’s today, on its own clock. |
| `organizationId` | path | integer | yes | The organization, from `getMe` or `listOrganizations`. |

### Responses

| Status | Description |
| --- | --- |
| `200` | The day’s «Eficiencia», one row per «módulo». |
| `400` | `INVALID_DAY`: `day` is not a real calendar day written `YYYY-MM-DD`. `INVALID_REQUEST`: a query parameter is missing, of the wrong type or outside its allowed values; `details` lists each one as `{field, message}`. 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: "reports"`: the organization’s plan lacks «Reportes» (Pro, a trial of Pro, an «exenta» organization and a Light of plan version 1 (`getPlan` `planVersion`) answer it; a Light of plan version 2 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. 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}/analytics/efficiency/modules' \
  -H 'Authorization: Bearer <your API token>'
```