API Playground

Fetch the custom category tree of your active brand. This playground calls the live API with your account credentials.

Authentication Required

You need to Login to test the API playground

Get categories

Return the custom category tree configured for the active brand.

Categories are returned as a flat map keyed by category id. Each value is the full category path, with levels separated by >. The key encodes the hierarchy (e.g. 1.1 is a child of 1).

Endpoint URL
GET https://api.commerceclarity.com/api/2026-05/categories

Request Examples

curl -X GET "https://api.commerceclarity.com/api/2026-05/categories" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Response Example

Success Response
{
  "tree": {
    "1": "Category 1",
    "1.1": "Category 1 > Subcategory 1.1",
    "2": "Category 2"
  }
}
Error Response - Validation
{
  "error": "User not authenticated."
}

Response Structure

FieldTypeDescription
treeobjectMap of category id → full category path.
tree.{cat_id}stringFull path of the category, levels separated by >.