POST Cart
Developing
POST
{{url}}api/v1/ecommerce/cart
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'http://ecompulse.test/api/v1/ecommerce/cart' \
--header 'Accept: application/json' \
--header 'X-API-Key: exzbLclGAzBCyL0k1Yv29Evu6mwoYOATBF0lWPyT' \
--header 'Content-Type: application/json' \
--data-raw '{
"product_id": 4,
"qty": 1,
"session_id": "6649f9c717de4"
}'
Response Response Example
{
"status": "success",
"message": "Product added to cart successfully",
"data": {
"id": 8,
"products": {
"id": 4,
"sku": "P4",
"name": "Samsung 32\" LED TV",
"image": "http://shopyx.test/images/products/1716519657.jpg",
"price": "395.00",
"product_net_price": "395.00",
"product_price_tax": "0.00",
"discount": 0,
"weight_based_price": "0.00",
"tax_method": null,
"tax": null,
"qty": 1,
"subtotal": "395.00"
}
}
}
Request
Header Params
Accept
stringÂ
required
Example:
application/json
X-API-Key
stringÂ
required
Example:
{{key}}
Body Params application/json
Responses
Modified at 2024-05-27 17:05:18