Machines · v1
assignMachine
MockMock. This operation is part of the approved contract but its module is not built yet. Run Core with N1_API_MODE=mock N1_DEV_AUTH=stub to get deterministic demo-shop data from it. The real server answers NOT_IMPLEMENTED until it ships; the schema and examples here will not change when it does.
Run a job operation on a machine
Run a job operation on a machine; the machine becomes RUNNING. This records where the step runs and does not start it: the step keeps its status until Flow moves it (ADV-275). Owner, admin and supervisor. MACHINE_IN_USE if it already has an open assignment, VALIDATION_FAILED if it is under maintenance or the step is done, JOB_OPERATION_NOT_FOUND for an unknown step.
/graphqlapp audienceWho can call this. Owner, admin, supervisor.
Headers
Bearer <token>, issued for this endpoint's audience. The token decides the shop and roles; nothing in the request body can change them.Example:
Bearer eyJhbGciOiJFZERTQSJ9…Always
application/json. Only POST is accepted.Example:
application/jsonA key you generate once per user action (a UUID). Retrying with the same key never applies the change twice.
Example:
0192f0c1-9b2a-7d40-8c3e-1f5a6b7c8d9eYour id for this request (8–128 characters of A–Z a–z 0–9 . _ : -). Echoed back in the response header and in every error, so you can quote it when reporting a problem. Core makes one if you send none.
Example:
app-7f3c2a9e-checkout
Arguments
The machine id.
Example:
"0192f0c1-0000-7000-8000-000000d40005"The step to run (
JobOperation.id).Example:
"0192f0c1-0000-7000-8000-000000d300e7"
Returns
Run a job operation on a machine; the machine becomes RUNNING. This records where the step runs and does not start it: the step keeps its status until Flow moves it (ADV-275). Owner, admin and supervisor.
MACHINE_IN_USEif it already has an open assignment,VALIDATION_FAILEDif it is under maintenance or the step is done,JOB_OPERATION_NOT_FOUNDfor an unknown step.Show children
code machine detail.
UTC time the machine was added.
Example:
"2026-06-14T08:30:00.000Z"The open assignment, or null when the machine is not running a job.
Example:
{"id":"0192f0c1-0000-7000-8000-e00000000001","jobOperationId":"0192f0c1-0000-7000-8000-000000d300e7","jobCardId":"0192f0c1-0000-7000-8000-000000d20017","qrValue":"JC-00005","operationName":"Threading","startedAt":"2026-10-12T04:30:00.000Z"}Show children
Stable id (UUIDv7).
Example:
"0192f0c1-0000-7000-8000-e00000000001"The job card it belongs to.
Example:
"0192f0c1-0000-7000-8000-000000d20017"The step being run (
JobOperation.id).Example:
"0192f0c1-0000-7000-8000-000000d300e7"What the step does.
Example:
"Threading"That job card’s QR text.
Example:
"JC-00005"UTC time the machine was assigned.
Example:
"2026-10-12T04:30:00.000Z"
Current work, or null.
Stable id (UUIDv7).
Example:
"0192f0c1-0000-7000-8000-000000d40005"What sort of machine it is, such as “CNC lathe”.
Example:
"Vertical machining centre"location machine detail.
model machine detail.
The name the shop calls it, such as “Lathe 3”.
Example:
"Mill 2"notes machine detail.
What it is doing.
Example:
"RUNNING"IDLEFree to take a job operation.MAINTENANCEOut of service. It cannot be assigned work.RUNNINGHas an open assignment. Set byassignMachineandreleaseMachine, never by hand.
Machine category.
CNC_LATHECNC lathe.CNC_MILLCNC mill.INSPECTIONInspection.LATHELathe.PACKINGPacking.WELDINGWelding.
UTC time of the last change.
Example:
"2026-10-12T04:30:00.000Z"
Errors
| Code | HTTP | When |
|---|---|---|
MACHINE_IN_USE | 409 | Assigning a machine that is already running a job operation, setting one to maintenance, or deleting one that is. Release it first. |
VALIDATION_FAILED | 400 | Input failed Zod or route schema validation. details lists each field path and problem. |
VALIDATION_FAILED | 400 | Input failed Zod or route schema validation. details lists each field path and problem. |
JOB_OPERATION_NOT_FOUND | 404 | The operation id is unknown in this shop (another shop's ids answer the same). |
FORBIDDEN | 403 | Signed in, but the role or tenant does not allow the action. |
Every error has the same body. See Errors.
Rate limit tier
Tier: per user. Over the limit you get RATE_LIMITED (HTTP 429) with a Retry-After header. See Response handling.