Add Item to Cart
Cart & Checkout
Add Item to Cart
Add a new item to the shopping cart
POST
Add Item to Cart
Overview
Adds a new product to the user’s shopping cart. This endpoint uses the cart synchronization mechanism to add items while preserving existing cart contents.Authentication
This endpoint requires authentication. Ensure the user is authorized to modify the cart.Request Body
number
required
The unique identifier of the user whose cart you want to modify
array
required
Response
boolean
required
Indicates whether the request was successful
object
The complete updated cart object
number
Unique identifier for the cart
number
The ID of the user who owns this cart
string
Error message if the request fails
Example Request
Adding First Item
Adding Item to Existing Cart
Example Response
Success Response
Error Response
Error Codes
Important Notes
- Product IDs must be valid and reference non-deleted products
- Invalid product IDs are automatically filtered out
- The
abandonedEmailSentflag is reset tofalsewhen items are added - If an empty items array is provided, the cart will be cleared
- Product ID should be sent as a string in the request body