Cart API
Performs cart actions.
The Cart API provides the following functions to manipulate the cart:
| Function | Description |
|---|---|
| buy | Used for a Buy Now flow that immediately adds an item variation with modifiers to cart and redirects to checkout. |
| add | Adds an item variation with modifiers to the cart. |
| update-quantity | Updates the quantity of an order item ID in the cart. |
| remove-item | Removes a line item from the cart. |
| fulfillment | Updates the fulfillment options of a cart. |
| attach-loyalty-reward | Attaches loyalty reward to a cart. |
| remove-loyalty-reward | Removes loyalty reward from a cart. |
You can use the Site Theme SDK to manage the cart instead of calling the Cart API directly. The SDK is intended to simplify these actions.