# Cart Discounts Cart Discounts are used to change the Prices of different elements within a Cart. Cart Discounts are subject to a [limit](/api/limits.md#cart-discounts) in a Project. For an introduction to Cart Discounts and to understand how they work, see the [Cart Discounts overview](/api/pricing-and-discounts-overview.md#cart-discounts). Learn more about Cart Discounts in our self-paced Cart Discounts module. ## Representations #### CartDiscount [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscount). #### CartDiscountDraft [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountDraft). #### CartDiscountPagedQueryResponse [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountPagedQueryResponse). #### CartDiscountReference [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountReference). #### CartDiscountKeyReference [type definition](/api/projects/cartDiscounts.md?urn=ctp:import:type:CartDiscountKeyReference). #### CartDiscountResourceIdentifier [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountResourceIdentifier). #### CartDiscountValue The effect of the Discount on the specified [target](/api/projects/cartDiscounts.md#cartdiscounttarget). The discount can be a [relative](/api/projects/cartDiscounts.md#cartdiscountvaluerelative) or [absolute](/api/projects/cartDiscounts.md#cartdiscountvalueabsolute) Price value, a [fixed item Price](/api/projects/cartDiscounts.md#cartdiscountvaluefixed), or a [Gift Line Item](/api/projects/cartDiscounts.md#cartdiscountvaluegiftlineitem) added to a Cart. ##### CartDiscountValueRelative [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountValueRelative). With previous Discounts already applied, the target may already have a discounted Price. The Discount is then calculated based on the already discounted Price. ##### CartDiscountValueAbsolute [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountValueAbsolute). ##### CartDiscountValueFixed [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountValueFixed). ##### CartDiscountValueGiftLineItem A Gift Line Item is automatically added to the Cart when a [Discount Predicate](/api/predicates/predicate-operators.md) evaluates as true. The Gift Line Item has the following characteristics: - [LineItemMode](/urn?urn=ctp%3Aapi%3Atype%3ALineItemMode) `GiftLineItem` and a `quantity` of `1`. - Like all other Line Items, it has the `price` field set (it is, therefore, necessary that the Product Variant has a Price defined that [can be selected](/api/pricing-and-discounts-overview.md#line-item-price-selection) for each Cart the Discount should be applied to). - The `totalPrice` has a `centAmount` of `0`. - The `discountedPricePerQuantity` shows a `discountedPrice` with a `centAmount` of `0` and `includedDiscounts` references the Cart Discount that was evaluated to add the Gift Line Item. If the gift Line Item becomes invalid (for example when the referenced Product, Product Variant, or Channel has been deleted) since creation, or if a Price cannot be [selected](/api/pricing-and-discounts-overview.md#line-item-price-selection) for a Cart, the Discount does not apply to the Cart. [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountValueGiftLineItem). Gift Line Items are ignored by [MultiBuyLineItemsTarget](/api/projects/cartDiscounts.md#multibuylineitemstarget) and [CartDiscountPatternTarget](/api/projects/cartDiscounts.md#cartdiscountpatterntarget) discounts. #### CartDiscountValueDraft Defines the effect the Discount will have on the specified [target](/api/projects/cartDiscounts.md#cartdiscounttarget). You can define a [relative](/api/projects/cartDiscounts.md#cartdiscountvaluerelativedraft) or [absolute](/api/projects/cartDiscounts.md#cartdiscountvalueabsolutedraft) Discount value, a [fixed](/api/projects/cartDiscounts.md#cartdiscountvaluefixeddraft) item Price value, or a [Gift Line Item](/api/projects/cartDiscounts.md#cartdiscountvaluegiftlineitemdraft). ##### CartDiscountValueRelativeDraft [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountValueRelativeDraft). ##### CartDiscountValueAbsoluteDraft [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountValueAbsoluteDraft). For example, when an absolute Discount of €16 applies to all Line Items in a Cart: - If discounted proportionately, the discount is calculated (for a Line Item) by dividing the price of the Line Item by the total price of the Cart and multiplying (the rounded) value by the discount amount; in this case, for Line Item A, (14/54)\*16 = 4.16. - If discounted evenly, the discount amount is divided by the number of Line Items—in this case, 16/3—and that value is deducted from each Line Item with rounding. - If applied individually, the discount amount is deducted on every eligible Line item; negative values are rounded to zero, as seen for Line Item A. | Cart | Quantity | Price | Total price (tax-inclusive) | Proportionate distribution | Even distribution | Individual application | | :--- | :---: | :---: | :---: | :---: | :---: | :---: | | Line Item A | 1 | €14,00 | €14,00 | €9,84 | €8,67 | €0,00 | | Line Item B | 2 | €20,00 | €40,00 | €28.16 | €29,33 | €8,00 | | --- | --- | --- | --- | --- | --- | --- | | Total | 3 | | €54,00 | €38,00 | €38,00 | €8,00 | | Discounted total | | | €0,00 | €16,00 | €16,00 | €46,00 | ##### CartDiscountValueFixedDraft [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountValueFixedDraft). ##### CartDiscountValueGiftLineItemDraft Cart Discounts of this type cannot be used in Discount Groups. Adds one free Line Item to the Cart as a gift. When the best deal (between Cart and Product Discounts) applies to a Cart, the gift item is added only after the best deal is calculated. The sort order and stacking mode are effective only among other Cart Discounts with the same discount target. [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountValueGiftLineItemDraft). #### CartDiscountTarget Defines what segment of the Cart will be discounted. Discounts can be applied on [LineItems](/api/projects/carts.md#lineitem), [CustomLineItems](/api/projects/carts.md#customlineitem), [ShippingInfo](/urn?urn=ctp%3Aapi%3Atype%3AShippingInfo), or [Cart](/urn?urn=ctp%3Aapi%3Atype%3ACart) `totalPrice`. ##### CartDiscountLineItemsTarget [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountLineItemsTarget). ##### CartDiscountCustomLineItemsTarget [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountCustomLineItemsTarget). ##### CartDiscountShippingCostTarget Cart Discounts of this type cannot be used in Discount Groups. [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountShippingCostTarget). When the best deal (between Cart and Product Discounts) applies to a Cart, the discount (to the shipping cost) applies only after the best deal is calculated. The sort order and stacking mode are effective only among other Cart Discounts with the same discount target. ##### CartDiscountTotalPriceTarget Cart Discounts of this type cannot be used in Discount Groups. [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountTotalPriceTarget). When other Cart Discounts with different targets apply on a Cart, the Cart Total Price discount applies last, regardless of its sort order and ignoring the `StopAfterThisDiscount` [StackingMode](/urn?urn=ctp%3Aapi%3Atype%3AStackingMode) of the other Cart Discounts, if any. The sort order for a Cart Total Price discount only determines its ranking among other Cart Discounts targeting the Total Price. As a result, the `stackingMode = StopAfterThisDiscount` takes effect for a Cart Total Price discount only when there are other Cart Discounts targeting the Total Price with a lower sort order. ##### MultiBuyLineItemsTarget Multi-buy Discounts represent a "Buy X items, get Y of them at a discounted rate" type of discount. Multi-buy Line Items can only be discounted [relatively](/api/projects/cartDiscounts.md#cartdiscountvaluerelative). To select the items relevant for the Discount, a [LineItem Predicate](/api/projects/predicates.md#lineitem-field-identifiers) is applied. Unlike [LineItems Target](/api/projects/cartDiscounts.md#cartdiscountlineitemstarget), a multi-buy Discount is not applied on each [LineItem](/urn?urn=ctp%3Aapi%3Atype%3ALineItem) as a whole, but on individual items that are contained in all matching Line Items and subsumed under their `quantity` fields. [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:MultiBuyLineItemsTarget). A multi-buy Discount can occur multiple times in a Cart, but any item will only be considered once per multi-buy Discount. A single application of a multi-buy Discount is defined by the `triggerQuantity` and `discountedQuantity`. For example, if the `triggerQuantity` is `6`, and the `discountedQuantity` is `2`, then the following cases apply: - On a Cart with `6` items, `2` items are discounted and `4` items are undiscounted while participating in the Discount. As a result, the Discount is applied only once. - On a Cart with `8` items, `2` items are discounted, `4` items are undiscounted while participating in the Discount, and the `2` remaining items are disregarded by the Discount. As a result, the Discount is still applied only once. - On a Cart with `12` items, `2*2` items are discounted and `2*4` are undiscounted while participating in the Discount. As a result, the Discount is applied twice. A participation is represented by a [DiscountedLineItemPortion](/urn?urn=ctp%3Aapi%3Atype%3ADiscountedLineItemPortion) with `discountedAmount.centAmount` = `0`. To recap, the matching items of a Discount application are sliced into `maxOccurrence` groups of size `triggerQuantity`. The remaining items (for example, the ninth item in a "buy 8, get 2 free" discount) do not participate in the Discount. In any such group, only `discountedQuantity` items are actually discounted (for example, the second item of a "buy 8, get 2 free" discount); the other items are part of this occurrence and thus, cannot participate in another group and the Price remains unchanged. ##### MultiBuyCustomLineItemsTarget Multi-buy Custom Line Items can only be discounted [relatively](/api/projects/cartDiscounts.md#cartdiscountvaluerelative). To select the items relevant for the Discount, a [CustomLineItem Predicate](/api/projects/predicates.md#customlineitem-field-identifiers) is applied. Unlike [CustomLineItems Target](/api/projects/cartDiscounts.md#cartdiscountcustomlineitemstarget), a multi-buy Discount is not applied on each [CustomLineItem](/urn?urn=ctp%3Aapi%3Atype%3ACustomLineItem) as a whole, but on individual items that are contained in all matching Custom Line Items and subsumed under their `quantity` fields. [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:MultiBuyCustomLineItemsTarget). ##### CartDiscountPatternTarget [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountPatternTarget). This discount is based on the concept of pattern matching. A pattern matches when all the components (in `triggerPattern` and `targetPattern`) match. Each (pattern) component defines a set of units participating in the Discount; the set can include units coming from different (Custom) Line Items. Components are matched in the order listed in the array. A unit matched in a component will not be available for further matching. The resulting set of units is a combination of the resulting sets of all components. Let's see a few examples: - **Example 1**: Buy a bundle of 2 pairs of jeans and 1 shirt; get a US$100 discount (distributed evenly) on the bundle. The discount can be applied up to 3 times and the cheapest items are selected for the discount. To obtain this behavior, only fill the `targetPattern` to select the units that will be discounted. The pattern component (`targetPattern`) is matched by the union of the units matching each single component. ```javascript { "triggerPattern": [], "targetPattern": [ { "type":"CountOnLineItemUnits", "predicate": "categories.key=\"Jeans\"", "minCount": 2, "maxCount": 2 }, { "type":"CountOnLineItemUnits", "predicate": "categories.key=\"Shirt\"", "minCount": 1, "maxCount": 1 } ], "maxOccurrence": 3, "selectionMode": "Cheapest", ... "value": { "type": "absolute", "applicationMode": "EvenDistribution", "money": [ { "type": "centPrecision", "currencyCode": "USD", "centAmount": 10000, "fractionDigits": 2 } ] } } ``` If a cart contains: - 1 pair of jeans and 4 shirts: no unit will be selected for the discount as the first target component is not satisfied. - 4 pairs of jeans: no unit will be selected for the discount as the second target component is not satisfied. - 3 pairs of jeans and 2 shirts: 1 bundle (of 2 jeans and 1 shirt) will be selected and discounted by US$100. - 6 pairs of jeans and 5 shirts: 3 bundles will be selected and each bundle will be discounted by US$100. Each time the target pattern is matched, the cheapest bundle will be selected. - 12 pairs of jeans and 5 shirts: only 3 bundles will be selected and discounted as the maximum allowed limit for the discount application is 3. - **Example 2**: Buy 2 pairs of jeans and get up to 3 shirts at 20% off. The discount can be applied up to 4 times and the most expensive items are selected for the discount. In this scenario, a set of units is required to apply the discount on another set of units. To obtain this behavior, you must define the `triggerPattern` and `targetPattern`. ```javascript { "triggerPattern": [ { "type":"CountOnLineItemUnits", "predicate": "categories.key=\"Jeans\"", "minCount": 2, "maxCount": 2 } ], "targetPattern": [ { "type":"CountOnLineItemUnits", "predicate": "categories.key=\"Shirt\"", "minCount": 1, "maxCount": 3 } ], "maxOccurrence": 4, "selectionMode": "MostExpensive", ... "value": { "type": "relative", "permyriad": "200", } } ``` If a cart contains: - 2 pairs of jeans and 8 shirts: 3 shirts are discounted as the trigger is matched only once. - 4 pairs of jeans and 3 shirts: 3 shirts are discounted as the target is matched only once although the trigger is matched twice. - 4 pairs of jeans and 5 shirts: 5 shirts are discounted as the trigger and target is matched twice. - 6 pairs of jeans and 6 shirts: 6 shirts are discounted. - 20 pairs of jeans and 20 shirts: 12 shirts are discounted shirts as the discount is applied a maximum of 4 times. - **Example 3**: Buy 3 tees and get up to 2 other tees at US$20 each. The discount can be applied up any number of times and the cheapest items are selected for the discount. In this scenario, the units that trigger the discount and the units that are targeted by the discount are the same. To obtain this behavior, you must define the `triggerPattern` and `targetPattern`. The units considered in the `triggerPattern` are excluded from the `targetPattern`. ```javascript { "triggerPattern": [ { "type":"CountOnLineItemUnits", "predicate": "categories.key=\"Tee\"", "minCount": 3, "maxCount": 3 } ], "targetPattern": [ { "type":"CountOnLineItemUnits", "predicate": "categories.key=\"Tee\"", "minCount": 1, "maxCount": 2 } ], "selectionMode": "Cheapest", ... "value": { "type": "fixed", "applicationMode": "IndividualApplication" "money": [ { "type": "centPrecision", "currencyCode": "USD", "centAmount": 2000, "fractionDigits": 2 } ] } } ``` If a cart contains: - 3 tees: no tees are discounted as 3 tees are matched by the trigger pattern and excluded from the discount. - 4 tees: 1 tee will be discounted from matching the trigger pattern once. - 5 tees: 2 tees will be discounted from matching the trigger pattern once. - 8 tees: 2 tees will be discounted from matching the trigger pattern once, and not enough tees remain to match the trigger pattern again. - 9 tees: 3 tees will be discounted from matching the trigger pattern twice—2 tees will be discounted in the first application and 1 tee will be discounted in the second application. #### PatternComponent A component that defines the set of units to participate in the Discount. ##### CountOnLineItemUnits [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CountOnLineItemUnits). ##### CountOnCustomLineItemUnits [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CountOnCustomLineItemUnits). #### SelectionMode [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:SelectionMode). If the Discount occurs multiple times, it is guaranteed that, out of all matching items, the cheapest or most expensive ones will be discounted, depending on this setting. If two or more items have the same Price, it is not predictable which of the items are participating in the Discount and which are not. What we guarantee is that the total Discount over all participating items is correct. Discount always refers to the current Price including already applied Discounts. #### StackingMode [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:StackingMode). The stacking mode does not control free shipping as defined via `freeAbove` on a [ShippingRate](/urn?urn=ctp%3Aapi%3Atype%3AShippingRate). To avoid unwanted scenarios, we highly recommend not using Cart Discounts on `shipping` target and `freeAbove` together. #### DiscountApplicationMode [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:DiscountApplicationMode). ## Get CartDiscount ### Get CartDiscount by ID [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/cart-discounts/\{id}:GET). ### Get CartDiscount by Key [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/cart-discounts/key=\{key}:GET). ## Get CartDiscount in Store ### Get CartDiscount in Store by ID [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/in-store/key=\{storeKey}/cart-discounts/\{id}:GET). ### Get CartDiscount in Store by Key [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/in-store/key=\{storeKey}/cart-discounts/key=\{key}:GET). ## Query CartDiscounts [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/cart-discounts:GET). ## Query CartDiscounts in Store [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/in-store/key=\{storeKey}/cart-discounts:GET). ## Check if CartDiscount exists ### Check if CartDiscount exists by ID [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/cart-discounts/\{id}:HEAD). ### Check if CartDiscount exists by Key [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/cart-discounts/key=\{key}:HEAD). ### Check if CartDiscount exists by Query Predicate [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/cart-discounts:HEAD). ## Check if CartDiscount exists in Store ### Check if CartDiscount exists in Store by ID [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/in-store/key=\{storeKey}/cart-discounts/\{id}:HEAD). ### Check if CartDiscount exists in Store by Key [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/in-store/key=\{storeKey}/cart-discounts/key=\{key}:HEAD). ### Check if CartDiscount exists in Store by Query Predicate [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/in-store/key=\{storeKey}/cart-discounts:HEAD). ## Create CartDiscount If the [limit](/api/limits.md#cart-discounts) is exceeded, a [MaxResourceLimitExceeded](/urn?urn=ctp%3Aapi%3Atype%3AMaxResourceLimitExceededError) error will be returned. [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/cart-discounts:POST). ## Create CartDiscount in Store If the [limit](/api/limits.md#cart-discounts) is exceeded, a [MaxResourceLimitExceeded](/urn?urn=ctp%3Aapi%3Atype%3AMaxResourceLimitExceededError) error will be returned. [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/in-store/key=\{storeKey}/cart-discounts:POST). ## Update CartDiscount ### Update CartDiscount by ID [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/cart-discounts/\{id}:POST). ### Update CartDiscount by Key [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/cart-discounts/key=\{key}:POST). ## Update CartDiscount in Store ### Update CartDiscount in Store by ID [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/in-store/key=\{storeKey}/cart-discounts/\{id}:POST). ### Update CartDiscount in Store by Key [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/in-store/key=\{storeKey}/cart-discounts/key=\{key}:POST). ## Update actions #### Set Key [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountSetKeyAction). #### Change Value [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountChangeValueAction). #### Change Cart Predicate [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountChangeCartPredicateAction). #### Change Target [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountChangeTargetAction). #### Change IsActive [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountChangeIsActiveAction). #### Change Name [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountChangeNameAction). #### Set Description [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountSetDescriptionAction). #### Change Sort Order If a Cart Discount is part of a Discount Group, its sort order is inherited from the Discount Group and cannot be set independently. [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountChangeSortOrderAction). #### Set DiscountGroup [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountSetDiscountGroupAction). #### Change Requires DiscountCode [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountChangeRequiresDiscountCodeAction). #### Set Valid From [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountSetValidFromAction). #### Set Valid Until [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountSetValidUntilAction). #### Set Valid From and Until [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountSetValidFromAndUntilAction). #### Change Stacking Mode [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountChangeStackingModeAction). #### Set Recurring Order Scope If the Cart Discount [limit](/api/limits.md#cart-discounts) is exceeded, a [MaxResourceLimitExceeded](/urn?urn=ctp%3Aapi%3Atype%3AMaxResourceLimitExceededError) error will be returned. [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountSetRecurringOrderScopeAction). #### Add Store [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountAddStoreAction). #### Remove Store [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountRemoveStoreAction). #### Set Stores [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountSetStoresAction). #### Set Custom Type [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountSetCustomTypeAction). #### Set CustomField [type definition](/api/projects/cartDiscounts.md?urn=ctp:api:type:CartDiscountSetCustomFieldAction). ## Delete CartDiscount ### Delete CartDiscount by ID [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/cart-discounts/\{id}:DELETE). ### Delete CartDiscount by Key [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/cart-discounts/key=\{key}:DELETE). ## Delete CartDiscount in Store ### Delete CartDiscount in Store by ID [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/in-store/key=\{storeKey}/cart-discounts/\{id}:DELETE). ### Delete CartDiscount in Store by Key [endpoint definition](/api/projects/cartDiscounts.md?urn=ctp:api:endpoint:/\{projectKey}/in-store/key=\{storeKey}/cart-discounts/key=\{key}:DELETE). ## Related pages - [Area overview page with navigation](/api.md) - [Previous page: Product Discounts](/api/projects/productDiscounts.md) - [Next page: Discount Codes](/api/projects/discountCodes.md)