API Playground

Create one or more entities. This playground calls the live API and will create real data.

Authentication Required

You need to Login to test the API playground

Create entity

Create one or more entities from product codes (or from raw content), then enrich them asynchronously.

Provide one or more codes (e.g. EAN/GTIN) together with the target countries; each entity is queued for creation and AI enrichment. You can also create a single entity from raw content by sending description and/or images instead of a code. When no code is supplied an internal unique code is generated.

When more than one code is sent, no other per-entity details (sku, title, brand, description, images, …) may be included — those apply to single-entity creation only.

Note: This endpoint consumes enrichment credits. Entities are created asynchronously — the response confirms they were queued.
Endpoint URL
POST https://api.commerceclarity.com/api/2026-05/entities/create

Body parameters

ParameterTypeRequiredDescription
codesstringconditionalOne or more product codes (EAN/GTIN). Separate multiple codes with commas. Required unless description or images is provided.
countriesarrayRequiredTarget countries — array of 2-letter ISO codes (e.g. ["it","fr"]).
skustringOptionalCustomer SKU (single-entity creation only).
product_handlestringOptionalURL handle/slug (single-entity creation only).
titlestringOptionalEntity title (single-entity creation only).
brandstringOptionalBrand/vendor name (single-entity creation only).
imagesarrayconditionalArray of image URLs. Required unless codes or description is provided.
descriptionstringconditionalSource description. Required unless codes or images is provided.
notesstringOptionalFree-form notes passed to the enrichment workflow.
brand_idstringOptionalTarget brand (admin only). Defaults to the active brand.

Request Examples

curl -X POST "https://api.commerceclarity.com/api/2026-05/entities/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/2026-05/entities/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/2026-05/entities/create', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${apiToken}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    codes: '8001841001234',
    countries: ['it']
  })
});

const data = await response.json();

Response Example

Success Response (201)
{
  "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": []
  }
}
Partial success (207)
{
  "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" }
    ]
  }
}
Error Response - Validation (422)
{
  "status": "error",
  "code": "validation_failed",
  "errors": {
    "countries": ["The countries field is required."]
  }
}