FluentaAPI
Analytics

Get operators activity

getOperatorsActivityPermission read

Analítica by operario for one plant day: each one’s units, pace, active hours, channels, efficiency and billing, with the totals.

GET/v1/external/organizations/{organizationId}/analytics/operators

What it is: «Analítica» by «operario» for one plant day, the per-person view of the dashboard’s «Reportes», tab «Analítica». operators holds one row per «operario» with production that day and totals the day; moduleId narrows both to one «módulo» and is echoed, null when not sent.

How it is computed: a person’s units, goal, efficiency, billableUnits and totalPrice follow their own «marcas», the same rule as the «Clasificación» (getLeaderboard), so the two agree about a person: goal is their share of the «meta» of each «puesto»-hour they marked in. eventUnits, activeHours, unitsPerHour, secondsPerUnitP50, idleGaps, online, offline, legacy and offlineShare come from the «marcas» log. «Marcas» registered with nobody seated belong to no row and are reported once, as totals.unattributedEventUnits.

Source: «Analítica» reads the «marcas» log (one row per unit an «operario» registered on the app, with its time and channel) beside the hourly buckets the reports are built from, so it can tell pace, connectivity and gaps that the reports cannot.

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. Here the money figure is totalPrice: what the person’s own «marcas» on a «puesto de salida» bill, null for someone who sat on none.

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 analytics («Analítica»), 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: "analytics". getPlan features lists what the organization’s plan has.

See also: getHourlyActivity with operatorId for one of these people hour by hour.

Authorization

apiToken
AuthorizationBearer <token>

An API token created in Configuración › Tokens de API, or a connected app’s access token

In: header

Path Parameters

organizationId*integer

The organization, from getMe or listOrganizations.

Query Parameters

day?string

The plant day to read, YYYY-MM-DD on the plant’s own clock (the organization’s timezone, never UTC). Omitted: the plant’s today on that clock; the answer’s day says which day was read. Not a real calendar day: 400 INVALID_DAY.

Match^\d{4}-\d{2}-\d{2}$
Lengthlength <= 10
moduleId?integer

Narrow the answer to one «módulo»: the id of one from listModules. Omitted: the whole plant. Of another organization or unknown: 404 MODULE_NOT_FOUND.

Range1 <= value <= 2147483647
idleMinutes?number

In minutes: a gap between two consecutive «marcas» longer than this counts as one «pausa sin registro» (idleGapsOverN, idleGaps). One of 5, 10 or 15; default 5. The answer echoes the value used.

Value in

  • 5
  • 10
  • 15

Response Body

application/json

application/json

curl -X GET "https://api.fluenta.io/v1/external/organizations/0/analytics/operators" \  -H "Authorization: Bearer fluenta_live_XXXX"
{  "moduleId": 0,  "operators": [    {      "operatorId": 0,      "operatorName": "string",      "units": 0,      "eventUnits": 0,      "activeHours": 0,      "unitsPerHour": 0,      "secondsPerUnitP50": 0,      "idleGaps": 0,      "online": 0,      "offline": 0,      "legacy": 0,      "offlineShare": 0,      "goal": 0,      "efficiency": 0,      "billableUnits": 0,      "totalPrice": 0    }  ],  "totals": {    "units": 0,    "eventUnits": 0,    "activeHours": 0,    "unitsPerHour": 0,    "idleGaps": 0,    "online": 0,    "offline": 0,    "legacy": 0,    "offlineShare": 0,    "goal": 0,    "efficiency": 0,    "billableUnits": 0,    "totalPrice": 0,    "operators": 0,    "unattributedEventUnits": 0,    "idleMinutesApplied": 0  },  "day": "string",  "currency": "string"}