Set day goals
setDayGoalsPermiso program
«Metas del día»: one referencia’s hourly goal for one day of a módulo, one rate all day or rates by minute. Answers the módulo’s day as `getHoursBoard` does.
/v1/external/organizations/{organizationId}/modules/{moduleId}/days/{day}/references/{referenceId}/goalAutorización
apiToken An API token created in Configuración › Tokens de API, or a connected app’s access token
En: header
Parámetros de ruta
A plant day, YYYY-MM-DD, on the organization’s clock: today or a past day, never a future one.
dateThe organization, from getMe or listOrganizations.
Encabezados
A fresh unique string per intended write (1 to 255 visible ASCII characters). Sent again unchanged only to retry THAT write after a timeout or a 409 IDEMPOTENCY_IN_PROGRESS: the stored answer comes back (Idempotency-Replayed: true) and nothing is written twice. The same key with another request is a 422 IDEMPOTENCY_KEY_REUSED.
1 <= length <= 255Cuerpo de la solicitud
application/json
Definiciones de TypeScript
Usa el tipo request body en TypeScript.
Respuestas
application/json
application/json
curl -X PUT "https://api.fluenta.io/v1/external/organizations/0/modules/0/days/2019-08-24/references/0/goal" \ -H "Authorization: Bearer fluenta_live_XXXX" \ -H "Content-Type: application/json" \ -d '{ "goal": 1 }'{ "moduleId": 0, "day": "2019-08-24", "rows": [ { "hour": 0, "minutes": 0, "goal": 0, "produced": 0, "entered": 0, "counted": 0, "countedByReference": [ { "referenceId": 0, "referenceName": "string", "counted": 0 } ], "countedAt": "2019-08-24T14:15:22Z", "countedBy": "string", "effectiveByReference": [ { "referenceId": 0, "referenceName": "string", "units": 0, "source": "manual" } ], "accDay": 0, "balanceDay": 0, "automaticAccDay": 0, "accReference": 0, "balanceReference": 0, "referenceId": 0, "referenceName": "string", "mixedReference": true, "efficiency": 0, "efficiencyAcc": 0, "met": true, "accReferenceToDate": 0, "balanceReferenceToDate": 0, "buckets": [ { "referenceId": 0, "referenceName": "string", "produced": 0 } ], "steps": [ { "step": 0, "name": "string", "done": 0, "expected": 0, "goal": 0, "minutes": 0 } ], "counting": 0 } ], "billingSlots": 0, "entrySlots": 0, "shift": { "hours": [ 0 ], "extraHour": 0, "endMin": 0, "window": { "firstHour": 0, "lastHour": 0, "extraHour": 0 } }, "totals": { "goal": 0, "produced": 0, "automatic": 0, "balance": 0, "efficiency": 0, "entered": 0 }, "references": [ { "id": 0, "name": "string", "total": 0, "goal": 0, "producedBefore": 0, "producedToDate": 0 } ], "dayGoals": [ { "referenceId": 0, "goal": 0, "steps": [ { "from": 0, "goal": 0 } ], "source": "manual" } ], "entriesByReference": [ { "referenceId": 0, "referenceName": "string", "total": 0, "enteredBefore": 0, "enteredToday": 0, "enteredToDate": 0, "producedToDate": 0, "inside": 0 } ]}