Assign operator by time
Assign an operator to the shift that machine machineId was running at start, from start on.
Use it to record who ran a machine after the fact, for example a day later from a planning system,
when you know the machine and the time but not the shift id (GET /v1/shifts lists the ids). For a
live shift at a floor terminal, POST /v1/realtime/{machine_id}/operator is the shorter call.
How operator assignments add up. Each shift keeps a timeline of who ran the machine. An
assignment means "from start on, this operator runs the machine": it lasts until the end of the
shift, or until the next assignment.
- First assignment. If nobody is assigned to the shift yet, the operator covers the whole
shift, from its first minute, even when
startis later. - Later assignments. Each one splits the timeline at
start: whoever held the machine keeps it untilstart, and the new operator takes it fromstartto the end of the shift. - Order matters. Send assignments in chronological order. A
startearlier than the shift's latest change is rejected with400, so you cannot insert an operator in the middle afterwards. Astartequal to the latest change replaces the operator who took over then. - Retries are safe. Sending the same assignment again changes nothing.
startis rounded down to the minute.
For example, for a Morning shift from 06:00 to 14:00 with nobody assigned yet:
| Request | Timeline after it |
|---|---|
| operator 1063 from 10:00 | 1063 06:00–14:00 (the first assignment covers the whole shift) |
| operator 2071 from 10:00 | 1063 06:00–10:00, 2071 10:00–14:00 |
| operator 3300 from 12:00 | 1063 06:00–10:00, 2071 10:00–12:00, 3300 12:00–14:00 |
| operator 4410 from 08:00 | Rejected with 400: 08:00 is before the latest change, 12:00 |
To record a shift that had several operators, send the first from the start of the shift, then the others in the order they took over.
Operator metrics for the shift are recalculated in the background, so reports may take a moment to show the change.
Errors:
400: no shift matches, orstartis outside the shift, in the future, or before the shift's latest operator change.403: the shift has production marked as reviewed, which locks it.404: the operator does not exist in your company.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/v1/shifts/operator" \ -H "Content-Type: application/json" \ -d '{ "machineId": 12, "operatorId": 1063, "start": "2026-10-12T10:00:00Z" }'{ "shiftId": 48213, "machineId": 12, "operatorId": 1063, "start": "2026-10-12T10:00:00Z"}Set shift targets PUT
Set the production target of existing shifts, for upcoming or past days. The body is a JSON **array** of up to 1,000 rows, so a whole plan (or a CSV export of one) fits in one call. Each row names a shift by its machine (`uuid` or `name`), the `date` it starts on in the company's timezone, and its `title` (for example `Morning`). Sending the same values again is harmless: the target is overwritten, not added to. Every row comes back with a `status`, and only `updated` rows changed anything: * `updated`: the shift's target is now `targetQuantity`. * `machineNotFound` / `ambiguousMachine`: no machine, or more than one, matches `machine`. * `shiftNotFound` / `ambiguousShift`: the machine has no shift, or more than one, with that title starting on that date. * `duplicateShift`: another row in the same request points at the same shift, so neither was applied. Targets are read live from the shift, so realtime and shift views show the new value right away. Nothing is recalculated: the target is not an input to OEE.
Assign shift operator POST
Assign an operator to a shift by its id (as returned by `GET /v1/shifts`), including shifts that have already ended. Without `start`, the operator takes over from the start of the shift. **How operator assignments add up.** Each shift keeps a timeline of who ran the machine. An assignment means "from `start` on, this operator runs the machine": it lasts until the end of the shift, or until the next assignment. * **First assignment.** If nobody is assigned to the shift yet, the operator covers the **whole shift**, from its first minute, even when `start` is later. * **Later assignments.** Each one splits the timeline at `start`: whoever held the machine keeps it until `start`, and the new operator takes it from `start` to the end of the shift. * **Order matters.** Send assignments in chronological order. A `start` earlier than the shift's latest change is rejected with `400`, so you cannot insert an operator in the middle afterwards. A `start` equal to the latest change replaces the operator who took over then. * **Retries are safe.** Sending the same assignment again changes nothing. * `start` is rounded down to the minute. For example, for a `Morning` shift from 06:00 to 14:00 with nobody assigned yet: | Request | Timeline after it | | --- | --- | | operator 1063 from 10:00 | 1063 06:00–14:00 (the first assignment covers the whole shift) | | operator 2071 from 10:00 | 1063 06:00–10:00, 2071 10:00–14:00 | | operator 3300 from 12:00 | 1063 06:00–10:00, 2071 10:00–12:00, 3300 12:00–14:00 | | operator 4410 from 08:00 | Rejected with `400`: 08:00 is before the latest change, 12:00 | To record a shift that had several operators, send the first from the start of the shift, then the others in the order they took over. Operator metrics for the shift are recalculated in the background, so reports may take a moment to show the change. Errors: * `400`: no shift matches, or `start` is outside the shift, in the future, or before the shift's latest operator change. * `403`: the shift has production marked as reviewed, which locks it. * `404`: the operator does not exist in your company.