Skip to main content
The TaxonomyService class (accessed via client.taxonomy) allows you to browse and retrieve the hierarchical structure of your store’s product catalog. Each resource supports an image field for building visual navigation menus and category-based landing pages.

Category Management

listCategories

Retrieve all top-level product categories. This is the starting point for building navigation menus or mega-menus.

getCategory

Retrieve details for a single category, including its description and metadata.

Subcategory Management

Subcategories allow for more granular organization within a parent category (e.g., “Laptops” inside “Electronics”). Subcategories can be nested to arbitrary depth. Each subcategory has a parent_id: null means it sits directly under its category, while a non-null parent_id points to another subcategory — letting you model hierarchies like Shoes → Men's → Sneakers.

listSubcategories

Retrieve subcategories. By default this returns a flat, paginated list, which you can scope to a parent category and include images for each.
Response
Working with the hierarchy

getSubcategory

Retrieve details for a specific subcategory.
Response
Include direct children Pass include: 'children' to receive the subcategory’s direct child subcategories (one level down) nested under a children array — handy for lazily expanding a single node as the shopper drills into your navigation. The array is empty for a leaf subcategory.
include: 'children' returns only the immediate children. To pull a whole multi-level hierarchy in one call, use listSubcategories({ tree: true }) instead.
Include the ancestor breadcrumb chain Pass include: 'ancestors' to receive the chain of parent subcategories from the top-level subcategory down to the immediate parent, as an ancestors array ordered root-first — exactly the shape you need to render a breadcrumb (Home › Computers › Laptops › Gaming Laptops). The array is empty for a top-level subcategory.
You can combine both in one request — include: 'ancestors,children' returns the node with both its breadcrumb trail and its direct children, enough to render a full category page (breadcrumb + sub-navigation) from a single call.

Browsing Products

Once you have a category or subcategory ID, you can use it to filter products using the ProductsService.

Filter by Category

Filter by Subcategory

Filtering products by a subcategory automatically includes products in all of its nested subcategories. Requesting products for Shoes returns everything filed under Shoes → Men's → Sneakers as well, so a single call powers a parent-category landing page.

Combined Hierarchical Filter


Pro Navigation Tip: Use the image field to build high-performance visual navigation. By fetching categories with their images on initial app load, you can create immersive “Category Grids” or dynamic sidebars that make your store feel modern and alive.

Response Codes

All taxonomy endpoints are GET and accept both publishable and secret keys.