# createItem

## Overview

Creates a new item and activates it in a single transaction. The item is created in DRAFT status and immediately transitioned to ACTIVE.

## Modules Commands Used

- [item-management] CreateItem
- [item-management] ActivateItem

## Exception Handling

| Error Code | Description |
| --- | --- |
| ITEM_MANAGEMENT_DUPLICATE_SKU | An item with this SKU already exists |
| ITEM_MANAGEMENT_DUPLICATE_BARCODE | An item with this barcode already exists |
| ITEM_MANAGEMENT_UNIT_NOT_FOUND | The specified unit does not exist or is inactive |
| ITEM_MANAGEMENT_ITEM_NOT_FOUND | Item was not found during activation |
| ITEM_MANAGEMENT_INVALID_STATE_TRANSITION | Item is not in a valid state for activation |
