Skip to content

completeBuildOrder

POST
/build-orders/{id}/complete
curl --request POST \
--url https://app.dev.buildtrace.eu/api/build-orders/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "expectedVersion": 1 }'

Required scope: production:write.

id
required
string format: uuid
Media typeapplication/json
object
expectedVersion

Optional optimistic-lock guard. When supplied and it does not match the build order’s current version, the operation returns 409 with the current version so the caller can retry.

integer

Example generated

{
"expectedVersion": 1
}

OK

Media typeapplication/json
object
id
required
string format: uuid
orderNumber
required

The order’s number within the organization, e.g. BO-0001

string
assemblyRevisionId
required
string format: uuid
targetQty
required
integer
consumeFromLocationId
string format: uuid
produceToLocationId
string format: uuid
status
required
string
version
required
integer
partCode

Code of the assembly’s part (read-only; populated by list/detail reads).

string
partName

Name of the assembly’s part (read-only; populated by list/detail reads).

string
revisionLabel

Label of the assembly revision (read-only; populated by list/detail reads).

string
consumeFromLocationCode

Code of the consume-from location (read-only; populated by list/detail reads).

string
consumeFromLocationName

Name of the consume-from location (read-only; populated by list/detail reads).

string
produceToLocationCode

Code of the produce-to location (read-only; populated by list/detail reads).

string
produceToLocationName

Name of the produce-to location (read-only; populated by list/detail reads).

string

Example generated

{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"orderNumber": "example",
"assemblyRevisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"targetQty": 1,
"consumeFromLocationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"produceToLocationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"status": "example",
"version": 1,
"partCode": "example",
"partName": "example",
"revisionLabel": "example",
"consumeFromLocationCode": "example",
"consumeFromLocationName": "example",
"produceToLocationCode": "example",
"produceToLocationName": "example"
}

Unauthorized

Not found

Conflict

Media typeapplication/json
object
error
required
string
currentVersion
required
integer

Example generated

{
"error": "example",
"currentVersion": 1
}