Adding or Deleting Basket Items or Attributes

Use this API to update the quantity or attributes of an offer that has already been added to a basket.

The following example shows a typical sequence of API calls to update an item in a basket for a known user.

  1. Use the GetOffersByCatalog API to retrieve a list of offers from the catalog (see Get Offers by Catalog API).

  2. Based on the list of offers returned by the GetOffersByCatalog API, run the GetOfferDetails API to retrieve details about a particular offer (see Get Offer Details API).

  3. Create a basket and add an item to it by running the Basket API. If the user is known, use the following API call and body:

  4. Note the cartContextKey from the API call in Step 3.

    Be sure to note the CartContextKey, the lineItemKey, and the bundleContextKey if you intend to change or configure the offer.

  5. Update the basket with an API call formatted similar to the following: