--- title: CartCodeDiscountAllocation - Storefront API description: The discount that has been applied to the cart line using a discount code. api_version: 2024-10 api_name: storefront type: object api_type: graphql source_url: html: >- https://shopify.dev/docs/api/storefront/2024-10/objects/CartCodeDiscountAllocation md: >- https://shopify.dev/docs/api/storefront/2024-10/objects/CartCodeDiscountAllocation.txt --- # Cart​Code​Discount​Allocation object The discount that has been applied to the cart line using a discount code. ## Fields * code [String!](https://shopify.dev/docs/api/storefront/2024-10/scalars/String) non-null The code used to apply the discount. * discounted​Amount [Money​V2!](https://shopify.dev/docs/api/storefront/2024-10/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/2024-10/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/2024-10/interfaces/CartDiscountAllocation) interface *** ## ||-CartCodeDiscountAllocation Implements ### Implements * ||-[Cart​Discount​Allocation](https://shopify.dev/docs/api/storefront/2024-10/interfaces/CartDiscountAllocation)