A Discount Code can be added only if no [DirectDiscount](ctp:api:type:DirectDiscount) has been applied to the Cart.
For [frozen Carts](ctp:api:type:FrozenCarts), the [DiscountCodeState](ctp:api:type:DiscountCodeState) must be `DoesNotMatchCart` when adding a Discount Code.
The maximum number of Discount Codes in a Cart is restricted by a [limit](/../api/limits#carts).
Specific Error Code: [MatchingPriceNotFound](ctp:api:type:MatchingPriceNotFoundError)
Adds a DiscountCode to the Cart to activate the related Cart Discounts. If the related Cart Discounts are inactive or invalid, or belong to a different Store than the Cart, a DiscountCodeNonApplicableError is returned.