Basket Operations in Digital Commerce

You use basket operations to add, subtract, or modify the contents of a basket.

The POST REST endpoint provides the ability for a user to add offers to a virtual basket maintained by the user interface. The basket is tracked using the cartContextKey in the URL; for an empty basket, there is no need to pass the cartContextKey, which is returned as part of the response of a successful basket operation

Offers may include both products and promotions. Offers can be added directly or after configuring them.

The API returns a list of bundle structures in the basket. The list structure is compliant with pricing, overrides, rules, adjustments, attributes, and so on.

The API uses cartContext to track existing basket contents and appropriate context parameters to price products and run rules.

If the API result is present in the cache, that result is returned. If the result is not in the cache, it is treated as a cache-miss, and the result is stored in the cache for successive calls.

The API also allows users to delete from an existing basket with the deleteBundleNumber parameter.