Skip to main content

Categories Overview

The Categories resource allows you to manage product categories in a hierarchical structure. Categories can have parent-child relationships, enabling you to organize products into main categories and subcategories.

Category Hierarchy

Categories support a parent-child hierarchy:
  • Main Categories: Categories without a parent (parentId is null)
  • Subcategories: Categories that belong to a parent category
You can retrieve main categories using /api/v1/categories/main and subcategories for a specific parent using /api/v1/categories/parent/{parentId}.

Category Object

A category contains the following information:
id
integer
required
Unique identifier for the category
name
string
required
The category name
description
string
Detailed description of the category
parentId
integer
ID of the parent category (null for main categories)
isActive
boolean
Whether the category is currently active
product_ids
array
List of product IDs associated with this category
subcategory_ids
array
List of subcategory IDs that belong to this category

Available Endpoints

CRUD Operations

Search and Filter

Common Use Cases

Creating a Category Hierarchy

  1. Create a main category (e.g., “Furniture”)
  2. Use the returned category ID as parentId when creating subcategories (e.g., “Tables”, “Chairs”)
  3. Retrieve the hierarchy using /main and /parent/{parentId} endpoints

Managing Active Categories

Categories have an isActive flag that allows you to enable or disable them without deletion. Use the /active endpoint to retrieve only active categories.

Build docs developers (and LLMs) love