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) |
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"]
}'
$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']
]
]);
$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']
})
});
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."
]
}
}