Introduction to CommerceClarity API

Overview of CommerceClarity APIs and their integration

CommerceClarity APIs provide a programmatic interface that allows you to interact with the platform, automate processes, and easily integrate CommerceClarity functionalities into your existing applications and workflows.

This documentation is designed to guide you through all available functionalities.

API Base URL
https://api.commerceclarity.com/api/2026-05

Main Features

Secure Authentication

All API requests are protected via Bearer Token authentication, ensuring that only authorized clients can access your data.

RESTful API

Our APIs follow RESTful principles, using standard HTTP methods and JSON response formats for easy integration with any development environment.

Rate Limiting System

We implement reasonable frequency limits to ensure optimal performance for all users. Critical endpoints are optimized for high loads.

Standardized Formats

All responses are in JSON format with consistent structures. Errors follow predictable patterns to simplify exception handling.

Quick Usage Guide

PHP Example (Guzzle)
<?php

require 'vendor/autoload.php';

use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;

// Initialize the API client
$client = new Client([
    'base_uri' => 'https://api.commerceclarity.com/api/2026-05/',
    'timeout'  => 10.0,
    'headers' => [
        'Authorization' => 'Bearer YOUR_API_TOKEN',
        'Accept' => 'application/json',
    ]
]);

// Make an API request
try {
    $response = $client->get('entities');
    $data = json_decode($response->getBody()->getContents(), true);
    
    // Process the data
    
} catch (RequestException $e) {
    if ($e->hasResponse()) {
        $errorResponse = json_decode($e->getResponse()->getBody()->getContents(), true);
        // Handle the error...
    }
}
JavaScript Example (Fetch)
const apiUrl = 'https://api.commerceclarity.com/api/2026-05/entities';
const token = 'YOUR_API_TOKEN';

// Make an API request
fetch(apiUrl, {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Accept': 'application/json'
  }
})
.then(response => {
  if (!response.ok) {
    throw new Error(`Status: ${response.status}`);
  }
  return response.json();
})
.then(data => {
  console.log('Received data:', data);
  // Process the data
})
.catch(error => {
  console.error('Error during the API request:', error);
});
Python Example (Requests)
import requests

api_url = 'https://api.commerceclarity.com/api/2026-05/entities'
token = 'YOUR_API_TOKEN'

headers = {
    'Authorization': f'Bearer {token}',
    'Accept': 'application/json'
}

# Make an API request
try:
    response = requests.get(api_url, headers=headers)
    response.raise_for_status()  # Raise an exception for HTTP 4XX/5XX responses
    
    data = response.json()
    
    # Process the data
    
except requests.exceptions.HTTPError as err:
    print(f'HTTP Error: {err}')
    if response.text:
        error_data = response.json()
        print(f'Error message: {error_data.get("message", "No message")}')
except requests.exceptions.RequestException as err:
    print(f'Request error: {err}')
cURL Example
# Make an API request
curl -X GET "https://api.commerceclarity.com/api/2026-05/entities" \
     -H "Authorization: Bearer YOUR_API_TOKEN" \
     -H "Accept: application/json"

Endpoint Categories

Category Description Use Cases
Entities Create, list, filter, update, delete, export and manage media for products (entities). Catalog synchronisation, bulk editing, feed exports.
Attributes Read and manage the brand's attribute definitions (global, family, essential). Schema discovery, building filters, attribute management.
Families Read and manage product families. Grouping products, scoping family attributes.
Categories Read the brand's custom category tree. Mapping products to categories.

Common Workflows

  1. Create: send product codes (and target countries) to Create entity. Entities are queued for AI enrichment.
  2. List / filter: use List / Query entities with the filter tree to retrieve enriched entities and their attributes.
  3. Edit: refine values with Update entity attribute and manage images with Upload media.
Entity creation and enrichment consume credits; all other read operations are free.

API Versioning

Currently, all CommerceClarity APIs are in the v1 version as specified in the URL.

Any future versions will be managed through specific HTTP headers or URL prefixes, maintaining backward compatibility for a reasonable period.

Supported Systems

CommerceClarity APIs are designed to be used with any programming language or framework capable of making HTTP requests. We provide code examples for the following languages and frameworks:

PHP (Guzzle)
JavaScript (Fetch/Axios)
Python (Requests)
cURL

Next Steps

Authentication

Learn how to authenticate your API requests with access tokens.

Go to Authentication
Create entity

Create entities from product codes and have them enriched automatically.

Go to Create entity
List / Query entities

Retrieve and filter your entities and their attributes with the declarative filter tree.

Go to List / Query entities

Assistance

Technical Support

If you have questions or encounter issues with the APIs, our support team is available to help. Fill out the support form available at this link including details about your request and any error messages received.