Create product
curl --request POST \
--url https://api.poelis.com/v1/public/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "<string>",
"name": "<string>",
"key": "<string>"
}
'import requests
url = "https://api.poelis.com/v1/public/products"
payload = {
"workspace_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({workspace_id: '<string>', name: '<string>', key: '<string>'})
};
fetch('https://api.poelis.com/v1/public/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"archived": false,
"baseline_version_number": 5,
"createdBy": {
"id": "auth0|550e8400-e29b-41d4-a716-446655440000",
"imageUrl": "https://example.com/avatar.png",
"userName": "Jane Doe"
},
"excludedStatusIds": [],
"id": "660e8400-e29b-41d4-a716-446655440000",
"key": "jet-engine-specs",
"name": "Jet Engine Specifications",
"owner": {
"id": "auth0|550e8400-e29b-41d4-a716-446655440000",
"imageUrl": "https://example.com/avatar.png",
"userName": "Jane Doe"
},
"part_number": "JE-1000-A",
"readable_id": "jet-engine-specs",
"status": {
"color": "#3b82f6",
"groupKey": "started",
"id": "770e8400-e29b-41d4-a716-446655440999",
"name": "In Progress"
},
"workspace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"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"
}Products
Create product
Create a new product in a workspace.
The product will be created with the provided name and key.
Optional part_number assigns a part number on create.
Part numbers
A new product has no generation rule. The rule is set on the product in the app.
After that, assign numbers with POST /v1/public/products/{product_id}/part-number-preview.
- 409: duplicate or retired
part_numberwithin the organization.
POST
/
v1
/
public
/
products
Create product
curl --request POST \
--url https://api.poelis.com/v1/public/products \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace_id": "<string>",
"name": "<string>",
"key": "<string>"
}
'import requests
url = "https://api.poelis.com/v1/public/products"
payload = {
"workspace_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({workspace_id: '<string>', name: '<string>', key: '<string>'})
};
fetch('https://api.poelis.com/v1/public/products', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"archived": false,
"baseline_version_number": 5,
"createdBy": {
"id": "auth0|550e8400-e29b-41d4-a716-446655440000",
"imageUrl": "https://example.com/avatar.png",
"userName": "Jane Doe"
},
"excludedStatusIds": [],
"id": "660e8400-e29b-41d4-a716-446655440000",
"key": "jet-engine-specs",
"name": "Jet Engine Specifications",
"owner": {
"id": "auth0|550e8400-e29b-41d4-a716-446655440000",
"imageUrl": "https://example.com/avatar.png",
"userName": "Jane Doe"
},
"part_number": "JE-1000-A",
"readable_id": "jet-engine-specs",
"status": {
"color": "#3b82f6",
"groupKey": "started",
"id": "770e8400-e29b-41d4-a716-446655440999",
"name": "In Progress"
},
"workspace_id": "550e8400-e29b-41d4-a716-446655440000"
}{
"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 product.
Response
Created product
Public representation of a product.