# 2025-12-17: Category Service - classification categories

## Overview

The Category Service now supports classification categories, allowing you to define categories with specific classification mixins that can be inherited by subcategories. This enables better product classification and attribute management throughout your category hierarchy.

Categories can now be designated as either `STANDARD` (default) or `CLASSIFICATION` types. Classification categories can define their own classification mixins, which are then inherited and combined with parent classification mixins in the category.

## What's new

### Category types

A new `type` field has been added to the category model with the following values:

* `STANDARD` - Regular category (default behavior)
* `CLASSIFICATION` - Category that can define classification mixins for product classification. The category of type `CLASSIFICATION` must have category code defined.

### Classification mixins

Classification categories support two new fields:

| Field                     | Description                                                                                                                                                                                                      |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ownClassificationMixins` | Classification mixins defined specifically for this category. Each mixin includes `name`, `schemaUrl`, and an optional `required` flag.                                                                          |
| `classificationMixins`    | Read-only field in responses containing the combined list of classification mixins inherited from parent categories plus the category's own mixins. Includes `sourceCategoryId` to identify the origin category. |

### Schema structure

**OwnClassificationMixin:**

* `name` - Name of the mixin (pattern: `^[a-zA-Z0-9_]\S*$`)
* `schemaUrl` - URL of the mixin schema (pattern: `^https?://[^\s/$.?#].\S*$`)
* `required` - Boolean indicating if the mixin is required

**ClassificationMixin (response only):**

* Includes all fields from OwnClassificationMixin
* `sourceCategoryId` - ID of the category where the mixin is defined
* `mixinPath` - The mixins path that should be used when defining attributes on a product. It's built based on the following pattern: `class_<sourceCategory.code>_<name>`.

## Updated endpoints

| Endpoint                                                                                                                                                                                                 | Description                                                                                                      |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
| [Creating a new category](https://developer.emporix.io/api-references/api-guides/catalogs-and-categories/category-tree/api-reference/category-resources#post-category-tenant-categories)                 | Now supports `type` field to specify category type and `ownClassificationMixins` for classification categories.  |
| [Upserting a category](https://developer.emporix.io/api-references/api-guides/catalogs-and-categories/category-tree/api-reference/category-resources#put-category-tenant-categories-categoryid)          | Now supports `type` field and `ownClassificationMixins` for classification categories.                           |
| [Retrieving a category details](https://developer.emporix.io/api-references/api-guides/catalogs-and-categories/category-tree/api-reference/category-resources#get-category-tenant-categories-categoryid) | Response now includes `ownClassificationMixins` and `classificationMixins` fields for classification categories. |
| [Retrieving a list of categories](https://developer.emporix.io/api-references/api-guides/catalogs-and-categories/category-tree/api-reference/category-resources#get-category-tenant-categories)          | Response now includes `ownClassificationMixins` and `classificationMixins` fields for classification categories. |
| [Searching for categories](https://developer.emporix.io/api-references/api-guides/catalogs-and-categories/category-tree/api-reference/category-resources#post-category-tenant-categories-search)         | Response now includes `ownClassificationMixins` and `classificationMixins` fields for classification categories. |

## Known problems

There are no known problems.

## Links

* [Category Tutorial](https://app.gitbook.com/s/d4POTWomuSS7d3dnh4Dg/api-guides/catalogs-and-categories/category-tree/category#classification)
* [Classification Tutorial](https://app.gitbook.com/s/d4POTWomuSS7d3dnh4Dg/api-guides/catalogs-and-categories/category-tree/classification)
