Create item
curl --request POST \
--url https://api.poelis.com/v1/public/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "<string>",
"name": "<string>",
"key": "<string>"
}
'import requests
url = "https://api.poelis.com/v1/public/items"
payload = {
"product_id": "<string>",
"name": "<string>",
"key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({product_id: '<string>', name: '<string>', key: '<string>'})
};
fetch('https://api.poelis.com/v1/public/items', 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
Create item
Create a new item in a product.
The item will be created with the provided name and key.
If parent_item_id is provided, the item will be created as a child of that item.
Optional part_number is validated when the product has format configuration in the app.
Part numbers
- 409: duplicate
part_numberwithin the organization (response includes conflicting entity details). - 422: value does not match the product’s configured format (
PART_NUMBER_FORMAT_MISMATCH), or is not the next generated number (PART_NUMBER_NOT_NEXT, body includesexpected_part_number). Get that number fromPOST /v1/public/products/{product_id}/part-number-preview.
POST
/
v1
/
public
/
items
Create item
curl --request POST \
--url https://api.poelis.com/v1/public/items \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"product_id": "<string>",
"name": "<string>",
"key": "<string>"
}
'import requests
url = "https://api.poelis.com/v1/public/items"
payload = {
"product_id": "<string>",
"name": "<string>",
"key": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({product_id: '<string>', name: '<string>', key: '<string>'})
};
fetch('https://api.poelis.com/v1/public/items', 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 create a new item.
Response
Created item
Public representation of an item.