createPart
POST
/parts
const url = 'https://app.dev.buildtrace.eu/api/parts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"code":"example","name":"example","kind":"example","stockUom":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”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"}Responses
Section titled “Responses”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"}