---
schema_version: "1"
id: c3e8915afb69491f4f4f03ef5338c7125d06befe94abbad70d671f65f8fb0d7d
title: Get Basket Details API
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/industries/cme/guides/comms-t-get-basket-details-api.md
canonical_url: https://developer.salesforce.com/docs/industries/cme/guide/comms-t-get-basket-details-api.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2b749153f04590d652ec938a019cb60d40dbed631fc6a9e8d81510804e53b483
products:
  - Communications, Media, Energy and Utilities APIs (Managed Package)
  - Industries Developer Documentation
---
# Get Basket Details API

This API retrieves details about a basket.

This API supports the **isloggedin** flag to indicate whether a user is logged in or anonymous. If the **isloggedin** flag is true, it indicates a logged-in user, and an accountId must be specified in the context parameter of the API call. If the **isloggedin** flag is false, it indicates that the user is anonymous.

If the isloggedin flag is not specified or if the isloggedin flag is set to false then Context dimension values should be specified in the following format: dimension1:val1,dimension2:val2. The key-value pairs specify Context Dimension values that describe the context to be used in rule processing. If a value for a context dimension defined in the Product Catalog is not provided, the default value specified on the Context Dimension is used to determine eligibility and pricing. If isloggedin=true is specified, you must also specify one of the following: accountId, contractId , or rootAssetIds.

The Fall '20 release includes an Attribute Basket Cache feature. See [Attribute Basket Cache Exclusion](/docs/commerce/commerce/guide/comms-t-attribute-basket-cache-exclusion.html).


## Rules Supported

This API does not run any rules.

## Prerequisites

- Products must have ProductCode populated (no spaces are allowed in ProductCode).

- Promotions must have Code**c populated (no spaces are allowed in Code**c).

- A catalog must be present with products and promotions attached to it as records under the CatalogProductRelationship**c object. The catalog should have CatalogCode**c populated (no spaces are allowed in CatalogCode\_\_c).

- The catalog must be attached to a default price list through the DefaultPriceList**c field on the Catalog**c object.

- Price list entries must exist for all the products that are attached to the catalog.

- Optional: To populate the cache, the following batch jobs may be run:

  - Context combinations

  - Offer details

  - Pricing results

- Create a custom setting called [CacheAPIFields](https://help.salesforce.com/s/articleView?id=ind.comms_t_cpq_configuration_settings_reference_148927.htm) with a value of true. CacheAPIFields is not required for CME 103.1.14 and later versions.


## Parameters and Response Information

For API parameter names, descriptions, and response information, see [Digital Commerce REST API](https://developer.salesforce.com/docs/industries/cme/references/dc-rest1?meta=Summary).

## Get Basket Details for an Anonymous User

Retrieves details about a basket.

```nolang
GET /v3/catalogs/{catalog_code}/basket/{basket_key}
```

```nolang
GET /services/apexrest/vlocity_cmt/v3/catalogs/Mobile/basket/bdbe113c6fd2d90835372d104f7a4a8b
```

## Get Basket Details for a Known User

After one or more items have been added to a basket, you can view the basket contents for a known user using a format similar to the following:

```nolang
GET /v3/catalogs/{catalog_code}/basket/{cart_context_key}?context="accountId":"{account_id}"&isloggedin=true
```

```nolang
GET /services/apexrest/vlocity_cmt/v3/catalogs/TEST/basket/bdbe113c6fd2d90835372d104f7a4a8b?context={"accountId":"xxxxxxxxxxxxxx"}&isloggedin=true
```
