--- title: CartCodeDiscountAllocation - Storefront API description: | A discount allocation applied to a cart line when a customer enters a [discount code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes). api_version: unstable api_name: storefront source_url: html: https://shopify.dev/docs/api/storefront/unstable/objects/cartcodediscountallocation md: https://shopify.dev/docs/api/storefront/unstable/objects/cartcodediscountallocation.md --- # Cart​Code​Discount​Allocation object A discount allocation applied to a cart line when a customer enters a [discount code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes). ## Fields * code [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) non-null The code used to apply the discount. * discount​Application [Cart​Discount​Application!](https://shopify.dev/docs/api/storefront/unstable/objects/CartDiscountApplication) non-null The discount that have been applied on the cart line. * discounted​Amount [Money​V2!](https://shopify.dev/docs/api/storefront/unstable/objects/MoneyV2) non-null The discounted amount that has been applied to the cart line. * target​Type [Discount​Application​Target​Type!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationTargetType) non-null The type of line that the discount is applicable towards. *** ## Map No referencing types *** ## Interfaces * [Cart​Discount​Allocation](https://shopify.dev/docs/api/storefront/unstable/interfaces/CartDiscountAllocation) interface *** ## CartCodeDiscountAllocation Implements ### Implements * [Cart​Discount​Allocation](https://shopify.dev/docs/api/storefront/unstable/interfaces/CartDiscountAllocation)