Skip to content

Create a build order

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

Required scope: production:write.

Media typeapplication/json
object
assemblyRevisionId
required
string format: uuid
targetQty
required
integer
consumeFromLocationId
required

Where the order’s materials are reserved and consumed from.

string format: uuid
produceToLocationId
string format: uuid

Example generated

{
"assemblyRevisionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"targetQty": 1,
"consumeFromLocationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"produceToLocationId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Created

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

Bad request

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}

Unauthorized

Not found

Conflict: the assembly, or a part on its effective BOM, is OBSOLETE; or none of the next numbers from the numbering scheme is free (a template change made it produce numbers already issued). The message says which, and how to get past it.

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}