Skip to content

Set an ECO's work instruction

PUT
/ecos/{id}/work-instruction
curl --request PUT \
--url https://app.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" } ] } ] }'

Set an ECO’s work-instruction snapshot (DRAFT, PROCESS/BOTH ECOs only)

Required scope: ecos:write.

id
required
string format: uuid
Media typeapplication/json
object
requireAcknowledgment
required
boolean
tools
required
Array<string>
cautions
required
Array<string>
steps
required
Array<object>
object
sequence
required
integer
title
required
string
description
string
substeps
required

The lines a builder ticks off, in order. Each may name where in this step’s manual it is described.

Array<object>
object
text
required
string
locator

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.

string
<= 100 characters
components

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.

Array<object>
object
partId
required
string format: uuid
qty

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.

string
documentAttachmentId

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.

string format: uuid
documentLocator

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.

string
<= 100 characters
images

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.

Array<object>
<= 10 items
object
attachmentId
required
string format: uuid
altText
required

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.

string
>= 1 characters <= 300 characters
caption

Shown under the image. Optional.

string
<= 500 characters
filename

The attachment’s file name. Read from the attachment; ignored on input.

string
contentType

The attachment’s content type. Read from the attachment; ignored on input.

string
checksumSha256

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.

string

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"
}
]
}
]
}

OK

Media typeapplication/json
object
partRevisionId
required
string format: uuid
requireAcknowledgment
required
boolean
tools
required
Array<string>
cautions
required
Array<string>
steps
required
Array<object>
object
sequence
required
integer
title
required
string
description
string
substeps
required

The lines a builder ticks off, in order. Each may name where in this step’s manual it is described.

Array<object>
object
text
required
string
locator

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.

string
<= 100 characters
components

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.

Array<object>
object
partId
required
string format: uuid
qty

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.

string
documentAttachmentId

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.

string format: uuid
documentLocator

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.

string
<= 100 characters
images

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.

Array<object>
<= 10 items
object
attachmentId
required
string format: uuid
altText
required

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.

string
>= 1 characters <= 300 characters
caption

Shown under the image. Optional.

string
<= 500 characters
filename

The attachment’s file name. Read from the attachment; ignored on input.

string
contentType

The attachment’s content type. Read from the attachment; ignored on input.

string
checksumSha256

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.

string

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

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}

Unauthorized

ECO not found

The ECO is not a draft, or is a BOM-only ECO

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}