Skip to content

createPart

POST
/parts
curl --request POST \
--url https://app.dev.buildtrace.eu/api/parts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "code": "example", "name": "example", "kind": "example", "stockUom": "example" }'

Required scope: parts:write.

Media typeapplication/json
object
code
required
string
name
required
string
kind
required
string
stockUom
required
string

Example generated

{
"code": "example",
"name": "example",
"kind": "example",
"stockUom": "example"
}

Created

Media typeapplication/json
object
id
required
string format: uuid
code
required
string
name
required
string
kind
required
string
lifecycle
required
string
stockUom
required
string
tags
required
Array<string>

Example generated

{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"code": "example",
"name": "example",
"kind": "example",
"lifecycle": "example",
"stockUom": "example",
"tags": [
"example"
]
}

Bad request

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}

Unauthorized

A part with this code already exists in the workspace

Media typeapplication/json
object
error
required
string

Example generated

{
"error": "example"
}