Modify Basket
You can modify the contents of the basket in several ways as shown in the sections here.
-
Add Additional Product to Basket: This API is described by Create Basket (AddWithNoConfig) and Create Basket (AddAfterConfig). The difference is the cartContextKey of the previous basket.
Copy the cartContextKey from the response; it should resemble the following:
Insert the value into the cartContextKey Path variable:
The cartContextKey is generated every time a change is made to the basket. Make sure to take the latest from the response to make additional changes to the basket.
-
Delete or Update Basket Item: The Basket response contains all of the required parameters to perform these actions. Look for the actions node.
Use the values from the actions node to form the request body:
-
Update Item Quantity or Attributes: To update items, add Quantity or attributeCategories to the request body, as shown here.
-
Add Child Item: This API call is similar to the previous call. To run, inspect the data that is in the basket and copy the values to the related keys in the request.
-
Get Basket Details: This API requires cartContextKey and catalogcode.