# updateProductAttributes

## Overview

Updates a product's attribute value assignments. Accepts the full list of desired attribute-value pairs, computes the diff against current assignments, and assigns/removes as needed.

## Modules Commands Used

- `product-management.AssignAttributeValueToProduct` — assigns newly selected attribute values
- `product-management.RemoveAttributeValueFromProduct` — removes deselected attribute values

## Exception Handling

| Error Code | Source | Description |
| --- | --- | --- |
| PRODUCT_NOT_FOUND | AssignAttributeValueToProduct | The specified product does not exist |
| ATTRIBUTE_NOT_FOUND | AssignAttributeValueToProduct | A specified attribute does not exist |
| PRODUCT_ARCHIVED | AssignAttributeValueToProduct / RemoveAttributeValueFromProduct | The product is archived and cannot be modified |
| AXIS_STRUCTURE_LOCKED | AssignAttributeValueToProduct / RemoveAttributeValueFromProduct | The variant axis structure is locked because variants have been generated |
| INVALID_VALUE | AssignAttributeValueToProduct | The attribute value is invalid for the specified attribute |
| ASSIGNMENT_NOT_FOUND | RemoveAttributeValueFromProduct | The attribute assignment does not exist (silently ignored) |
