---
schema_version: "1"
id: d449cdb579ab7c770394835f0d9bc149d6ecfd1aa762a43c0e1b280772b8a962
title: Standard Cart REST APIs
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/references/generated-api-specs/rn_comms.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/references/rn_comms
source_site: developer.salesforce.com
content_type: documentation
content_hash: 01fa3e484874edd7ac2a0eb748f50689073b71c811f62d557fbf71f276e3003e
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
Standard Cart REST APIs

# Standard Cart REST APIs

Standard Configure, Price, Quote Web APIs (CPQ APIs) enable client application users to shop for and order products and services. The CPQ APIs provide a layer of abstraction between the client app developers and the CPQ developers who are configuring and customizing the underlying CPQ logic.

*   V2 of the CPQ APIs simplifies the APIs for mobile and external app development. The v2 APIs are the default APIs used by Industries applications. Base URL for the apis described is 'xx##.salesforce.com/services/apexrest/vlocity\_cmt/v2'.

**Version:** Spring 2025

## Servers

*   `https://{MyDomainLoginUrl}.salesforce.com/services/apexrest/vlocity_cmt/v2`

## Operations

### POST Create Cart (Asset To Order)

`POST /carts`

Operation ID: `AssetToOrder`. Tags: Cart.

Create orders from existing assets and perform Move, Add, Change, and Delete (MACD) operations. The assetToOrder API is specifically intended for use with Future Dated Orders.  
Rest Handler - APICreateCartsCpqV2 Method Invoked - createCarts

#### Request body (required)

#### While performing AssetToOrder we can create Order of specific RecordType by RecordTypeId in the request payload.

Request Example

```json
{
  "subaction": "assetToOrder", 
  "id": "02ixx0000004HROAA2", 
  "inputFields": [ { "RecordTypeId": "012xx0000005pgzAAA" } ], 
  "accountId": "001xx000003GfGdAAK", 
  "requestDateTime": "2024-09-30 19:24:04" 
}
```

For assetToOrder, if future-dated order is not available, the requestDate should be greater than or equal to current date. If a future dated order(s) is/are available for that asset, the requestDate should be greater than or equal to current date and should be greater than or equal to the date on all the future dated orders of the asset.

For assetToOrder, the field id can be a list of all assets or just the root asset. The child assets will be retrived from the root asset.

Media type: `application/json`. Schema: `AssetToOrderRequest`.

_Example: assetToOrderRequest_ Sample AssetToOrder Request Example

```
{
  "subaction": "assetToOrder",
  "accountId": "001xx000003H3cJAAS",
  "orderId": "003xx000002fIKa",
  "id": "02ixx0000004HrCAAU,02ixx0000004HrDABV",
  "requestDateTime": "2025-05-16T00:00:00.000Z",
  "validate": true
}
```

#### Responses

*   **200** OK - API request processed. Look for messages in the response to determine if it succeeded or failed.
    
    Media type: `application/json`. Schema: `AssetToOrderResponse`.
    
*   **215**
    
    #### Example response for Invalid Request DateTime
    
    ```json
    [ {
      "message" : "Change To Order Failed. Request DateTime is less than now",
      "code" : "215",
      "severity" : "ERROR"
    } ]
    ```
    
*   **500**
    
    Look for below error code in response.
    
    #### Example response for INVOKE-500
    
    ```json
    {
      "errorCode" : "INVOKE-500",
      "error" : "An internal server error has occurred. Error ID: 672691857-12982 (1442400963)"
    }      
    ```
    

### GET Retrieves high-level cart metadata such as account associations, multi-site configurations, and context-aware actions (e.g., checkout, create site).

`GET /cpq/carts/{cartId}`

Operation ID: `Get Cart Summary`. Tags: Cart.

The Get Cart Summary API provides a quick snapshot of a cart's key information such as totals, status, and account details.  
It is designed to help your applications display up-to-date cart overviews and guide users through the checkout process more efficiently.

