Update item
curl --request PATCH \
--url https://api.poelis.com/v1/public/items/{item_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"part_number": "<string>",
"key": "<string>",
"parent_item_id": "<string>"
}
'import requests
url = "https://api.poelis.com/v1/public/items/{item_id}"
payload = {
"name": "<string>",
"description": "<string>",
"part_number": "<string>",
"key": "<string>",
"parent_item_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
part_number: '<string>',
key: '<string>',
parent_item_id: '<string>'
})
};
fetch('https://api.poelis.com/v1/public/items/{item_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"createdBy": {
"id": "auth0|550e8400-e29b-41d4-a716-446655440000",
"imageUrl": "https://example.com/avatar.png",
"userName": "Jane Doe"
},
"deleted": false,
"id": "770e8400-e29b-41d4-a716-446655440000",
"key": "compressor-stage-1",
"name": "Compressor Stage 1",
"part_number": "CS1-001",
"product_id": "660e8400-e29b-41d4-a716-446655440000",
"readable_id": "compressor-stage-1"
}{
"error": "unauthorized",
"message": "Invalid or missing API key"
}{
"error": "forbidden",
"message": "Access denied"
}{
"error": "not_found",
"message": "Not found"
}{
"error": "validation_error",
"message": "Invalid data format",
"details": {
"errors": [
{
"loc": [
"body",
"field_name"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}
}{
"error": "rate_limit_exceeded",
"message": "Too many requests"
}Items
Update item
Update an item’s metadata (name, description, key, parent_item_id).
Only draft items can be updated. Only fields provided in the request will be updated.
Part numbers
part_number supports assign/remove only: pass a string to assign when empty, or null
to remove (retire) the current one. Changing to a different string without removing first
returns 422 (PART_NUMBER_ALREADY_ASSIGNED). When the product has a counter rule
in the app, send the value from POST /v1/public/products/{product_id}/part-number-preview.
Any other value returns 422 (PART_NUMBER_NOT_NEXT) with expected_part_number.
PATCH
/
v1
/
public
/
items
/
{item_id}
Update item
curl --request PATCH \
--url https://api.poelis.com/v1/public/items/{item_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"part_number": "<string>",
"key": "<string>",
"parent_item_id": "<string>"
}
'import requests
url = "https://api.poelis.com/v1/public/items/{item_id}"
payload = {
"name": "<string>",
"description": "<string>",
"part_number": "<string>",
"key": "<string>",
"parent_item_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
part_number: '<string>',
key: '<string>',
parent_item_id: '<string>'
})
};
fetch('https://api.poelis.com/v1/public/items/{item_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"createdBy": {
"id": "auth0|550e8400-e29b-41d4-a716-446655440000",
"imageUrl": "https://example.com/avatar.png",
"userName": "Jane Doe"
},
"deleted": false,
"id": "770e8400-e29b-41d4-a716-446655440000",
"key": "compressor-stage-1",
"name": "Compressor Stage 1",
"part_number": "CS1-001",
"product_id": "660e8400-e29b-41d4-a716-446655440000",
"readable_id": "compressor-stage-1"
}{
"error": "unauthorized",
"message": "Invalid or missing API key"
}{
"error": "forbidden",
"message": "Access denied"
}{
"error": "not_found",
"message": "Not found"
}{
"error": "validation_error",
"message": "Invalid data format",
"details": {
"errors": [
{
"loc": [
"body",
"field_name"
],
"msg": "field required",
"type": "value_error.missing"
}
]
}
}{
"error": "rate_limit_exceeded",
"message": "Too many requests"
}Body
application/json
Request to update an item.
Response
Updated item
Public representation of an item.