Set an ECO's work-instruction snapshot (DRAFT, PROCESS/BOTH ECOs only)
const url = 'https://app.dev.buildtrace.eu/api/ecos/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/work-instruction';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"requireAcknowledgment":true,"tools":["example"],"cautions":["example"],"steps":[{"sequence":1,"title":"example","description":"example","substeps":[{"text":"example","locator":"example"}],"components":[{"partId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","qty":"example"}],"documentAttachmentId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","documentLocator":"example","images":[{"attachmentId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","altText":"example","caption":"example"}]}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://app.dev.buildtrace.eu/api/ecos/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/work-instruction \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "requireAcknowledgment": true, "tools": [ "example" ], "cautions": [ "example" ], "steps": [ { "sequence": 1, "title": "example", "description": "example", "substeps": [ { "text": "example", "locator": "example" } ], "components": [ { "partId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "qty": "example" } ], "documentAttachmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "documentLocator": "example", "images": [ { "attachmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "altText": "example", "caption": "example" } ] } ] }'Required scope: ecos:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
The lines a builder ticks off, in order. Each may name where in this step’s manual it is described.
object
Where in the step’s manual this substep is described, e.g. “p.14” or “§3.2” — the same free text as the step’s documentLocator, at most 100 characters. Kept only when the step cites a manual (documentAttachmentId): on a step without one it is accepted and dropped, as documentLocator is. Omitted when the substep names no page. A “p.N” locator lets the operator’s manual pane jump to page N as they work.
BOM components this step concerns. Optional: inspection and finishing steps name none. Every part must be a child part on the step’s revision BOM, validated on save.
object
How many of this component the step handles, as a decimal string. Omitted for the common case where the step covers the whole BOM quantity — which is not the same as zero.
Attachment holding the manual this step follows — typically on the child part (a supplier manual) or on the revision (a process document). A step cites an attachment; attachments are never linked to a step, because step ids are regenerated on every save.
Where to look in the document, e.g. “p.14”. Free text, pointed at a human, and deliberately unverified. Only meaningful alongside documentAttachmentId. At most 100 characters.
Photos and diagrams shown with this step, in display order. Each cites an image attachment (PNG, JPEG or WebP by its content, at most 10 MiB) — normally a PHOTO on the assembly’s part. Replaced wholesale on every save, like the rest of the step. An image in use by any process or built unit cannot be deleted.
object
What the image shows, announced by screen readers in its place. Required: an image an operator needs to see is one a screen-reader user needs described.
Shown under the image. Optional.
The attachment’s file name. Read from the attachment; ignored on input.
The attachment’s content type. Read from the attachment; ignored on input.
The attachment’s SHA-256. Read from the attachment; ignored on input. A built unit’s frozen process records it, so the record names the exact bytes the builder was shown.
Example generated
{ "requireAcknowledgment": true, "tools": [ "example" ], "cautions": [ "example" ], "steps": [ { "sequence": 1, "title": "example", "description": "example", "substeps": [ { "text": "example", "locator": "example" } ], "components": [ { "partId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "qty": "example" } ], "documentAttachmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "documentLocator": "example", "images": [ { "attachmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "altText": "example", "caption": "example" } ] } ]}Responses
Section titled “Responses”OK
object
object
The lines a builder ticks off, in order. Each may name where in this step’s manual it is described.
object
Where in the step’s manual this substep is described, e.g. “p.14” or “§3.2” — the same free text as the step’s documentLocator, at most 100 characters. Kept only when the step cites a manual (documentAttachmentId): on a step without one it is accepted and dropped, as documentLocator is. Omitted when the substep names no page. A “p.N” locator lets the operator’s manual pane jump to page N as they work.
BOM components this step concerns. Optional: inspection and finishing steps name none. Every part must be a child part on the step’s revision BOM, validated on save.
object
How many of this component the step handles, as a decimal string. Omitted for the common case where the step covers the whole BOM quantity — which is not the same as zero.
Attachment holding the manual this step follows — typically on the child part (a supplier manual) or on the revision (a process document). A step cites an attachment; attachments are never linked to a step, because step ids are regenerated on every save.
Where to look in the document, e.g. “p.14”. Free text, pointed at a human, and deliberately unverified. Only meaningful alongside documentAttachmentId. At most 100 characters.
Photos and diagrams shown with this step, in display order. Each cites an image attachment (PNG, JPEG or WebP by its content, at most 10 MiB) — normally a PHOTO on the assembly’s part. Replaced wholesale on every save, like the rest of the step. An image in use by any process or built unit cannot be deleted.
object
What the image shows, announced by screen readers in its place. Required: an image an operator needs to see is one a screen-reader user needs described.
Shown under the image. Optional.
The attachment’s file name. Read from the attachment; ignored on input.
The attachment’s content type. Read from the attachment; ignored on input.
The attachment’s SHA-256. Read from the attachment; ignored on input. A built unit’s frozen process records it, so the record names the exact bytes the builder was shown.
Example generated
{ "partRevisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "requireAcknowledgment": true, "tools": [ "example" ], "cautions": [ "example" ], "steps": [ { "sequence": 1, "title": "example", "description": "example", "substeps": [ { "text": "example", "locator": "example" } ], "components": [ { "partId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "qty": "example" } ], "documentAttachmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "documentLocator": "example", "images": [ { "attachmentId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "altText": "example", "caption": "example" } ] } ]}Bad request
object
Example generated
{ "error": "example"}Unauthorized
ECO not found
The ECO is not a draft, or is a BOM-only ECO
object
Example generated
{ "error": "example"}