# createProductAttribute

## Overview

Creates a new product attribute (e.g., Color, Size) that can be used as a variant axis across products. Required inputs are `code` (globally unique) and `name`.

The resolver wraps the erp-kit `CreateProductAttribute` command.

## Modules Commands Used

- [product-management] CreateProductAttribute

## Exception Handling

| Error Code | Description |
| --- | --- |
| PRODUCT_MANAGEMENT_DUPLICATE_CODE | An attribute with this code already exists |
| PRODUCT_MANAGEMENT_MISSING_REQUIRED_FIELD | A required field (code or name) is missing |
