Test the product creation endpoint with your data.
Submit product data for creation and enrichment
The create product endpoint allows you to submit product codes (EAN, ASIN, MINSAN) or raw product data (title, brand, description, images) for creation and enrichment.
Each creation request will consume credits based on the requested services and the selected model.
POST https://api.commerceclarity.com/api/v1/products/create
| Parameter | Type | Required | Description |
|---|---|---|---|
codes |
string | Conditional | Product codes (EAN, ASIN, or MINSAN) separated by commas. Up to 100 codes can be specified in a single call if no other parameters (sku, product_handle, title, brand, images, description) are provided. If any of these parameters are included, only one code can be specified. Required if no description or images provided. |
sku |
string | Optional | Customer SKU for the product |
product_handle |
string | Optional | Customer product handle/slug |
title |
string | Optional | Product title |
brand |
string | Optional | Product brand |
images |
array | Conditional | Product images URLs (array) |
description |
string | Conditional | Product description |
notes |
string | Optional | Additional notes for product generation |
countries |
array | Required | Countries for which to create the product (required, array of ISO 2-letter codes) |
agent_model |
string | Optional | Agent model to use (v1 or v2, default: v2) |
Each API call to the analysis endpoint will consume credits from your account based on the requested services and the selected agent model.
| Component | Credits Used | Description |
|---|---|---|
| Agent Model v2 | 5 Content Credits | Product import with the alternative model |
| Agent Model v1 | 1 content credit | Product import with the basic model |
| Additional Country | +1 content credit | Each country beyond the first consumes 1 additional credit. |
| Image Standardization | +1 content credit | If enabled in user settings, consumes 1 credit per product. |
curl -X POST https://api.commerceclarity.com/api/v1/products/create \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"codes": "8001841001234",
"countries": ["it"],
"agent_model": "v2"
}'
curl -X POST https://api.commerceclarity.com/api/v1/products/create \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Premium Coffee Beans",
"brand": "CoffeeMax",
"description": "High quality arabica coffee beans",
"images": [
"https://example.com/image1.jpg",
"https://example.com/image2.jpg"
],
"countries": ["it", "fr"],
"agent_model": "v2"
}'
$client = new \GuzzleHttp\Client();
$response = $client->post('https://api.commerceclarity.com/api/v1/products/create', [
'headers' => [
'Authorization' => 'Bearer ' . $apiToken,
'Content-Type' => 'application/json',
],
'json' => [
'codes' => '8001841001234',
'countries' => ['it'],
'agent_model' => 'v2'
]
]);
$data = json_decode($response->getBody(), true);
const response = await fetch('https://api.commerceclarity.com/api/v1/products/create', {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiToken}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
codes: '8001841001234',
countries: ['it'],
agent_model: 'v2'
})
});
const data = await response.json();
{
"status": "success",
"message": "All 1 product(s) successfully queued for import",
"data": {
"total_requested": 1,
"successful": 1,
"failed": 0,
"imported_products": [
{
"code": "8001841001234",
"status": "queued"
}
],
"failures": []
}
}
{
"status": "success",
"message": "All 3 product(s) successfully queued for import",
"data": {
"total_requested": 3,
"successful": 3,
"failed": 0,
"imported_products": [
{
"code": "8001841001234",
"status": "queued"
},
{
"code": "8001841001235",
"status": "queued"
},
{
"code": "8001841001236",
"status": "queued"
}
],
"failures": []
}
}
{
"status": "partial",
"message": "Imported 2 of 3 product(s), 1 failed",
"data": {
"total_requested": 3,
"successful": 2,
"failed": 1,
"imported_products": [
{
"code": "8001841001234",
"status": "queued"
},
{
"code": "8001841001235",
"status": "queued"
}
],
"failures": [
{
"code": "invalid_code",
"reason": "product_code_invalid",
"message": "The provided code is not valid"
}
]
}
}
{
"status": "error",
"code": "validation_failed",
"errors": {
"countries": [
"The countries field is required."
]
}
}