Reclassify a part
POST
/parts/{id}/reclassify
const url = 'https://app.buildtrace.eu/api/parts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reclassify';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"newKind":"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.buildtrace.eu/api/parts/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/reclassify \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "newKind": "example" }'Required scope: parts:write.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
newKind
required
string
Example generated
{ "newKind": "example"}Responses
Section titled “Responses”OK
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
Not found
The kind can’t change: a part with serialized units can’t become RAW, and a RAW part with stock on hand can’t become serialized (its lots would be lost)
Media typeapplication/json
object
error
required
string
Example generated
{ "error": "example"}