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,dimension2. 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.

This API does not run any rules.

  • Products must have ProductCode populated (no spaces are allowed in ProductCode).

  • Promotions must have Codec populated (no spaces are allowed in Codec).

  • A catalog must be present with products and promotions attached to it as records under the CatalogProductRelationshipc object. The catalog should have CatalogCodec populated (no spaces are allowed in CatalogCode__c).

  • The catalog must be attached to a default price list through the DefaultPriceListc field on the Catalogc 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 with a value of true. CacheAPIFields is not required for CME 103.1.14 and later versions.

For API parameter names, descriptions, and response information, see Digital Commerce REST API.

Retrieves details about a basket.

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: