---
schema_version: "1"
id: ee0b108bfc60c90d5fa577e3293c3920534d100851afbdc4ead8c4846c0a099d
title: Run Pricing for Items to Cart
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/standard_cart/std_comms-run-pricing-for-items-to-cart.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/std_comms-run-pricing-for-items-to-cart.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8bbdcafaea80540b9a1384869e4a325d89814b9331380f9c40f668a953379746
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Run Pricing for Items to Cart

Return the pricing information for each line item by invoking pricing rules. If line items are specified, they are priced. If line items are not specified, all of the items in the cart are priced.

```nolang
POST /v2/cpq/carts/{cart_ID}/price
```

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.


## Remote Method

```nolang
priceCart
```

## REST Handler

```nolang
APIPriceCartsCpqV2
```

## Apex Remote Service

```nolang
CpqAppHandler
```


## Apex Remote Input Map

Where `items` specifies the associated line item IDs.

```nolang
{
  "methodName": "priceCart",
  "cartId": "801360000008eNU",
  "items": ["80279000000Y5C9AAK", "80279000000Y5CAAA0"]
}
```

## 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}/price` |


## Example Request

```nolang
POST
/services/apexrest/vlocity_cmt/v2/cpq/carts/80141000000Cg8H/price
```

## Example Response

```nolang
{
   "totalSize": 1,
   "messages": [],
   "records": [{
      "messages": [],
      "displaySequence": -1,
      "details": {
         "totalSize": 1,
         "messages": [],
         "records": [{
            "messages": [],
            "actions": {
               "checkout": {
                  "rest": {
                     "params": {},
                     "method": "POST",
                     "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/80141000000Cg8HAAS/checkout"
                  },
                  "remote": {
                     "params": {
                        "cartId": "80141000000Cg8HAAS",
                        "methodName": "checkout"
                     }
                  },
                  "client": {
                     "params": {}
                  }
               }
            },
            "displaySequence": -1,
            "Id": "80141000000Cg8HAAS",
            "Status": "Draft",
            "OrderNumber": "00000965",
            "Account.Name": "Telco test",
            "EffectiveRecurringTotal__c": 0.00,
            "EffectiveOneTimeTotal__c": 5.00,
            "EffectiveOrderTotal__c": 5.00,
            "ObjectType": "Order"
         }]
      },
      "sites": {
         "totalSize": 0,
         "messages": [{
         "severity": "ERROR",
         "messageId": null,
         "message": "No Results Found.",
         "code": "101",
         "actions": {}
      }],
      "actions": {
         "newsite": {
            "rest": {
               "params": {},
               "method": "POST",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/80141000000Cg8HAAS/sites"
            },
            "remote": {
               "params": {
                  "type": "Service",
                  "methodName": "newSite"
               }
            },
            "client": {
               "params": {}
            }
         }
      }
   }
   }]
}
```
