---
schema_version: "1"
id: 6134bde1e894875dcc43a94818aeceef6ab014ff24f422cf3230e6e7998242d6
title: Delete Applied Promo Items
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/standard_cart/std_comms-delete-applied-promo-items.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/std_comms-delete-applied-promo-items.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: bff2dd893edca6a21ca5664b49f98f371d87240a01ddf8cc4a31a0d7a40e3398
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Delete Applied Promo Items

## Overview

The Delete Applied Promotion API is a one-stop call that cleanly removes a promotion, and anything it added to the cart, in a single, safe step.

Why it matters

- All-in-one cleanup – The moment the promotion is deleted, the API can also delete any free or discounted products the promo injected.
- Automatic price correction – It immediately re-calculates totals, taxes, and recurring fees so the cart shows the real price after the promo is removed.
- Rule protection – It re-runs the same product-compatibility and bundle rules that run at checkout, catching problems (like bundle-quantity minimums).
- Atomic safety – Everything happens in one transaction. If any step fails, nothing is saved, so the cart is never left in a half-updated state.

What you send and what you get back

- You pass the cart Id, the promotion Id (or a comma-separated list), and a few simple flags—price and validate—that say whether you want the system to re-price and re-validate right away.<br>
- The response tells you:
  1. Whether the delete succeeded
  2. Any follow-up actions (like "prices updated")
  3. A structured list of info/warning/error messages

```
DELETE /v2/cpq/carts/{cart_Id}/promotions?id={PROMOTION_ID}
```

This API supports the guest user enhancements that Salesforce introduced with the Winter ‘21 release. To encrypt and decrypt data for guest users, use the `UserSecurity` class with this API. See Guest User Technical Details.

For additional information, ​see UserSecurity Class and CPQ and Digital Commerce Changes for Guest Users.


## Rest Handler

```
APIPromotionsCartsCpqV2
```

## Rest Method

```
deletePromotionItems
```

## Remote Service

```
CpqAppHandler
```

## Remote Method

```
deleteAppliedPromoItems
```

## Apex Remote Input Map

```
Map<String, Object> inputMap = new Map<String, Object>{
    'cartId' => '{CART_ID}',
    'id' => '{PROMOTION_ID}',
    'validate' => true,
    'price' => true
};
Map<String, Object> outputMap = new Map<String, Object>();
Map<String, Object> optionsMap = new Map<String, Object>();
CpqAppHandler handler = new CpqAppHandler();
handler.invokeMethod('deleteAppliedPromoItems', inputMap, outputMap, optionsMap);
```

## Package

Communication (vlocity_cmt)

## API Parameters and Response Format

For API parameter names and descriptions, see [Cart-Based API Swagger Reference](https://developer.salesforce.com/docs/industries/cme/references/cpq?meta=Summary).

## Resource Information

| Response Format | JSON                                                               |
| --------------- | ------------------------------------------------------------------ |
| Resource URL    | `/services/apexrest/{namespace}/v2/cpq/carts/{cart_ID}/promotions` |


## Example Request

```
DELETE
/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0D1AAK/promotions?id=a35xx000000rOLhAAM&price=true&validate=true
```

## Example Response

```
{
  "totalSize": 0,
  "messages": [
    {
      "code": "152",
      "severity": "INFO",
      "message": "Successfully deleted."
    }
  ],
  "actions": {
    "itempricesupdated": {
      "rest": {
        "params": {

        },
        "method": null,
        "link": null
      },
      "remote": {
        "params": {
          "cartId": "801xx000003H0JTAA0",
          "price": false,
          "methodName": "getCartLineItemPrices"
        }
      },
      "client": {
        "params": {

        }
      }
    },
    "itemdeleted": {
      "rest": {
        "params": {

        },
        "method": null,
        "link": null
      },
      "remote": {
        "params": {
          "items": [
            {
              "message": "Test_Promo has been deleted from the cart.",
              "Id": "a35xx000000rOLhAAM"
            }
          ]
        }
      },
      "client": {
        "params": {
          "items": [
            {
              "message": "Test_Promo has been deleted from the cart.",
              "Id": "a35xx000000rOLhAAM"
            }
          ]
        }
      }
    }
  }
}
```