In ​Salesforce Industries Communications, Media, and Energy Winter '21 and later releases, the getCarts `validate` parameter has a default value of True, so the API will return validation messages. If validate=false is not specified, validation messages are returned by default. Specify validate=false in the UI if you do not want to receive validation messages.

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](https://help.salesforce.com/s/articleView?id=ind.v_admin_guest_user_technical_details_27809.htm&type=5).  
  
For additional information, ​see [UserSecurity Class](https://help.salesforce.com/s/articleView?id=ind.v_admin_usersecurity_class_28364.htm&type=5) and CPQ and Digital Commerce Changes for Guest Users.

#### Parameters

*   `cartId` (path, string, required) Salesforce Id of the Cart (Opportunity, Quote or Order).
    
    _Example_
    
    ```
    801xx000003GzX5AAK
    ```
    
*   `validate` (query, boolean) Indicates whether validation rules are run for the current API request (true) or not (false).  
    Default: `true`.
*   `headerFieldSet` (query, string)
    
    Feature name of a Salesforce Field Set defined for the given cart object (Opportunity, Quote, Order) which identifies the fields to return in the response.
    
    > **Note:** Use this parameter when you need a customised header payload (e.g., a lighter field set for mobile, or a specialised set for a specific UI flow). If omitted, the standard CPQV2 header fields will be returned.
    
    _Example_
    
    ```
    CPQV2
    ```
    
*   `serviceAccountLimit` (query, integer) The number of Account object records to be returned.  
    The limit should be within 0-200, otherwise it defaults to 20.
    
    _Example_
    
    ```
    20
    ```
    

#### Responses

*   **200** OK - API request processed. Look for messages in the response to determine if it succeeded or failed.
    
    Media type: `application/json`. Schema: `GetCartsResponse`.
    
*   **500**
    
    Internal server error that may occur during cart processing. Below is a comprehensive list of possible error messages and their descriptions to help diagnose and resolve issues:
    
    | Message | Description |
    | --- | --- |
    | Checkout \| PCPValidation error | Failed to validate the cart against Product Configuration Procedure rules. Review cart configuration and rule settings. |
    | Checkout \| validation rules error | Failed to validate the cart against Advanced Validation rules. Review cart configuration for compliance with business rules. |
    | Checkout \|\| Multisite check for canCheckout error | Cart checkout operation failed due to invalid multi-site configuration. Ensure all site-specific requirements are met before proceeding. |
    | Compiled Data with key 'CartCompiledOfferHierarchy' not found | Unable to retrieve offer hierarchy data from CachedAPIResponse\_\_c. Verify it contains valid offer hierarchy compilation. |
    | Compiled Data with key 'CartCompiledPricingData' not found | Unable to retrieve pricing data from CachedAPIResponse\_\_c. Verify it contains valid pricing compilation. |
    | Compiled Data with key 'CompiledPricingVariableMaps' not found | Unable to retrieve pricing variable maps from CachedAPIResponse\_\_c. Verify it contains valid pricing variable compilation. |
    | Compiled Data with key 'pricelist-pbeid-sequence key' not found | Unable to retrieve price list sequence data from CachedAPIResponse\_\_c. Verify it contains valid price list compilation. |
    | CPQDiscountNotActivatedDiscounts | Cart contains discounts that have not been activated. Activate all applicable discounts before proceeding. |
    | CPQDiscountUnapproved | Cart contains discounts pending approval. Obtain necessary approvals for all discounts before proceeding. |
    | Invalid attribute values found. | The AttributeSelectedValues\_\_c contains invalid or incompatible values. Review and correct the attribute selections. |
    | Invalid id: {CART\_ID} | The provided cart identifier is either empty or invalid. Verify the cart Id format and type. |
    | InvalidAccountId | The cart is not properly associated with a valid Account record. Establish a valid account association. |
    | No Header Object found. | The requested cart does not exist in the system. Verify the cart identifier and ensure it has been created. |
    | No product compiled data found. | Product transaction data is missing from CachedAPIResponse\_\_c. Verify product configuration and recompile if necessary. |
    | No Results Found. (Under the sites node in the API response) | No site records are associated with the specified Account. Create or associate required site records. |
    | Not able to commit cart after Validation/PCPValidation | Failed to save cart changes after validation processes. Review validation errors and resolve any configuration issues. |
    | Not able to query {LINE\_ITEM} | Failed to retrieve line item information. Verify the line item exists and is accessible. |
    | PricebookEntry not found for product : {PRODUCT\_ID} with globalGroupKey {PRODUCT\_GGK} | Unable to locate price book entry for the specified product. Verify product exists in the active price book with valid global group key. |
    | Unable to populate selected attribute values | Failed to update the CartDocument with selected attribute values. Verify attribute selections and cart document integrity. |
    

### GET Get Cart Items

`GET /cpq/carts/{cartId}/items`

Operation ID: `GetCartItems`. Tags: Cart.

Get a representation of the items in a specified cart. Rest Handler - APIItemsCartsCpqV2 Method Invoked - getCartsItems.

#### Parameters

*   `cartId` (path, string, required) Salesforce Id of the Cart (Opportunity, Quote or Order).
    
    _Example_
    
    ```
    801xx000003GzX5AAK
    ```
    
*   `query` (query, string) Search text
    
    _Example_
    
    ```
    iphone+6s
    ```
    
*   `id` (query, string) List of comma separated itemIds to return only the corresponding cart items.
    
    _Example_
    
    ```
    01u41000001QPtsAAG
    ```
    
*   `lastRecordId` (query, string) The last record ID from the previous search result, if available.
*   `pagesize` (query, integer) Number of records to be returned.
*   `hierarchy` (query, integer) Specifies product hierarchy.
*   `includeAttachment` (query, boolean) Indicates whether product attachments are returned (true) or not (false).
*   `fields` (query, array of string, style: form, explode: false) List of fields to return in the response, separated by commas.
*   `filter` (query, string) Filter field values.
*   `price` (query, boolean) Indicates whether to run the pricing engine (true) or not (false).  
    Default: `true`.
*   `validate` (query, boolean) Indicates whether validation rules are run for the current API request (true) or not (false).  
    Default: `true`.

#### Responses

*   **101** No Results Found
*   **109** Invalid field
*   **200**
    
    OK - API request processed. Look for messages in the response to determine if it succeeded or failed.
    
    #### Get Cart Items Response Example
    
    **Note** - An entire result can be thousands of lines long. This example has been truncated.
    
    ```json
          {
            "totalSize":2
            "messages":[]
            "actions":{
              "itempricesupdated":{
                "rest":{
                  "params":{}
                  "method":"GET"
                  "link":"/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H0UlAAK/price?price=false&cartId=801xx000003H0UlAAK"
                }
                "remote":{}
                "client":{}
              }
            }
            "records":[
              {
                "messages":[]
                "actions":{}
                "displaySequence":-1
                "productChildItemDefinition":{}
                "isVirtualItem":false
                "sequenceNumber":1
                "groupMinQuantity":0
                "productId":"01txx0000007CF2AAM"
                "Product2":{}
                "maxQuantity":99999
                "ProductCode":"Internet5G"
                "IsActive":true
                "hasChildren":false
                "defaultQuantity":1
                "groupMaxQuantity":99999
                "PricebookEntry":{}
                "Name":"Internet5G"
                "UnitPrice":{}
                "Product2Id":"01txx0000007CF2AAM"
                "productChildItemId":"a3Pxx0000004nmuEAA"
                "minQuantity":0
                "name":"Internet5G"
                "Pricebook2Id":"01sxx0000005qRhAAI"
                "action":"Add"
                "productHierarchyPath":"01txx0000007CF2AAM"
                "vlocity_cmt__RecurringPrice__c":50
                "orderActive":false
                "itemType":"lineItem"
                "SellingPeriod":"Present"
                "vlocity_cmt__ProductGroupKey__c":{}
                "vlocity_cmt__RecurringDiscountPrice__c":{}
                "vlocity_cmt__ParentItemId__c":{}
                "vlocity_cmt__ItemName__c":{}
                "vlocity_cmt__EffectiveOneTimeTotal__c":{}
                "vlocity_cmt__EffectiveRecurringTotal__c":{}
                "vlocity_cmt__CatalogItemReferenceDateTime__c":{}
                "ListPrice":{}
                "vlocity_cmt__CpqCardinalityMessage__c":{}
                "vlocity_cmt__RecurringManualDiscount__c":{}
                "vlocity_cmt__IsChangesAllowed__c":{}
                "vlocity_cmt__CpqPricingMessage__c":{}
                "vlocity_cmt__OneTimeTotal__c":{}
                "vlocity_cmt__FulfilmentStatus__c":{}
                "vlocity_cmt__LineNumber__c":{}
                "vlocity_cmt__ServiceAccountId__c":{}
                "vlocity_cmt__RecurringCharge__c":{}
                "vlocity_cmt__OneTimeCharge__c":{}
                "vlocity_cmt__SubAction__c":{}
                "vlocity_cmt__CurrencyPaymentMode__c":{}
                "vlocity_cmt__ProductHierarchyGroupKeyPath__c":{}
                "vlocity_cmt__SupersededOrderItemId__c":{}
                "vlocity_cmt__RecurringTotal__c":{}
                "vlocity_cmt__SupplementalAction__c":{}
                "vlocity_cmt__Product2Id__c":{}
                "vlocity_cmt__OrderGroupId__c":{}
                "vlocity_cmt__Action__c":{}
                "Quantity":{}
                "vlocity_cmt__OneTimeManualDiscount__c":{}
                "OrderId":{}
                "vlocity_cmt__EffectiveQuantity__c":{}
                "vlocity_cmt__BillingAccountId__c":{}
                "vlocity_cmt__ProvisioningStatus__c":{}
                "vlocity_cmt__AssetReferenceId__c":{}
                "vlocity_cmt__InCartQuantityMap__c":{}
                "vlocity_cmt__FirstVersionOrderItemId__c":{}
                "PricebookEntryId":{}
                "vlocity_cmt__ProductHierarchyPath__c":{}
                "vlocity_cmt__RootItemId__c":{}
                "vlocity_cmt__CpqMessageData__c":{}
                "Id":{}
                "vlocity_cmt__RecurringCalculatedPrice__c":{}
                "vlocity_cmt__OneTimeCalculatedPrice__c":{}
                "productCategories":{}
                "vlocity_cmt__ServiceAccountId__r":{}
                "vlocity_cmt__BillingAccountId__r":{}
                }
                {
                "messages":[]
                "actions":{}
                "displaySequence":-1
                "productChildItemDefinition":{}
                "isVirtualItem":false
                "sequenceNumber":1
                "groupMinQuantity":0
                "productId":"01txx0000007CBoAAM"
                "Product2":{}
                "maxQuantity":99999
                "ProductCode":"Iphone16"
                "IsActive":true
                "hasChildren":true
                "defaultQuantity":1
                "groupMaxQuantity":99999
                "PricebookEntry":{}
                "Name":"Iphone16"
                "UnitPrice":{}
                "Product2Id":"01txx0000007CBoAAM"
                "productChildItemId":"a3Pxx0000004ni4EAA"
                "minQuantity":0
                "name":"Iphone16"
                "Pricebook2Id":"01sxx0000005qRhAAI"
                "action":"Add"
                "productHierarchyPath":"01txx0000007CBoAAM"
                "vlocity_cmt__RecurringPrice__c":100
                "orderActive":false
                "itemType":"lineItem"
                "SellingPeriod":"Present"
                "vlocity_cmt__ProductGroupKey__c":{}
                "vlocity_cmt__RecurringDiscountPrice__c":{}
                "vlocity_cmt__ParentItemId__c":{}
                "vlocity_cmt__ItemName__c":{}
                "vlocity_cmt__EffectiveOneTimeTotal__c":{}
                "vlocity_cmt__EffectiveRecurringTotal__c":{}
                "vlocity_cmt__CatalogItemReferenceDateTime__c":{}
                "ListPrice":{}
                "vlocity_cmt__CpqCardinalityMessage__c":{}
                "vlocity_cmt__RecurringManualDiscount__c":{}
                "vlocity_cmt__IsChangesAllowed__c":{}
                "vlocity_cmt__CpqPricingMessage__c":{}
                "vlocity_cmt__OneTimeTotal__c":{}
                "vlocity_cmt__FulfilmentStatus__c":{}
                "vlocity_cmt__LineNumber__c":{}
                "vlocity_cmt__ServiceAccountId__c":{}
                "vlocity_cmt__RecurringCharge__c":{}
                "vlocity_cmt__OneTimeCharge__c":{}
                "vlocity_cmt__SubAction__c":{}
                "vlocity_cmt__CurrencyPaymentMode__c":{}
                "vlocity_cmt__ProductHierarchyGroupKeyPath__c":{}
                "vlocity_cmt__SupersededOrderItemId__c":{}
                "vlocity_cmt__RecurringTotal__c":{}
                "vlocity_cmt__SupplementalAction__c":{}
                "vlocity_cmt__Product2Id__c":{}
                "vlocity_cmt__OrderGroupId__c":{}
                "vlocity_cmt__Action__c":{}
                "Quantity":{}
                "vlocity_cmt__OneTimeManualDiscount__c":{}
                "OrderId":{}
                "vlocity_cmt__EffectiveQuantity__c":{}
                "vlocity_cmt__BillingAccountId__c":{}
                "vlocity_cmt__ProvisioningStatus__c":{}
                "vlocity_cmt__AssetReferenceId__c":{}
                "vlocity_cmt__InCartQuantityMap__c":{}
                "vlocity_cmt__FirstVersionOrderItemId__c":{}
                "PricebookEntryId":{}
                "vlocity_cmt__ProductHierarchyPath__c":{}
                "vlocity_cmt__RootItemId__c":{}
                "vlocity_cmt__CpqMessageData__c":{}
                "Id":{}
                "vlocity_cmt__RecurringCalculatedPrice__c":{}
                "vlocity_cmt__OneTimeCalculatedPrice__c":{}
                "productCategories":{}
                "vlocity_cmt__ServiceAccountId__r":{}
                "vlocity_cmt__BillingAccountId__r":{}
                "lineItems":{
                "totalSize":2
                "messages":[]
                "records":[]
                }
              }
            ]
          }
    ```
    
*   **500** Invalid Id Field

### PUT Update Item(s) in a Cart

`PUT /cpq/carts/{cartId}/items`

Operation ID: `UpdateItemsInCart`. Tags: Cart.

Update one or more items in a specified cart. Rest Handler - APIItemsCartsCpqV2 Method Invoked - putCartsItems

#### Parameters

*   `cartId` (path, string, required) Salesforce Id of the Cart (Opportunity, Quote or Order).
    
    _Example_
    
    ```
    801xx000003GzX5AAK
    ```
    

#### Request body

Request Body with input fields

#### Update Items in Cart Request Example

The request body requires a JSON records which is to be updated. This can be fetched from the API response of Add Items to cart or Get Items to cart. In the given response of Add or GET Items to cart, update the field which to be updated.

**Note** - An entire result can be thousands of lines long. This example has been truncated.

```json
    {    
      "items": {
           "records":[
              {
              "messages":[]
              "actions":{}
              "displaySequence":-1
              "productChildItemDefinition":{}
              "isVirtualItem":false
              "sequenceNumber":1
              "groupMinQuantity":0
              "productId":"01txx0000007CBoAAM"
              "Product2":{}
              "ProductCode":"Iphone16"
              "maxQuantity":99999
              "IsActive":true
              "hasChildren":true
              "defaultQuantity":1
              "PricebookEntry":{}
              "groupMaxQuantity":99999
              "Name":"Iphone16"
              "UnitPrice":{}
              "productChildItemId":"a3Pxx0000004ni4EAA"
              "Product2Id":"01txx0000007CBoAAM"
              "minQuantity":0
              "name":"Iphone16"
              "Pricebook2Id":"01sxx0000005qRhAAI"
              "action":"Add"
              "productHierarchyPath":"01txx0000007CBoAAM"
              "vlocity_cmt__RecurringPrice__c":250
              "orderActive":false
              "itemType":"lineItem"
              "SellingPeriod":"Present"
              "vlocity_cmt__ProductGroupKey__c":{}
              "vlocity_cmt__ParentItemId__c":{}
              "vlocity_cmt__RecurringDiscountPrice__c":{}
              "vlocity_cmt__ItemName__c":{}
              "vlocity_cmt__EffectiveOneTimeTotal__c":{}
              "vlocity_cmt__EffectiveRecurringTotal__c":{}
              "vlocity_cmt__CatalogItemReferenceDateTime__c":{}
              "ListPrice":{}
              "vlocity_cmt__CpqCardinalityMessage__c":{}
              "vlocity_cmt__RecurringManualDiscount__c":{}
              "vlocity_cmt__CpqPricingMessage__c":{}
              "vlocity_cmt__IsChangesAllowed__c":{}
              "vlocity_cmt__OneTimeTotal__c":{}
              "vlocity_cmt__FulfilmentStatus__c":{}
              "vlocity_cmt__LineNumber__c":{}
              "vlocity_cmt__ServiceAccountId__c":{}
              "vlocity_cmt__RecurringCharge__c":{}
              "vlocity_cmt__OneTimeCharge__c":{}
              "vlocity_cmt__SubAction__c":{}
              "vlocity_cmt__CurrencyPaymentMode__c":{}
              "vlocity_cmt__ProductHierarchyGroupKeyPath__c":{}
              "vlocity_cmt__RecurringTotal__c":{}
              "vlocity_cmt__SupersededOrderItemId__c":{}
              "vlocity_cmt__SupplementalAction__c":{}
              "vlocity_cmt__Product2Id__c":{}
              "vlocity_cmt__OrderGroupId__c":{}
              "vlocity_cmt__Action__c":{}
              "Quantity":{}
              "vlocity_cmt__OneTimeManualDiscount__c":{}
              "OrderId":{}
              "vlocity_cmt__EffectiveQuantity__c":{}
              "vlocity_cmt__BillingAccountId__c":{}
              "vlocity_cmt__AssetReferenceId__c":{}
              "vlocity_cmt__ProvisioningStatus__c":{}
              "vlocity_cmt__InCartQuantityMap__c":{}
              "vlocity_cmt__FirstVersionOrderItemId__c":{}
              "PricebookEntryId":{}
              "vlocity_cmt__ProductHierarchyPath__c":{}
              "vlocity_cmt__CpqMessageData__c":{}
              "vlocity_cmt__RootItemId__c":{}
              "Id":{}
              "vlocity_cmt__RecurringCalculatedPrice__c":{}
              "vlocity_cmt__OneTimeCalculatedPrice__c":{}
              "productCategories":{}
              "vlocity_cmt__ServiceAccountId__r":{}
              "vlocity_cmt__BillingAccountId__r":{}
              "lineItems":{}
              }
            ]
      
       }
  }

```

Media type: `application/json`. Schema: `UpdateCartItemRequest`.

#### Responses

*   **109** Invalid field
*   **151** Successfully Updated
*   **200**
    
    OK - API request processed. Look for messages in the response to determine if it succeeded or failed.
    
    #### Update Cart Items response
    
    ```json
    
        {
         "totalSize":1
         "messages":[
            {
               "code":"151"
               "severity":"INFO"
               "message":"Successfully updated."
            }
         ]
         "actions":{}
         "records":[
         {
            "messages":[]
            "actions":{}
            "displaySequence":-1
            "productChildItemDefinition":{}
            "isVirtualItem":false
            "sequenceNumber":1
            "groupMinQuantity":0
            "productId":"01txx0000007CBoAAM"
            "Product2":{}
            "ProductCode":"Iphone16"
            "maxQuantity":99999
            "IsActive":true
            "hasChildren":true
            "defaultQuantity":1
            "PricebookEntry":{}
            "groupMaxQuantity":99999
            "Name":"Iphone16"
            "UnitPrice":{}
            "productChildItemId":"a3Pxx0000004ni4EAA"
            "Product2Id":"01txx0000007CBoAAM"
            "minQuantity":0
            "name":"Iphone16"
            "Pricebook2Id":"01sxx0000005qRhAAI"
            "action":"Add"
            "productHierarchyPath":"01txx0000007CBoAAM"
            "vlocity_cmt__RecurringPrice__c":250
            "orderActive":false
            "itemType":"lineItem"
            "SellingPeriod":"Present"
            "vlocity_cmt__ProductGroupKey__c":{}
            "vlocity_cmt__ParentItemId__c":{}
            "vlocity_cmt__RecurringDiscountPrice__c":{}
            "vlocity_cmt__ItemName__c":{}
            "vlocity_cmt__EffectiveOneTimeTotal__c":{}
            "vlocity_cmt__EffectiveRecurringTotal__c":{}
            "vlocity_cmt__CatalogItemReferenceDateTime__c":{}
            "ListPrice":{}
            "vlocity_cmt__CpqCardinalityMessage__c":{}
            "vlocity_cmt__RecurringManualDiscount__c":{}
            "vlocity_cmt__CpqPricingMessage__c":{}
            "vlocity_cmt__IsChangesAllowed__c":{}
            "vlocity_cmt__OneTimeTotal__c":{}
            "vlocity_cmt__FulfilmentStatus__c":{}
            "vlocity_cmt__LineNumber__c":{}
            "vlocity_cmt__ServiceAccountId__c":{}
            "vlocity_cmt__RecurringCharge__c":{}
            "vlocity_cmt__OneTimeCharge__c":{}
            "vlocity_cmt__SubAction__c":{}
            "vlocity_cmt__CurrencyPaymentMode__c":{}
            "vlocity_cmt__ProductHierarchyGroupKeyPath__c":{}
            "vlocity_cmt__RecurringTotal__c":{}
            "vlocity_cmt__SupersededOrderItemId__c":{}
            "vlocity_cmt__SupplementalAction__c":{}
            "vlocity_cmt__Product2Id__c":{}
            "vlocity_cmt__OrderGroupId__c":{}
            "vlocity_cmt__Action__c":{}
            "Quantity":{}
            "vlocity_cmt__OneTimeManualDiscount__c":{}
            "OrderId":{}
            "vlocity_cmt__EffectiveQuantity__c":{}
            "vlocity_cmt__BillingAccountId__c":{}
            "vlocity_cmt__AssetReferenceId__c":{}
            "vlocity_cmt__ProvisioningStatus__c":{}
            "vlocity_cmt__InCartQuantityMap__c":{}
            "vlocity_cmt__FirstVersionOrderItemId__c":{}
            "PricebookEntryId":{}
            "vlocity_cmt__ProductHierarchyPath__c":{}
            "vlocity_cmt__CpqMessageData__c":{}
            "vlocity_cmt__RootItemId__c":{}
            "Id":{}
            "vlocity_cmt__RecurringCalculatedPrice__c":{}
            "vlocity_cmt__OneTimeCalculatedPrice__c":{}
            "productCategories":{}
            "vlocity_cmt__ServiceAccountId__r":{}
            "vlocity_cmt__BillingAccountId__r":{}
            "lineItems":{
               "totalSize":1
               "messages":[]
               "records":[]
            }
         }
         ]
      }
    
          
        
    ```
    
*   **500** Invalid Id Field

### POST Add Items to Cart

`POST /cpq/carts/{cartId}/items`

Operation ID: `postCartsItems`. Tags: Cart.

Adds one or more products (root or child) to an existing cart. Enforces business rules such as product eligibility, quantity constraints, and cart state validation. Can trigger pricing, validation, and promotion logic. Ensures atomicity—either all items are added successfully, or none are. Supports guest users and extensibility. See documentation for details on child adds, virtual parents, and error handling.

#### Parameters

*   `cartId` (path, string, required) Salesforce Id of the Cart (Opportunity/Quote/Order) to which items are being added.

#### Request body (required)

Media type: `application/json`. Schema: `PostCartsItemsRequest`.

#### Responses

*   **200**
    
    Success response for Add Items to Cart operation.
    
    Example (root add):
    
    ```json
    {
      "totalSize": 1,
      "messages": [
        {
          "code": "150",
          "severity": "INFO",
          "message": "Successfully added."
        }
      ],
      "actions": {
        "itempricesupdated": {}
      },
      "records": [
        {
          "messages": [],
          "actions": {},
          "isVirtualItem": false,
          "maxQuantity": 99999,
          "ProductCode": "CODE-77706",
          "hasChildren": true,
          "IsActive": true,
          "defaultQuantity": 1,
          "productGroups": {
            "totalSize": 1,
            "messages": [],
            "records": [ {} ]
          },
          "childProducts": {
            "totalSize": 1,
            "messages": [],
            "records": [ {} ]
          }
        }
      ]
    }
    ```
    
    Example (noResponseNeeded=true):
    
    ```json
    {
      "totalSize": 0,
      "messages": [
        {
          "code": "150",
          "severity": "INFO",
          "message": "Successfully added."
        }
      ],
      "actions": {
        "itempricesupdated": {
          "rest": {
            "params": {},
            "method": "GET",
            "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H4WlAAK/price?price=false&cartId=801xx000003H4WlAAK"
          },
          "remote": { "params": {} },
          "client": { "params": {} }
        }
      }
    }
    ```
    
    Media type: `application/json`. Schema: `PostCartsItemsResponse`.
    
*   **400**
    
    Bad request or invalid input.
    
    Example (no items to add):
    
    ```json
    {
      "messages": [
        {
          "code": "143",
          "severity": "ERROR",
          "message": "No items to add to cart."
        }
      ],
      "totalSize": 0
    }
    ```
    
    Media type: `application/json`. Schema: `PostCartsItemsErrorResponse`.
    
*   **default** Unexpected error

### DELETE Remove one or more line items from a specified cart.

`DELETE /cpq/carts/{cartId}/items`

Operation ID: `Remove Items from a Cart`. Tags: Cart.

Remove one or more line items, whether standalone SKUs, bundle components, or promo freebies, while automatically collapsing empty parent bundles, safeguarding or cascading promotions, and (optionally) re-pricing and re-validating the cart so totals and rules stay consistent.

NOTE:

When using the deleteCart APIs with Standard Cart, the response structure includes an additional node at the root level. A childProducts node is present at the root level of the response. Consumers of the Standard Cart API can ignore or filter out the childProducts node at the root level if it is not relevant to their use case.

#### Parameters

*   `cartId` (path, string, required) Salesforce Id of the Cart (Opportunity, Quote or Order).
    
    _Example_
    
    ```
    801xx000003GzX5AAK
    ```
    
*   `id` (query, string, required) Comma-separated Line-item Id(s) to delete.
    
    _Example_
    
    ```
    802xx000001nsbfAAA,802xx000001nsbgAAA
    ```
    
*   `price` (query, boolean) Indicates whether to run the pricing engine (true) or not (false).  
    Default: `true`.
*   `validate` (query, boolean) Indicates whether validation rules are run for the current API request (true) or not (false).  
    Default: `true`.
*   `checkActivePromos` (query, boolean) Controls whether the API prevents or allows deletions that would leave an active promotion without associated items.  
    True => If any target line-item is tied to an active promotion, the call throws a validation error (code 406) — unless the custom setting DELETE\_APPLIED\_PROMO=true, in which case the promotion itself is first deleted and the item delete proceeds.  
    False => Items are deleted even if they belong to an active promotion.  
    Default: `true`.
*   `proceedToCommit` (query, boolean) Flag that tells the Delete Cart Items service whether to finish the transaction or stop after all validations.  
    True => After the items pass validation, the service commits the deletes and writes the cart back to the database.  
    False => The service still runs every check (promotion guard, cardinality rules, etc.) but does not save any changes, it returns the validation result only. Useful for "pre-check" buttons or batch jobs that want to validate first and commit in a later call.  
    Default: `true`.
*   `noResponseNeeded` (query, boolean) Tells the API whether to send back the updated-cart JSON after it finishes deleting the items.  
    False => The service builds the full response (messages array, updated line-items, follow-up actions) so a UI can refresh immediately.  
    True => The service commits the delete but skips assembling the response body, returning only an HTTP 200.  
    Default: `false`.

#### Responses

*   **152** OK - API request processed. Look for messages in the response to determine if it succeeded or failed.
    
    Media type: `application/json`. Schema: `DeleteCartsItemsResponse`.
    
*   **500**
    
    Internal server error that may occur during cart processing. Below is a comprehensive list of possible error messages and their descriptions to help diagnose and resolve issues:
    
    | Message | Description |
    | --- | --- |
    | Action is invalid | The LineItem's Action\_\_c is invalid. |
    | CardinalityException | Error related to cardinality while executing advanced rules. |
    | Compiled Data with key 'CartCompiledOfferHierarchy' not found | The CachedAPIResponse\_\_c does not contain the 'CartCompiledOfferHierarchy' CacheKey for the latest and active ConfigurationSnapshotId. |
    | Compiled Data with key 'CartCompiledPricingData' not found | The CachedAPIResponse\_\_c does not contain the 'CartCompiledPricingData' CacheKey for the latest and active ConfigurationSnapshotId. |
    | Compiled Data with key 'CompiledPricingVariableMaps' not found | The CachedAPIResponse\_\_c does not contain the 'CompiledPricingVariableMaps' CacheKey for the latest and active ConfigurationSnapshotId. |
    | Compiled Data with key 'pricelist-pbeid-sequence key' not found | The CachedAPIResponse\_\_c does not contain the 'pricelist-pbeid-sequence key' CacheKey for the latest and active ConfigurationSnapshotId. |
    | CPQInvalidPriceList | Cart does not contain a PriceList. |
    | CPQNoItemsToDelete / No Item with the Provided ID Exists in Cart | The Line Item Ids passed in the input are not available to delete. |
    | CPQReadOnlyError | If the IsChangesAllowed\_\_c is set to False on the line item, then deleting it is not allowed. |
    | Delete the {PROMOTION\_NAME} promotion that's associated with the product or child product. Then delete the product. | The item is associated with one specific promotion (shown by {PROMOTION\_NAME}). Remove that promotion before deleting the item. |
    | Delete the {PROMOTION\_NAME} ({NO\_OF\_PROMOS}) promotions that are associated with the product or child product. Then delete the product. | The item is linked to several instances of the same promotion ({PROMOTION\_NAME} repeated {NO\_OF\_PROMOS} times). Delete every instance of that promotion, then delete the item. |
    | Delete the promotions ({NO\_OF\_PROMOS}) that are associated with the product or child product. Then delete the product. | The item you're trying to delete is tied to more than one different promotion. Delete all of them first, then retry the item delete. |
    | Entity Filter failed to evaluate conditions | Error while executing advanced rules. |
    | Invalid id: {CART\_ID} | Empty cartId input parameter or invalid cart type. |
    | InvalidAccountId | Cart is not associated with an Account. |
    | No Header Object found. | Cart does not exist. |
    | No product compiled data found. | No data related to the product in transaction has been found in the CachedAPIResponse\_\_c. |
    | PricebookEntry not found for product : {PRODUCT\_ID} with globalGroupKey {PRODUCT\_GGK} | PricebookEntry information of the product in transaction is not found in the CartDocument. |
    | SellingEndDateException | If the Line Item's SellingEndDate or EndOfLifeDate fall before the Cart's Start Date. |
    | Unable to convert Compiled Context Dimensions to Map | Error while converting the Context Dimensions cached data to a Map. |
    | Unable to get fetchCompiledData2 | Error while fetching the cached data from the CachedAPIResponse\_\_c. |
    | {PRODUCT\_NAME} can not have less than {MIN\_QUANTITY} quantity. | If deletion of a line item violates its minimum quantity configuration. |
    

### POST Checkout Items in a Cart.

`POST /cpq/carts/{cartId}/items/checkout`

Operation ID: `Checkout items`. Tags: Cart.

Based on the header object, submit the object to create a Quote, Order, or Assets.  
If the header object is an Opportunity, submit the Opportunity to create a Quote.  
If the header object is a Quote, submit the Quote to create an Order.  
If the header object is an Order, submit the Order to create Assets.

#### Parameters

*   `cartId` (path, string, required) Salesforce Id of the Cart (Opportunity, Quote or Order).
    
    _Example_
    
    ```
    801xx000003GzX5AAK
    ```
    
*   `validate` (query, boolean) Indicates whether validation rules are run for the current API request (true) or not (false).  
    Default: `true`.
*   `assetizeFullBundlePerRoot` (query, boolean) Flag to indicate whether to assetize the line items by the root item ids.  
    Default: `false`.
*   `validateSubmittedXLI` (query, boolean) Flag to indicate whether to run the line item presubmit validation or not.  
    Default: `false`.
*   `skipCheckoutValidation` (query, boolean) Flag to indicate whether to skip Checkout validation or not.  
    Default: `false`.
*   `checkOrderStatus` (query, boolean) Flag to indicate whether to check the order status on checkout or not.  
    Default: `false`.
*   `provisioningStatus` (query, string) Lets the caller override the default provisioning status that the checkout pipeline assigns to every Asset it creates or clones. Supply a valid pick-list value to have all new assets start in that state; if the key is omitted, checkout falls back to the org's standard "Active" status.
    
    _Example_
    
    ```
    Active
    ```
    
*   `returnOriginalMessage` (query, boolean) Tells the Checkout API whether to bypass the Translation Service and surface the raw, untranslated message text that the CPQ engine produced.  
    Set it to true when your integration or debugging tools need the exact original strings for logging, monitoring, or downstream parsing; leave it false (or omit it) to have the response messages automatically localized by the Translation Service, so users receive user-friendly, language-specific text.  
    Default: `false`.

#### Request body

Media type: `application/json`. Schema: `CheckoutRequest`.

#### Responses

*   **200** OK - API request processed. Look for messages in the response to determine if it succeeded or failed.
    
    Media type: `application/json`. Schema: `CheckoutResponse`.
    
*   **500**
    
    Internal server error that may occur during cart processing. Below is a comprehensive list of possible error messages and their descriptions to help diagnose and resolve issues:
    
    | Message | Description |
    | --- | --- |
    | Checkout \| PCPValidation error | Error while executing PCP rules. |
    | Checkout \| validation rules error | Error while executing advanced rules. |
    | Checkout \|\| Multisite check for canCheckout error | Error while performing checkout of multisite cart. |
    | Compiled Data with key 'CartCompiledOfferHierarchy' not found | The CachedAPIResponse\_\_c does not contain the 'CartCompiledOfferHierarchy' CacheKey for the latest and active ConfigurationSnapshotId. |
    | Compiled Data with key 'CartCompiledPricingData' not found | The CachedAPIResponse\_\_c does not contain the 'CartCompiledPricingData' CacheKey for the latest and active ConfigurationSnapshotId. |
    | Compiled Data with key 'CompiledPricingVariableMaps' not found | The CachedAPIResponse\_\_c does not contain the 'CompiledPricingVariableMaps' CacheKey for the latest and active ConfigurationSnapshotId. |
    | Compiled Data with key 'pricelist-pbeid-sequence key' not found | The CachedAPIResponse\_\_c does not contain the 'pricelist-pbeid-sequence key' CacheKey for the latest and active ConfigurationSnapshotId. |
    | CPQDiscountActivated | No Line Item exists but Discount(s) are Activated in the Cart. |
    | CPQDiscountNotActivatedDiscounts | Discounts in the cart are not Activated. |
    | CPQDiscountUnapproved | Discounts in the cart are not Approved. |
    | CPQInvalidPriceList | Cart does not contain a PriceList. |
    | CPQNoItemsToClone | No Line Item exists in the Cart. |
    | Exception: SObjectClonerUtility \| queryRecords | Unable to fetch SObject records for cloning. |
    | Invalid id: {CART\_ID} | Empty cartId input parameter or invalid cart type. |
    | InvalidAccountId | Cart is not associated with an Account. |
    | No Header Object found. | Cart does not exist. |
    | No product compiled data found. | No data related to the product in transaction has been found in the CachedAPIResponse\_\_c. |
    | Not able to commit cart after Validation/PCPValidation | Error while committing the cart state to the database after executing the validation/PCP rules. |
    | PricebookEntry not found for product : {PRODUCT\_ID} with globalGroupKey {PRODUCT\_GGK} | PricebookEntry information of the product in transaction is not found in the CartDocument. |
    | The following line items that are passed in objectTypeToIdsToClone are not valid | The Line Items present in the Cart are not configured correctly. |
    | Unable to convert Compiled Context Dimensions to Map | Error while converting the Context Dimensions cached data to a Map. |
    | Unable to get fetchCompiledData2 | Error while fetching the cached data from the CachedAPIResponse\_\_c. |
    

### POST Run pricing for given items to a Cart.

`POST /cpq/carts/{cartId}/price`

Operation ID: `Run Pricing for Items to Cart`. Tags: Cart.

Return the pricing information for each line item by invoking pricing rules. If line items are specified, they are priced, but it requires root line itemId to be passed in the items along with the child item. If line items are not specified, all of the items in the cart are priced.

#### Parameters

*   `cartId` (path, string, required) Salesforce Id of the Cart (Opportunity, Quote or Order).
    
    _Example_
    
    ```
    801xx000003GzX5AAK
    ```
    

#### Request body

Request Body with cartId - required

#### Price Cart Request Example

```json
{
    "cartId": "801xx000003H0sxAAC",
    "items": [
      "802xx000001o1YWAAY",
      "802xx000001o1YXAAY"
    ],
    "validate": true
}

```

Media type: `application/json`. Schema: `PriceCartBody`.

#### Responses

*   **101** No Results Found
*   **200**
    
    OK - API request processed. Look for messages in the response to determine if it succeeded or failed.
    
    #### Price Cart Items response Example **Note** - An entire result can be thousands of lines long. This example has been truncated.
    
    ```json
       {
           "totalSize":1
           "messages":[]
           "actions":{}
           "records":[
                 {
                 "messages":[]
                 "actions":{}
                 "displaySequence":-1
                 "productChildItemDefinition":{}
                 "isVirtualItem":false
                 "sequenceNumber":1
                 "groupMinQuantity":0
                 "productId":"01txx0000007CBoAAM"
                 "Product2":{}
                 "ProductCode":"Iphone16"
                 "maxQuantity":99999
                 "hasChildren":true
                 "IsActive":true
                 "defaultQuantity":1
                 "PricebookEntry":{}
                 "groupMaxQuantity":99999
                 "Name":"Iphone16"
                 "UnitPrice":{}
                 "productChildItemId":"a3Pxx0000004ni4EAA"
                 "Product2Id":"01txx0000007CBoAAM"
                 "minQuantity":0
                 "name":"Iphone16"
                 "action":"Add"
                 "Pricebook2Id":"01sxx0000005qRhAAI"
                 "productHierarchyPath":"01txx0000007CBoAAM"
                 "vlocity_cmt__RecurringPrice__c":100
                 "orderActive":false
                 "itemType":"lineItem"
                 "SellingPeriod":"Present"
                 "vlocity_cmt__ProductGroupKey__c":{}
                 "vlocity_cmt__ParentItemId__c":{}
                 "vlocity_cmt__RecurringDiscountPrice__c":{}
                 "vlocity_cmt__ItemName__c":{}
                 "vlocity_cmt__EffectiveOneTimeTotal__c":{
                    "value":130
                    "previousValue": NULL
                    "originalValue": NULL
                    "messages":[]
                    "label":"Effective One Time Total"
                    "hidden":false
                    "fieldName":"vlocity_cmt__EffectiveOneTimeTotal__c"
                    "editable":true
                    "dataType":"CURRENCY"
                    "alternateValues": NULL
                    "actions":{}
                 }
                 "vlocity_cmt__EffectiveRecurringTotal__c":{
                    "value":100
                    "previousValue": NULL
                    "originalValue": NULL
                    "messages":[]
                    "label":"Effective Recurring Total"
                    "hidden":false
                    "fieldName":"vlocity_cmt__EffectiveRecurringTotal__c"
                    "editable":true
                    "dataType":"CURRENCY"
                    "alternateValues": NULL
                    "actions":{}
                 }         
                 "vlocity_cmt__CatalogItemReferenceDateTime__c":{}
                 "ListPrice":{}
                 "vlocity_cmt__CpqCardinalityMessage__c":{}
                 "vlocity_cmt__RecurringManualDiscount__c":{}
                 "vlocity_cmt__CpqPricingMessage__c":{}
                 "vlocity_cmt__IsChangesAllowed__c":{}
                 "vlocity_cmt__OneTimeTotal__c":{
                    "value":130
                    "previousValue": NULL
                    "originalValue": NULL
                    "messages":[]
                    "label":"One Time Total"
                    "hidden":false
                    "fieldName":"vlocity_cmt__OneTimeTotal__c"
                    "editable":false
                    "dataType":"CURRENCY"
                    "alternateValues": NULL
                    "actions":{}
                 }
                 "vlocity_cmt__FulfilmentStatus__c":{}
                 "vlocity_cmt__LineNumber__c":{}
                 "vlocity_cmt__ServiceAccountId__c":{}
                 "vlocity_cmt__RecurringCharge__c":{
                    "value":50
                    "previousValue": NULL
                    "originalValue": NULL
                    "messages":[]
                    "label":"Recurring Charge"
                    "hidden":true
                    "fieldName":"vlocity_cmt__RecurringCharge__c"
                    "editable":false
                    "dataType":"CURRENCY"
                    "alternateValues": NULL
                    "actions":{}
                 }
                 "vlocity_cmt__OneTimeCharge__c":{
                    "value":100
                    "previousValue": NULL
                    "originalValue": NULL
                    "messages":[]
                    "label":"One Time Charge"
                    "hidden":true
                    "fieldName":"vlocity_cmt__OneTimeCharge__c"
                    "editable":false
                    "dataType":"CURRENCY"
                    "alternateValues": NULL
                    "actions":{}
                 }         "vlocity_cmt__SupersededOrderItemId__c":{}
                 "vlocity_cmt__SupplementalAction__c":{}
                 "vlocity_cmt__Product2Id__c":{}
                 "vlocity_cmt__OrderGroupId__c":{}
                 "vlocity_cmt__Action__c":{}
                 "Quantity":{}
                 "vlocity_cmt__OneTimeManualDiscount__c":{}
                 "OrderId":{}
                 "vlocity_cmt__EffectiveQuantity__c":{}
                 "vlocity_cmt__BillingAccountId__c":{}
                 "vlocity_cmt__AssetReferenceId__c":{}
                 "vlocity_cmt__ProvisioningStatus__c":{}
                 "vlocity_cmt__InCartQuantityMap__c":{}
                 "vlocity_cmt__FirstVersionOrderItemId__c":{}
                 "PricebookEntryId":{}
                 "vlocity_cmt__ProductHierarchyPath__c":{}
                 "vlocity_cmt__CpqMessageData__c":{}
                 "vlocity_cmt__RootItemId__c":{}
                 "Id":{}
                 "vlocity_cmt__RecurringCalculatedPrice__c":{}
                 "vlocity_cmt__OneTimeCalculatedPrice__c":{}
                 "productCategories":{}
                 "vlocity_cmt__ServiceAccountId__r":{}
                 "vlocity_cmt__BillingAccountId__r":{}
                 "lineItems":{
                    "totalSize":2
                    "messages":[]
                    "records":[
                       {
                       "messages":[]
                       "actions":{}
                       "displaySequence":-1
                       "productChildItemDefinition":{}
                       "isVirtualItem":false
                       "sequenceNumber":1
                       "groupMinQuantity":0
                       "productId":"01txx0000007CDQAA2"
                       "Product2":{}
                       "ProductCode":"Iphone16-Case"
                       "maxQuantity":10
                       "hasChildren":false
                       "IsActive":true
                       "defaultQuantity":1
                       "PricebookEntry":{}
                       "groupMaxQuantity":99999
                       "Name":"Iphone16-Case"
                       "UnitPrice":{}
                       "productChildItemId":"a3Pxx0000004nlIEAQ"
                       "Product2Id":"01txx0000007CDQAA2"
                       "minQuantity":0
                       "name":"Iphone16-Case"
                       "action":"Add"
                       "Pricebook2Id":"01sxx0000005qRhAAI"
                       "productHierarchyPath":"01txx0000007CBoAAM<01txx0000007CDQAA2"
                       "vlocity_cmt__RecurringPrice__c":0
                       "orderActive":false
                       "itemType":"lineItem"
                       "SellingPeriod":"Present"
                       "vlocity_cmt__ProductGroupKey__c":{}
                       "vlocity_cmt__ParentItemId__c":{}
                       "vlocity_cmt__RecurringDiscountPrice__c":{}
                       "vlocity_cmt__ItemName__c":{}
                       "vlocity_cmt__EffectiveOneTimeTotal__c":{}
                       "vlocity_cmt__EffectiveRecurringTotal__c":{}
                       "vlocity_cmt__CatalogItemReferenceDateTime__c":{}
                       "ListPrice":{}
                       "vlocity_cmt__CpqCardinalityMessage__c":{}
                       "vlocity_cmt__RecurringManualDiscount__c":{}
                       "vlocity_cmt__CpqPricingMessage__c":{}
                       "vlocity_cmt__IsChangesAllowed__c":{}
                       "vlocity_cmt__OneTimeTotal__c":{
                          "value":30
                          "previousValue": NULL
                          "originalValue": NULL
                          "messages":[]
                          "label":"One Time Total"
                          "hidden":false
                          "fieldName":"vlocity_cmt__OneTimeTotal__c"
                          "editable":false
                          "dataType":"CURRENCY"
                          "alternateValues": NULL
                          "actions":{}
                       }
                       "vlocity_cmt__FulfilmentStatus__c":{}
                       "vlocity_cmt__LineNumber__c":{}
                       "vlocity_cmt__ServiceAccountId__c":{}
                       "vlocity_cmt__RecurringCharge__c":{}
                       "vlocity_cmt__OneTimeCharge__c":{}
                       "vlocity_cmt__SubAction__c":{}
                       "vlocity_cmt__CurrencyPaymentMode__c":{}
                       "vlocity_cmt__ProductHierarchyGroupKeyPath__c":{}
                       "vlocity_cmt__RecurringTotal__c":{
                          "value":0
                          "previousValue": NULL
                          "originalValue": NULL
                          "messages":[]
                          "label":"Recurring Total"
                          "hidden":false
                          "fieldName":"vlocity_cmt__RecurringTotal__c"
                          "editable":false
                          "dataType":"CURRENCY"
                          "alternateValues": NULL
                          "actions":{}
                       }
                       "vlocity_cmt__SupersededOrderItemId__c":{}
                       "vlocity_cmt__SupplementalAction__c":{}
                       "vlocity_cmt__Product2Id__c":{}
                       "vlocity_cmt__OrderGroupId__c":{}
                       "vlocity_cmt__Action__c":{}
                       "Quantity":{}
                       "vlocity_cmt__OneTimeManualDiscount__c":{}
                       "OrderId":{}
                       "vlocity_cmt__EffectiveQuantity__c":{}
                       }
                       {}
                    ]
                 }
                 "childProducts":{}
              }
           ]
        }
    
    ```
    
*   **500** Invalid Id Field

### GET Get Products for Cart

`GET /cpq/carts/{cartId}/products`

Operation ID: `getCartsProducts`. Tags: Cart.

Retrieves a list of products available for a specific cart. Supports filtering by search text, product attributes, categories, and price list. Pagination is available via page size, offset, and last record ID parameters. Caching can be enabled with maxRecords and eaCacheKey. Only products available under the cart's price list are returned. Authentication via Bearer token is required. NOTE:

*   The ProductChildItemDefinition behaves differently based on the cart type.
    *   For Classic Cart the childLineNumber is returned as an integer, for example childLineNumber = 1
    *   For Standard Cart the childLineNumber is returned as an decimal, for example childLineNumber = 1.0
*   Currently, productCategories are not included in Standard Cart APIs, as support for ProdCatalogInfoOpen is not available in Standard, unlike Classic.

#### Parameters

*   `cartId` (path, string, required) Salesforce Id of the Cart (Opportunity/Quote/Order) in which the Promotion has to be added.
*   `pagesize` (query, integer) Specifies the maximum number of products to return in a single response. Controls pagination size for result sets.  
    Default: `20`. Example: `10`.
*   `query` (query, string) Search text for product filtering. Executes queries against Product2.Name and Product2.Description fields by default. Use the searchBy parameter to specify custom search fields, with PricebookEntry as the parent object context.  
    Example: `PRODUCT-11`.
*   `lastRecordId` (query, string) Record identifier from the previous search result set. Used for cursor-based pagination to retrieve the next batch of records.
*   `offsetSize` (query, integer) Number of records to skip from the beginning of the result set. Used for offset-based pagination.  
    Example: `10`.
*   `includeAttachments` (query, boolean) Determines whether product attachments are included in the response. Set to true to include attachments, false to exclude them.  
    Default: `false`.
*   `includeAttributes` (query, boolean) Controls whether product attributes and their associated values are returned in the response.  
    Default: `false`. Example: `true`.
*   `includeIneligible` (query, boolean) Specifies whether to include both qualified and disqualified products in the response. When true, returns all products regardless of eligibility status.  
    Default: `false`. Example: `true`.
*   `sortBy` (query, string) Defines the sorting criteria for returned products. Accepts field names with optional sort direction suffixes: \_ASC (ascending), \_DESC (descending), or no suffix for default ordering.  
    Example: `Product2.Name_DESC, Product2.Code`.
*   `searchBy` (query, string) Comma-separated list of field names to search when the query parameter is provided. Overrides default search behavior to target specific fields for text matching.  
    Example: `Product2.Name,Product2.Description`.
*   `maxRecords` (query, integer) Maximum number of product records to process and cache (limit: 1000). Used in conjunction with eaCacheKey for optimized caching of qualified products.  
    Example: `50`.
*   `eaCacheKey` (query, string) Unique identifier for caching product lists. Should be constructed to ensure uniqueness per cart, catalog, and relevant context dimensions for efficient cache management.  
    Example: `cart1234-user5678-20240601`.
*   `eaCheck` (query, boolean) Enables Eligibility and Availability (EA) rule evaluation. When true, applies configured EA rules to filter products that don't meet eligibility or availability criteria.  
    Default: `true`. Example: `false`.
*   `attributes` (query, string) Product attribute-based filtering criteria. Format: :\_,:|. Supports both discrete values and numeric ranges (min/max).  
    Example: `Color:Red_Blue,Size:10|20`.
*   `fields` (query, string) Comma-separated list of field names to include in the response. Controls which product or item fields are returned in the result set.  
    Example: `Name,Description,UnitPrice,vlocity_cmt__RecurringCharge__c`.
*   `filterByPriceListOnly` (query, boolean) Restricts results to products associated with the specified price list. When true, excludes products not present in the target price list.  
    Example: `true`.
*   `filters` (query, string) Field-based filtering criteria in the format :\_. Multiple filters can be specified using comma separation. Supports multiple values per field using underscore separation.  
    Example: `h_cpq__ServiceAccountId__c:991360000008eNU_991360000008eNY,h_cpq__BillingAccountId__c:01t36000000pfcKAAQ_01t36000000pfcKAAQ`.
*   `category` (query, string) Comma-separated list of product category identifiers for category-based filtering. Restricts results to products belonging to the specified categories.  
    Example: `a10LT00001FSy05,a10LT00001FSz05,a10LT00001FSx05`.
*   `parentId` (query, string) The unique identifier of the parent product. Use this to specify the parent node in the product hierarchy from which child products should be retrieved. This is required only when querying for child products/items under a specific parent.  
    Example: `01t5g00000A1b2C`.
*   `parentProductHierarchyPath` (query, string) The full hierarchy path of the parent product, represented as a string of product IDs separated by the < character. This path encodes the ancestry of the current node in the product hierarchy, allowing the API to determine the current position and context within nested bundles. Used together with parentId for nested queries.  
    Example: `01t5g00000A1b2C<01t5g00000A1b2D`.
*   `maxProdListHierarchy` (query, string) Specifies the maximum depth of the product hierarchy to be returned in the product list. This controls how many levels deep the API will traverse when returning child products, preventing excessive recursion and limiting the size of the response. If not provided, the value is taken from the CPQ configuration (DefaultMaxHierarchyDepthForProdList), or defaults to 0. If the current hierarchy level (as determined by the number of segments in parentProductHierarchyPath) equals this value, the API will not return further child products.  
    Example: `2`.
*   `parentItemId` (query, string) The unique identifier of the parent item instance in the cart (such as a line item in a quote or order). Use this when the query context is a specific cart item, rather than a product definition. This is relevant for operations that need to reference a specific cart item instance, such as line item customizations. Not always required for product hierarchy queries.  
    Example: `a1B5g00000A1b2E`.

#### Responses

*   **200**
    
    Successful response with product list.
    
    Note: The following example is trimmed for brevity and does not include all possible response fields.
    
    Example:
    
    ```json
    {
      "totalSize": 2,
      "messages": [],
      "records": [
        {
          "Product2": {
            "Name": "PRODUCT-46223",
            "Id": "01tLT0000093Pr7YAE"
          },
          "UnitPrice": {
            "label": "List Price",
            "value": 3472.87
          },
          "IsActive": {
            "label": "Active",
            "value": true
          },
          "Name": {
            "label": "Product Name",
            "value": "PRODUCT-46223"
          },
          "ProductCode": {
            "label": "Product Code",
            "value": "CODE-88388"
          }
        }
      ]
    }
    ```
    
    Media type: `application/json`. Schema: `GetCartsProductsResponse`.
    
*   **400**
    
    Bad request or invalid input.
    
    Example (invalid maxRecords):
    
    ```json
    {
      "messages": [
        {
          "message": "maxRecords must be a positive integer.",
          "messageId": "INVOKE-500",
          "code": "Invalid input: maxRecords must be a positive integer.",
          "severity": "ERROR"
        }
      ],
      "totalSize": 0
    }
    ```
    
    Example (no qualified products found):
    
    ```json
    {
      "messages": [
        {
          "message": "CPQNoResultsFound",
          "code": "101",
          "severity": "ERROR"
        }
      ],
      "totalSize": 0
    }
    ```
    
    Media type: `application/json`. Schema: `GetCartsProductsErrorResponse`.
    
*   **default** Unexpected error

### DELETE Delete Applied Promotion from a Cart.

`DELETE /cpq/carts/{cartId}/promotions`

Operation ID: `Delete Applied Promotion`. Tags: Cart.

All-in-one operation that cleanly removes a promotion from a CPQ cart, along with any promo-generated items while automatically recalculating prices and re-checking cart rules.

#### Parameters

*   `cartId` (path, string, required) Salesforce Id of the Cart (Opportunity, Quote or Order).
    
    _Example_
    
    ```
    801xx000003GzX5AAK
    ```
    
*   `id` (query, string, required) Comma-separated Applied Promotion Id(s) to delete.
    
    _Example_
    
    ```
    a2Lf40000008nL5EAI,a2Lf40000008nL5FVG
    ```
    
*   `price` (query, boolean) Indicates whether to run the pricing engine (true) or not (false).  
    Default: `true`.
*   `validate` (query, boolean) Indicates whether validation rules are run for the current API request (true) or not (false).  
    Default: `true`.
*   `checkActivePromos` (query, boolean) Controls whether the API prevents or allows deletions that would leave an active promotion without associated items.  
    True => If any target line-item is tied to an active promotion, the call throws a validation error (code 406) — unless the custom setting DELETE\_APPLIED\_PROMO=true, in which case the promotion itself is first deleted and the item delete proceeds.  
    False => Items are deleted even if they belong to an active promotion.  
    Default: `true`.
*   `proceedToCommit` (query, boolean) Flag that tells the Delete Cart Items service whether to finish the transaction or stop after all validations.  
    True => After the items pass validation, the service commits the deletes and writes the cart back to the database.  
    False => The service still runs every check (promotion guard, cardinality rules, etc.) but does not save any changes, it returns the validation result only. Useful for "pre-check" buttons or batch jobs that want to validate first and commit in a later call.  
    Default: `true`.
*   `DeleteServices` (query, string) If YES, DEFAULT, or NULL, enables deep delete mode, which deletes promotion pricing and products from the cart. If NO, enables shallow delete mode, which removes promotion pricing but not promotion products from the cart.
    
    _Example_
    
    ```
    Default
    ```
    
*   `cancellationDate` (query, string) Specify a Cancellation Date for the Applied Promotion that is being deleted.
*   `cancellationReason` (query, string) Specify a Cancellation Reason for the Applied Promotion that is being deleted.
*   `checkForAppliedAction` (query, boolean) Indicates whether to check the Applied Action of the Promotion that is being deleted.  
    Default: `true`.

#### Responses

*   **152** OK - API request processed. Look for messages in the response to determine if it succeeded or failed.
    
    Media type: `application/json`. Schema: `DeleteAppliedPromoResponse`.
    
*   **500**
    
    Internal server error that may occur during cart processing. Below is a comprehensive list of possible error messages and their descriptions to help diagnose and resolve issues:
    
    | Message | Description |
    | --- | --- |
    | Compiled Data with key 'CartCompiledOfferHierarchy' not found | The CachedAPIResponse\_\_c does not contain the 'CartCompiledOfferHierarchy' CacheKey for the latest and active ConfigurationSnapshotId. |
    | Compiled Data with key 'CartCompiledPricingData' not found | The CachedAPIResponse\_\_c does not contain the 'CartCompiledPricingData' CacheKey for the latest and active ConfigurationSnapshotId. |
    | Compiled Data with key 'CompiledPricingVariableMaps' not found | The CachedAPIResponse\_\_c does not contain the 'CompiledPricingVariableMaps' CacheKey for the latest and active ConfigurationSnapshotId. |
    | Compiled Data with key 'pricelist-pbeid-sequence key' not found | The CachedAPIResponse\_\_c does not contain the 'pricelist-pbeid-sequence key' CacheKey for the latest and active ConfigurationSnapshotId. |
    | CPQInvalidPriceList | Cart does not contain a PriceList. |
    | CPQNoItemsToDelete / No Item with the Provided ID Exists in Cart | The Line Item Ids passed in the input are not available to delete. |
    | Delete the promotions ({NO\_OF\_PROMOS}) that are associated with the product or child product. Then delete the product. | The item you're trying to delete is tied to more than one different promotion. Delete all of them first, then retry the item delete. |
    | Delete the {PROMOTION\_NAME} promotion that's associated with the product or child product. Then delete the product. | The item is associated with one specific promotion (shown by {PROMOTION\_NAME}). Remove that promotion before deleting the item. |
    | Delete the {PROMOTION\_NAME} ({NO\_OF\_PROMOS}) promotions that are associated with the product or child product. Then delete the product. | The item is linked to several instances of the same promotion ({PROMOTION\_NAME} repeated {NO\_OF\_PROMOS} times). Delete every instance of that promotion, then delete the item. |
    | Entity Filter failed to evaluate conditions | Error while executing advanced rules. |
    | Invalid id: {CART\_ID} | Empty cartId input parameter or invalid cart type. |
    | InvalidAccountId | Cart is not associated with an Account. |
    | No Header Object found. | Cart does not exist. |
    | No product compiled data found. | No data related to the product in transaction has been found in the CachedAPIResponse\_\_c. |
    | PricebookEntry not found for product : {PRODUCT\_ID} with globalGroupKey {PRODUCT\_GGK} | PricebookEntry information of the product in transaction is not found in the CartDocument. |
    | {PRODUCT\_NAME} is still present as a service, even after deleting the promotion. Please request to remove if you wish. | This implies that the product associated with the applied promotion has not been deleted. |
    | Unable to convert Compiled Context Dimensions to Map | Error while converting the Context Dimensions cached data to a Map. |
    | Unable to get fetchCompiledData2 | Error while fetching the cached data from the CachedAPIResponse\_\_c. |
    

### POST Replace Offers in Cart

`POST /cpq/carts/{cartId}/offermigration/replacement`

Operation ID: `replaceOffers`. Tags: Cart.

Replaces an assetized product (source product) with another product from the same product family (target product) within an order or quote. Preserves attributes, child products, and specific fields from the original order line item (OLI) during the replacement. See documentation for details on attribute copying, child product handling, and field settings.

#### Parameters

*   `cartId` (path, string, required) Salesforce Id of the Cart (Opportunity/Quote/Order) in which the replacement is to be performed.

#### Request body (required)

Media type: `application/json`. Schema: `ReplaceOffersRequest`.

#### Responses

*   **200**
    
    Success response for Replace Offers operation.
    
    Example:
    
    ```json
    {
      "actions": {
        "itempricesupdated": {
          "client": { "params": {} },
          "remote": { "params": {} },
          "rest": {
            "method": "GET",
            "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H57rAAC/price?price=false&cartId=801xx000003H57rAAC",
            "params": {}
          }
        }
      },
      "messages": [
        {
          "message": "Replacement applied successfully",
          "code": "830",
          "severity": "INFO"
        }
      ],
      "totalSize": 0
    }
    ```
    
    Media type: `application/json`. Schema: `ReplaceOffersResponse`.
    
*   **400**
    
    Bad request or invalid input.
    
    Example (missing targetOfferIdToItemIds):
    
    ```json
    {
      "messages": [
        {
          "message": "Target product(s) not found.",
          "code": "109",
          "severity": "ERROR"
        }
      ],
      "totalSize": 0
    }
    ```
    
    Media type: `application/json`. Schema: `ReplaceOffersErrorResponse`.
    
*   **default** Unexpected error

## Schemas

### AssetToOrderRequest

*   `subaction` (_string_, required) This parameter specifies the required method to invoke from createCart. In this case, the subaction should be set to assetToOrder. This parameter is only necessary for REST API calls.  
    Example: `assetToOrder`.
*   `id` (_string_, required) Comma-separated Salesforce IDs of the Assets to be added to FDO.
*   `accountId` (_string_) The Salesforce ID of the Account where the assets are located. If this is not provided in the input request, a root asset account will be used by default.
*   `orderId` (_string_) The Salesforce ID of the Order to which the assets should be transferred.
*   `requestDate` (_string_) It is the Future Dated Order request date. Either requestDate or requestDateTime is mandatory parameter to the request. Otherwise, API would fail with an error.  
    Example: `2025-05-16`.
*   `requestDateTime` (_string_) It is the Future Dated Order requested start date. Either requestDate or requestDateTime is mandatory parameter to the request. Otherwise, API would fail with an error.  
    Example: `2025-05-16T00:00:00.000Z`.
*   `price` (_boolean_) Indicates whether to run the pricing engine or not.  
    Default: `false`.
*   `validate` (_boolean_) Indicates whether validation rules has to be run for the current API request or not.  
    Default: `false`.

### AssetToOrderResponse

*   `totalSize` (_integer_) Total number of records.  
    Example: `0`.
*   `messages` (_array of string_) Array of informational or error messages.  
    Items: Example: `Error message`.
*   `records` (_array of object_)
    *   `messages` (_array of string_)  
        Items: Example: `Error message`.
    *   `cartId` (_string_)  
        Example: `801xx000003H3nbAAC`.
    *   `displaySequence` (_integer_)  
        Example: `-1`.

### GetCartsResponse

Response containing cart details, associated sites, and metadata

*   `totalSize` (_integer_) Total number of cart records returned in the response  
    Example: `1`.
*   `messages` (_array of string_) Array of messages at the root level for overall response status or errors
*   `records` (_array of object_) Array of cart records containing detailed cart information
    *   `messages` (_array of string_) Messages specific to this cart record
    *   `displaySequence` (_integer_) Ordering sequence for display purposes
    *   `details` (_object_) Detailed information about the cart
        *   `totalSize` (_integer_) Total number of detail records  
            Example: `1`.
        *   `messages` (_array of string_) Messages specific to cart details
        *   `records` (_array of object_) Array of detailed cart records containing pricing, status, and configuration
            *   `messages` (_array of string_) Messages specific to this cart detail record
            *   `actions` (_object_) Available actions that can be performed on the cart
                *   `checkout` (_object_) Checkout action configuration and endpoints
                    *   `remote` (_object_) Remote action configuration for checkout
                        *   `params` (_object_) Parameters required for remote checkout action
                            *   `cartId` (_string_) Unique identifier of the cart for checkout  
                                Example: `801DX000000FERDYA4`.
                            *   `methodName` (_string_) Name of the method to be invoked for checkout  
                                Example: `checkout`.
                    *   `rest` (_object_) REST endpoint configuration for checkout
                        *   `method` (_string_) HTTP method for the REST endpoint
                        *   `link` (_string_) REST endpoint URL
                        *   `params` (_object_) Parameters for the REST endpoint
                    *   `client` (_object_) Client-side configuration for checkout
                        *   `params` (_object_) Client-side parameters for checkout
                        *   `records` (_array of string_) Client-side records for checkout processing
            *   `displaySequence` (_integer_) Display order sequence for the cart detail
            *   `frameAgreementPresent` (_boolean_) Indicates if a frame agreement is associated with the cart  
                Example: `false`.
            *   `isNotActiveContractDiscountPresent` (_boolean_) Indicates if inactive contract discounts are present  
                Example: `false`.
            *   `PriceListId__r.LoyaltyCode__c` (_string_) Loyalty code associated with the price list  
                Example: `PTS`.
            *   `SupersededOrderId__c` (_string_) Id of the order that this order supersedes, if any
            *   `OrderNumber` (_string_) Unique order number for the cart  
                Example: `00001281`.
            *   `PriceListId__r.CurrencyCode__c` (_string_) Currency code for the price list  
                Example: `USD`.
            *   `translatedLabels` (_object_) Localized labels for cart fields and attributes
                
                Additional properties: `string`.
                
                _Example_
                
                ```
                {
                  "Status": "Status",
                  "IsChangesAllowed__c": "Changes Allowed",
                  "EffectiveRecurringTotal__c": "Recurring Total",
                  "OriginatingContractId__c": "Originating Contract",
                  "OrderNumber": "Order Number"
                }
                ```
                
            *   `EffectiveRecurringTotal__c` (_number_) Total recurring charges for the cart  
                Example: `358`.
            *   `canCheckoutDiscounts` (_boolean_) Indicates if discounts can be applied during checkout  
                Example: `true`.
            *   `EffectiveUsagePriceTotal__c` (_number_) Total usage-based charges for the cart  
                Example: `0`.
            *   `PriceListId__c` (_string_) Id of the price list associated with the cart  
                Example: `a3sDX00000003lJYAQ`.
            *   `accountDiscountsCount` (_integer_) Number of account-level discounts applied to the cart  
                Example: `0`.
            *   `ObjectType` (_string_) Type of the object (Order, Quote or Opportunity)  
                Example: `Order`.
            *   `Account.Id` (_string_) Id of the account associated with the cart  
                Example: `001DX000002K5WlYAK`.
            *   `orderStatusValue` (_string_) Current status value of the order  
                Example: `Ready To Submit`.
            *   `Account.PhotoUrl` (_string_) URL of the account's profile photo  
                Example: `/services/images/photo/001DX000002K5WlYAK`.
            *   `cartAddedDiscounts` (_integer_) Number of discounts added to the cart  
                Example: `1`.
            *   `Status` (_string_) Current status of the cart  
                Example: `Draft`.
            *   `EffectiveOneTimeTotal__c` (_number_) Total one-time charges for the cart  
                Example: `0`.
            *   `IsChangesAllowed__c` (_boolean_) Indicates if modifications to the cart are allowed  
                Example: `true`.
            *   `contractDiscountsCount` (_integer_) Number of contract-level discounts applied to the cart  
                Example: `0`.
            *   `OrderStatus__c` (_string_) Detailed order status  
                Example: `Ready To Submit`.
            *   `PriceListId__r.Name` (_string_) Name of the price list associated with the cart  
                Example: `TEST_PRICELIST`.
            *   `discountsForSubmission` (_boolean_) Indicates if there are discounts pending submission  
                Example: `false`.
            *   `EffectiveOrderTotal__c` (_number_) Total amount for the entire order including all charges  
                Example: `0`.
            *   `Account.Name` (_string_) Name of the account associated with the cart  
                Example: `TestAcct`.
            *   `Id` (_string_) Unique identifier of the cart  
                Example: `801DX000000FERDYA4`.
            *   `isCartActivated` (_boolean_) Indicates if the cart has been activated  
                Example: `false`.
    *   `sites` (_object_) Information about service locations or sites associated with the cart
        *   `totalSize` (_integer_) Total number of sites associated with the cart  
            Example: `0`.
        *   `messages` (_array of object_) Messages related to site operations or status
            *   `messageId` (_string_) Unique identifier for the message
            *   `bundleId` (_string_) Id of the associated bundle if applicable
            *   `code` (_string_) Message code for categorization  
                Example: `101`.
            *   `severity` (_string_) Severity level of the message  
                Example: `ERROR`.
            *   `message` (_string_) Detailed message text  
                Example: `No Results Found.`.
            *   `actions` (_object_) Available actions related to this message
        *   `actions` (_object_) Available actions for site management
            *   `newsite` (_object_) Configuration for creating a new site
                *   `remote` (_object_) Remote action configuration for site creation
                    *   `params` (_object_) Parameters for remote site creation
                        *   `methodName` (_string_) Method name for creating a new site  
                            Example: `newSite`.
                        *   `type` (_string_) Type of site to be created  
                            Example: `Service`.
                *   `rest` (_object_) REST endpoint configuration for site creation
                    *   `method` (_string_) HTTP method for the site creation endpoint  
                        Example: `POST`.
                    *   `link` (_string_) REST endpoint URL for site creation  
                        Example: `/services/apexrest/vlocity_cmt/v2/cpq/carts/801DX000000FERDYA4/sites`.
                    *   `params` (_object_) Parameters for the site creation endpoint
                        *   `type` (_string_) Type of site to create  
                            Example: `Service`.
                *   `client` (_object_) Client-side configuration for site creation
                    *   `params` (_object_) Client-side parameters for site creation
                    *   `records` (_array of string_) Client-side records for site creation

### UpdateCartItemRequest

Request for the update cart item

*   `items` (_UpdateCartItem_)

### PostCartsItemsRequest

*   `validate` (_boolean_) Indicates whether validation rules have to be run for the current API request or not.  
    Default: `true`. Example: `true`.
*   `items` (_array of PostCartsItemsItem_) A list of items to be added. Each item object contains specific fields depending on the type of add.
*   `cartId` (_string_) The unique identifier for the cart.  
    Example: `801xx000003H4WlAAK`.
*   `price` (_boolean_) Indicates whether to run the pricing engine or not.  
    Default: `true`. Example: `true`.
*   `quantity` (_integer_) The quantity of the item to be added.  
    Example: `3`.
*   `noResponseNeeded` (_boolean_) Returns no result node when set to true.  
    Default: `false`. Example: `false`.

### PostCartsItemsResponse

*   `totalSize` (_integer_)
*   `messages` (_array of PostCartsItemsMessage_)
*   `actions` (_object_)
*   `records` (_array of object_)

### PostCartsItemsErrorResponse

*   `messages` (_array of PostCartsItemsMessage_)
*   `totalSize` (_integer_)

### DeleteCartsItemsResponse

*   `totalSize` (_integer_)
*   `messages` (_array of object_) Array of informational or error messages.
    *   `code` (_string_)  
        Example: `152`.
    *   `severity` (_string_)  
        Example: `INFO`.
    *   `message` (_string_)  
        Example: `Successfully deleted.`.
*   `actions` (_object_)
    *   `itempricesupdated` (_object_)
        *   `remote` (_object_)
            *   `methodName` (_string_) Name of the remote method to retrieve updated cart line item prices after deletion.  
                Example: `getCartLineItemPrices`.
            *   `params` (_object_) Parameters required by the remote method for price retrieval.
                *   `cartId` (_string_) Unique identifier of the cart for which prices are being updated.  
                    Example: `801xx000003H0D1AAK`.
                *   `price` (_boolean_) Indicates whether to run the pricing engine (true) or not (false) when updating prices after deletion.  
                    Example: `false`.

### CheckoutRequest

*   `validate` (_boolean_) Indicates whether validation rules are run for the current API request (true) or not (false).  
    Example: `true`.
*   `validateSubmittedXLI` (_boolean_) Flag to indicate whether to run the line item presubmit validation or not.  
    Example: `false`.
*   `assetizeFullBundlePerRoot` (_boolean_) Flag to indicate whether to assetize the line items by the root item ids.  
    Example: `false`.

### CheckoutResponse

*   `totalSize` (_integer_) Total number of records returned in the response  
    Example: `1`.
*   `messages` (_array of object_) Array of informational or error messages.
    *   `code` (_string_)  
        Example: `SUBMIT-1008`.
    *   `severity` (_string_)  
        Example: `INFO`.
    *   `message` (_string_)  
        Example: `Order 801xx000003H0JTAA0 was assetized and activated.`.
*   `records` (_array of object_) Array of record objects returned by the checkout operation.
    *   `messages` (_array of string_) Messages specific to this record
    *   `displaySequence` (_integer_) Display order sequence for the record
    *   `clonedObjectIds` (_string_) JSON stringified array of cloned object Ids  
        Example: `["02ixx0000004N2AAAU"]`.
    *   `id` (_string_) The unique identifier for the record  
        Example: `001xx000003H0HrAAK`.
    *   `objectType` (_string_) The type of the object (e.g., Account, Order, etc.)  
        Example: `Account`.

### PriceCartBody

Request body sent in for price cart

*   `cartId` (_string_)  
    Example: `8011N00000157LkQAI`.
*   `methodName` (_string_)  
    Example: `priceCart`.
*   `validate` (_boolean_)  
    Example: `true`.
*   `items` (_array of string_)
    
    _Example_
    
    ```
    [
      "80279000000Y5C9AAK",
      "80279000000Y5CAAA0"
    ]
    ```
    

### GetCartsProductsResponse

*   `totalSize` (_integer_)
*   `messages` (_array of GetCartsProductsMessage_)
*   `records` (_array of GetCartsProductsRecord_)

### GetCartsProductsErrorResponse

*   `messages` (_array of GetCartsProductsMessage_)
*   `totalSize` (_integer_)

### DeleteAppliedPromoResponse

*   `totalSize` (_integer_) Total number of records affected by the delete operation.  
    Example: `0`.
*   `messages` (_array of object_) Array of informational or error messages.
    *   `code` (_string_)  
        Example: `152`.
    *   `severity` (_string_)  
        Example: `INFO`.
    *   `message` (_string_)  
        Example: `Successfully deleted.`.
*   `actions` (_object_) Actions and follow-up operations available after the delete operation.
    *   `itempricesupdated` (_object_)
        *   `rest` (_object_)
            *   `params` (_object_)
            *   `method` (_string_)
            *   `link` (_string_)
        *   `remote` (_object_)
            *   `params` (_object_)
                *   `cartId` (_string_) Unique identifier of the cart for which prices are being updated.  
                    Example: `801xx000003H0JTAA0`.
                *   `price` (_boolean_) Indicates whether to run the pricing engine (true) or not (false) when updating prices after deletion.  
                    Example: `false`.
                *   `methodName` (_string_) Name of the remote method to retrieve updated cart line item prices after deletion.  
                    Example: `getCartLineItemPrices`.
        *   `client` (_object_)
            *   `params` (_object_)
    *   `itemdeleted` (_object_)
        *   `rest` (_object_)
            *   `params` (_object_)
            *   `method` (_string_)
            *   `link` (_string_)
        *   `remote` (_object_)
            *   `params` (_object_)
                *   `items` (_array of object_)
                    *   `message` (_string_)  
                        Example: `Test_Promo has been deleted from the cart.`.
                    *   `Id` (_string_)  
                        Example: `a35xx000000rOLhAAM`.
        *   `client` (_object_)
            *   `params` (_object_)
                *   `items` (_array of object_)
                    *   `message` (_string_)  
                        Example: `Test_Promo has been deleted from the cart.`.
                    *   `Id` (_string_)  
                        Example: `a35xx000000rOLhAAM`.

### ReplaceOffersRequest

*   `attributeCodesToCopyDuringReplace` (_array of string_) List of attribute codes that should be copied from the source to the target during replacement.
    
    _Example_
    
    ```
    [
      "CMT-9413-4",
      "CMT-9413"
    ]
    ```
    
*   `targetOfferIdToItemIds` (_string_) Maps the target PricebookEntry ID to source OrderItem IDs to be replaced in the format: "targetOfferPbeId1:OrderItemId1\_OrderItemId2,targetOfferPbeId2:OrderItemId3\_OrderItemId4"  
    Example: `01uf40000039ps9AAA:802f400000Pxl2mAAB_802f400000Pul2mAAB`.
*   `price` (_boolean_) Executes pricing on the line items and applies discount/promotion adjustments/overrides if defined and also rollups and totals for cart.  
    Default: `true`. Example: `true`.
*   `validate` (_boolean_) Executes advanced rules if set to true.  
    Default: `false`. Example: `true`.

### ReplaceOffersResponse

*   `actions` (_object_)
    *   `itempricesupdated` (_object_)
        *   `client` (_object_)
            *   `params` (_object_)
        *   `remote` (_object_)
            *   `params` (_object_)
        *   `rest` (_object_)
            *   `method` (_string_)  
                Example: `GET`.
            *   `link` (_string_)  
                Example: `/services/apexrest/vlocity_cmt/v2/cpq/carts/801xx000003H57rAAC/price?price=false&cartId=801xx000003H57rAAC`.
            *   `params` (_object_)
*   `messages` (_array of ReplaceOffersMessage_)
*   `totalSize` (_integer_)

### ReplaceOffersErrorResponse

*   `messages` (_array of ReplaceOffersMessage_)
*   `totalSize` (_integer_)

### UpdateCartItem

Request for the update cart item

*   `records` (_array of Cart_)

### PostCartsItemsItem

*   `itemId` (_string_) Pricebook entry id of the product to be added.  
    Example: `01uxx00000099gxAAA`.
*   `fieldsToUpdate` (_object_) Used to update cart item fields. When passing price fields (`UnitPrice`, `ListPrice`), set `price` to `false` so caller-supplied values persist. When `price` is `true` (the default), the pricing engine runs after these values are applied and can overwrite price fields based on pricebook entries and pricing plan rules.
*   `parentId` (_string_) The unique identifier for the parent item.  
    Example: `802xx000001ni7fAAA`.
*   `parentHierarchyPath` (_string_) The product hierarchy path of the parent item.  
    Example: `01txx0000006qMaAAI`.
*   `parentRecord` (_PostCartsItemsParentRecord_) Contains records related to the parent item. See the table below for required/optional fields.

### PostCartsItemsMessage

*   `code` (_string_)
*   `severity` (_string_)
*   `message` (_string_)

### GetCartsProductsMessage

*   `message` (_string_)
*   `code` (_string_)
*   `severity` (_string_)

### GetCartsProductsRecord

*   `Product2` (_object_)
    *   `Name` (_string_)
    *   `Id` (_string_)
*   `UnitPrice` (_object_)
    *   `label` (_string_)
    *   `value` (_number_)
*   `IsActive` (_object_)
    *   `label` (_string_)
    *   `value` (_boolean_)
*   `Name` (_object_)
    *   `label` (_string_)
    *   `value` (_string_)
*   `ProductCode` (_object_)
    *   `label` (_string_)
    *   `value` (_string_)

### ReplaceOffersMessage

*   `message` (_string_)
*   `code` (_string_)
*   `severity` (_string_)

### Cart

*   `messages` (_Messages_)
*   `actions` (_Action_)
*   `displaySequence` (_integer_) Sequence to display in the UI.  
    Example: `-1`.
*   `Id` (_string_)  
    Example: `8016A000000bwElQAI`.
*   `Name` (_string_)  
    Example: `New customer order`.
*   `EffectiveDate` (_string (date)_)  
    Example: `2017-12-25`.
*   `AccountId` (_string_)  
    Example: `0016A0000053kHN`.
*   `Account.Name` (_string_)  
    Example: `Acme Inc.`.
*   `EffectiveRecurringTotal__c` (_number (float)_)
*   `EffectiveOneTimeTotal__c` (_number (float)_)
*   `EffectiveOrderTotal__c` (_number (float)_)
*   `OrderNumber` (_string_) Order Number assigned by Salesforce  
    Example: `00000141`.
*   `Status` (_string_)  
    Example: `Draft`.

### PostCartsItemsParentRecord

Contains records related to the parent item. Used for child adds, especially under virtual parents. See field descriptions for required/optional status and alternatives.

*   `records` (_array of object_) Array of parent item record objects.
    *   `vlocity_cmt__RootItemId__c` (_object_) Contains details about the root item ID. Recommended for child addition along with Id.
    *   `vlocity_cmt__AssetReferenceId__c` (_object_) Contains details about the asset reference ID. Recommended for child addition along with Id.
    *   `Id` (_object_) Contains details about the Parent Cart Item ID. Required for child addition.
    *   `isVirtualItem` (_boolean_) Indicates if the item is a virtual item. Required for child adds under a virtual parent.
    *   `parentLineItemId` (_string_) The line item ID of the parent.
    *   `productHierarchyPath` (_string_) The product hierarchy path. Required for child adds under a virtual parent.

### Messages

Array of `object`.

### Action

*   `remote` (_object_, read-only) JavaScript Remoting URL