Shopping Cart
Manage shopping carts with price snapshots, quantity tracking, and cart merging. Works with any product-catalog setup. Cart identified by token (frontend) or ID (API).
Endpoints (8)
Add a product to the cart. Creates a new cart if no cart_token provided. Takes a price snapshot from the product catalog. Merges into an existing line when product_id + variant_id + line_attributes all match; otherwise adds a new line. Each new line gets its own line_id in the response.
No input parameters required.
Update item quantity in the cart. Set quantity to 0 to remove the item. When a product/variant has more than one line (because they carry different line_attributes) you MUST pass line_id to pick the line; with a single line it is optional.
No input parameters required.
Remove an item from the cart entirely. When a product/variant has more than one line, pass line_id to pick which one.
No input parameters required.
Get the current cart with recalculated totals. Lookup by cart_token, cart_id, or session_id.
No input parameters required.
Price a transient set of line items using the exact same tier/staffel logic and shape as get-cart, WITHOUT creating or mutating a cart. For price previews (e.g. a configurator) before add-to-cart. Duplicate lines are merged and quantities summed exactly like add-item: lines with different line_attributes stay separate, so a configurator preview splits the same way the real cart will.
No input parameters required.
Remove all items from the cart. Cart remains active (not deleted).
No input parameters required.
Merge an anonymous cart into an authenticated cart. Use after visitor login. Source cart is abandoned, items merged into target.
No input parameters required.
Link a cart to a Visitor Auth ID. Use after authentication to persist the cart across sessions.
No input parameters required.
MCP Tool Names
When using this integration through an AI assistant (Claude, ChatGPT, Cursor, etc.), the endpoints are available as MCP tools:
| Endpoint | MCP Tool Name |
|---|---|
| add-item | shopping-cart_add_item |
| update-item | shopping-cart_update_item |
| remove-item | shopping-cart_remove_item |
| get-cart | shopping-cart_get_cart |
| price-items | shopping-cart_price_items |
| clear-cart | shopping-cart_clear_cart |
| merge-cart | shopping-cart_merge_cart |
| link-visitor | shopping-cart_link_visitor |
Website