Skip to main content
The Shopping Cart API controls all interactions around the shopping cart: items can be added, quantities changed, and positions removed. In addition, the API provides the cart contents including totals, discounts, and rules such as minimum order values or maximum order quantities. Voucher codes can be entered, updated, or removed in the cart; the effects on discounts and totals are returned accordingly. Depending on the configuration, shipping costs can also be pre-calculated and displayed in the cart in advance so that there is early transparency about the expected costs. The interface delivers consistent JSON responses and informs about incorrect actions via clear error codes (e.g. missing or invalid product/position IDs, quantity limits, blocked changes) including detail information that enables a quick root cause analysis. For the correct management of the shopping cart, a session must be transmitted via x-session. More about this here.

Supported methods

List of all supported methods.

Methods for the shopping cart

These methods control the shopping cart in the shop. You can read the current cart, add products in the desired quantity, change existing positions, or remove them again.

GET basket/item/get

The following call returns the current cart with all positions and totals (net/gross/tax). The data under “items[].product” represents the state of the product at the time it was added to the cart. If, for example, the price changes during the payment process, the order is still completed at the original price stored in the cart. This prevents errors or recalculations. Which product data is included in “items[].product” is defined in the configuration of the user-defined product fields. More information here: content - Catalog (categories & products).
This command can be used to display the cart.
Example call for displaying the current cart

Parameter overview

Header parameters

Example response

POST basket/item/add

This call adds a product in the desired quantity to the cart. By executing the command multiple times, several products can be added. The command can be used to add a product to the cart. If multiple products are to be added, the command must be executed accordingly often. Example call for adding three units of the product with the ID 71-3953 and the gift message “Best wishes!” to the cart

Example request

Parameter overview

Header parameters

Body parameters

Example response

Error codes

PUT basket/item/update

The following call lets you update or change an existing cart position, typically the quantity. It can be used for quantity changes in the cart. Example call for changing the cart position with the ID 0921e5b44dcd6034248f to quantity 2

Example request (reduce quantity of a position to 2)

Note: If quantity is set to 0, the position is removed from the cart. Alternatively, the position can also be deleted via DELETE basket/delete.

Parameter overview

Header parameters

Body parameters

Example response

Error codes

DELETE basket/item/delete

The following call lets you permanently remove an existing cart position. With this command, items can be removed from the cart. Example call for deleting the product with the item ID 0d1b062c8225f817aa3e

Example request

Parameter overview

Header parameters

Body parameters

Example response

Error codes