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 |
important
Please follow the Create Cart Flow documentation carefully. This document provides a step-by-step guide for implementing the Cart apis in your React application.
Common Use Cases
- Create a cart for a new user session.
- Add/remove products before checkout.
- Retrieve cart details dynamically.