Cart API
Manage shopping carts, items, and checkout workflows. All cart endpoints require authentication.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /cart/customer/{customerId} | Fetch the cart by customerId |
| POST | /cart | Create a new cart |
| POST | /cart/item | Add an item to the cart |
| DELETE | /cart/item | Remove an item from the cart |
| DELETE | /cart/{cartId} | Delete a cart by cartId |
warning
You must create a cart before performing any other cart-related operations.
All actions such as adding items, removing items, or even creating an order require a valid cartId.
Common Use Cases
- Create a cart for a new user session.
- Add/remove products before checkout.
- Retrieve cart details dynamically.