x-session. More about this here.
Supported methods
List of all supported methods.| Command | Endpoints | GET | PUT | POST | DELETE |
|---|---|---|---|---|---|
| Read cart | basket/item/get | ||||
| Add product(s) | basket/item/add | ||||
| Update cart position | basket/item/update | ||||
| Remove cart position | basket/item/delete |
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
| Parameter | Type | Description |
|---|---|---|
x-session | string | Required field ID of the current session. More information: Storefront API Basics |
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 ID71-3953 and the gift message “Best wishes!” to the cart
Example request
Parameter overview
Header parameters
| Parameter | Description |
|---|---|
x-session | Required field ID of the current session. More information: Storefront API Basics |
Body parameters
| Parameter | Type | Description |
|---|---|---|
productId | string | ID of the product to be added to the cart. |
quantity | int | Specifies how many times the product is to be added to the cart. |
freeFields | Object (String → String) | Free key/value pairs that can be attached to the position and exported into the order data. |
Example response
Error codes
| Error code | Description |
|---|---|
invalidProductId | The requested product does not exist. |
invalidVariantId | The requested variant does not exist. |
insufficientAmount | There are not enough products in stock. |
quantityExceeded | The maximum permitted number for this product has been exceeded (additional details under “details” — see below). |
childProductOnly | The product can only be ordered as part of a set. |
expressCheckoutNotAllowed | PayPal Express Checkout is active — the cart may not currently be changed. |
noVariantFound | No variant was specified for a variant product (product ID contains no variant selection). |
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 ID0921e5b44dcd6034248f to quantity 2
Example request (reduce quantity of a position to 2)
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
| Parameter | Description |
|---|---|
x-session | Required field ID of the current session. More information: Storefront API Basics |
Body parameters
| Parameter | Type | Description |
|---|---|---|
basketItemId | string | Required field ID of the cart position (corresponds to items[].id from the cart). |
quantity | int | Required field New quantity of the position. |
productId | string | Changes the associated product in an existing cart position (e.g. change of size / color / variant). Example: T-Shirt M → T-Shirt L (same model, different variant) |
freeFields | Object (String → String) | New free key/value pairs for the position (exported into the order data). Example: Personalization of the product. "freeFields": { "engraving": "A.K.", "giftMessage": "Best wishes!", "costCenter": "MKT-2025-11", "configId": "cfg_7f2a9" } |
Example response
Error codes
| Error code | Description |
|---|---|
invalidBasketItemId | The specified position ID does not belong to the current cart. |
insufficientAmount | Not enough stock to set the desired quantity. |
quantityExceeded | The maximum permitted number for this product has been exceeded. See additional details below. |
itemNotChangeable | The position may not be changed (e.g. automatically added item). |
invalidChildItem | The requested product is a set and refers to a non-existent set sub-product (data error on the product). |
expressCheckoutNotAllowed | An Express Checkout is active — the cart may not currently be changed. |
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 ID0d1b062c8225f817aa3e
Example request
Parameter overview
Header parameters
| Parameter | Description |
|---|---|
x-session | Required field ID of the current session. More information: Storefront API Basics |
Body parameters
| Parameter | Type | Description |
|---|---|---|
basketItemId | String | Required field ID of the cart position (corresponds to items[].id in the cart). |
Example response
Error codes
| Error code | Description |
|---|---|
invalidBasketItemId | The specified ID does not belong to the current cart. |
basketItemIsSetChild | An attempt was made to remove a set sub-item individually. Sub-items are automatically removed together with the corresponding parent set item and cannot be deleted separately. |
itemNotRemovable | The position may not be removed (e.g. automatically added item). |
expressCheckoutNotAllowed | PayPal Express is active — the cart may not currently be changed. |
