Set shift targets

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.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Itemsitems <= 1000
[index: integer]?

Response Body

application/json

application/json

Try it live
PUT
/v1/shifts/targets

This endpoint requires authentication — paste a token in the Authorization section below.

curl -X PUT "https://example.com/v1/shifts/targets" \  -H "Content-Type: application/json" \  -d '[    {      "machine": {},      "date": "2026-10-12",      "title": "Morning",      "targetQuantity": 1200    }  ]'
[  {    "machine": {      "uuid": "0190c1c2-7a3e-7cc1-9b2f-1d2e3f4a5b6c",      "name": "Line 1"    },    "date": "2026-10-12",    "title": "Morning",    "targetQuantity": 1200,    "status": "updated",    "machineId": 12,    "shiftId": 48213  }]