# Get Cart Summary

Return the cart details, including, account, multi-site, and additional action information.

- Account information associated with this cart

- If this cart includes a multi-site order, available sites

- Links to further actions, such as check out

```nolang
GET /v2/cpq/carts/{cart_ID}?headerFieldSet={field_set_feature}&validate={true|false}
```

Get Cart Details excludes these fields from the Opportunity, Order, and Quote.

- IsDeleted

- CreatedDate

- CreatedById

- LastModifiedDate

- LastModifiedById

- SystemModstamp

- LastActivityDate

- CleanStatus

Get Cart Details returns these fields from the Opportunity, Order, and Quote.

- Opportunity

  {
  'Name', 'Account.Id', 'Account.Name', 'Account.PhotoUrl',
  'Email\_\_c', 'Phone\_\_c', 'EffectiveRecurringTotal\_\_c', 'EffectiveOneTimeTotal\_\_c', 'EffectiveOpportunityTotal\_\_c',
  'PriceListId\_\_c','PriceListId\_\_r.Name','PriceListId\_\_r.CurrencyCode\_\_c','PriceListId\_\_r.LoyaltyCode\_\_c',
  'OriginatingContractId\_\_c'
  }

- Order

  {
  'Name', 'Status', 'OrderNumber', 'Account.Id',
  'Account.Name', 'Account.PhotoUrl', 'ShippingAddress', 'ShipToContact.Name',
  'Email\_\_c', 'Phone\_\_c', 'EffectiveRecurringTotal\_\_c',
  'EffectiveOneTimeTotal\_\_c', 'EffectiveOrderTotal\_\_c','PriceListId\_\_c','PriceListId\_\_r.Name','PriceListId\_\_r.CurrencyCode\_\_c','PriceListId\_\_r.LoyaltyCode\_\_c',
  'OrderStatus\_\_c', 'IsChangesAllowed\_\_c', 'SupersededOrderId\_\_c', 'OriginatingContractId\_\_c','SupplementalAction\_\_c', 'RecordType.Name', 'AsyncOperation\_\_c'
  }

- Order

  {
  'Name', 'QuoteNumber', 'Account.Id',
  'Account.Name', 'Account.PhotoUrl', 'ShippingAddress', 'ShippingName',
  'Email', 'Phone', 'EffectiveRecurringTotal\_\_c', 'EffectiveOneTimeTotal\_\_c', 'EffectiveQuoteTotal\_\_c',
  'PriceListId\_\_c','PriceListId\_\_r.Name','PriceListId\_\_r.CurrencyCode\_\_c','PriceListId\_\_r.LoyaltyCode\_\_c',
  'RenewalSourceContractId\_\_c', 'RecordType.Name', 'AsyncOperation\_\_c'
  }

:::note
By default, items deleted from a cart are not evaluated for Vlocity Rules. To enable evaluation of deleted items, set the 'ShouldConsiderDeletedItems' custom setting to true.
:::

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.

For additional information, ​see UserSecurity Class and CPQ and Digital Commerce Changes for Guest Users.

## Remote Method

```nolang
getCarts
```

## REST Handler

```nolang
APICartsCpqV2
```

## Apex Remote Service

```nolang
CpqAppHandler
```

## Apex Remote Input Map

```nolang
{
 methodName: getCarts,
 cartId: 801360000008 eNU,
 "headerFieldSet": "CPQV2"
}
cartId = order.Id, opportunity.Id, or quote.Id

```

## Package

Communication (vlocity_cmt)

## API Parameters and Response Format

For API parameter names and descriptions, see [Cart-Based API Swagger Reference](https://developer.salesforce.com/docs/industries/cme/references/cpq?meta=Summary).

## Resource Information

\| Response Format | JSON                                                                                                     |
\| --------------- | -------------------------------------------------------------------------------------------------------- | ------- |
\| Resource URL    | `/services/apexrest/{namespace}/v2/cpq/carts/{cart_ID}?headerFieldSet={field_set_feature}&validate={true | false}` |

## Example Request

```nolang
GET
/services/apexrest/vlocity_cmt/v2/cpq/carts/80141000000Cg8H
```

## Example Result

```nolang
{
   "totalSize": 1,
   "messages": [],
   "records": [{
      "messages": [],
      "displaySequence": -1,
      "details": {
         "totalSize": 1,
         "messages": [],
         "records": [{
            "messages": [],
            "actions": {
               "checkout": {
                  "rest": {
                     "params": {},
                     "method": "POST",
                     "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/80141000000Cg8HAAS/checkout"
                  },
                  "remote": {
                     "params": {
                         "cartId": "80141000000Cg8HAAS",
                        "methodName": "checkout"
                     }
                  },
                  "client": {
                     "params": {}
                  }
               }
            },
            "displaySequence": -1,
            "Id": "80141000000Cg8HAAS",
            "Status": "Draft",
            "OrderNumber": "00000965",
            "Account.Name": "Telco test",
            "EffectiveRecurringTotal__c": 0.00,
            "EffectiveOneTimeTotal__c": 5.00,
            "EffectiveOrderTotal__c": 5.00,
            "ObjectType": "Order"
         }]
      },
      "sites": {
      "totalSize": 0,
      "messages": [{
         "severity": "ERROR",
         "messageId": null,
         "message": "No Results Found.",
         "code": "101",
         "actions": {}
      }],
      "actions": {
         "newsite": {
            "rest": {
               "params": {},
               "method": "POST",
               "link": "/services/apexrest/vlocity_cmt/v2/cpq/carts/80141000000Cg8HAAS/sites"
            },
            "remote": {
               "params": {
                  "type": "Service",
                  "methodName": "newSite"
            }
         },
         "client": {
            "params": {}
         }
      }
   }
   }
   }]
}
```
