POST Cart Discount
Developing
POST
{{url}}api/v1/ecommerce/cart/discount/{session_id}
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'http://ecompulse.test/api/v1/ecommerce/cart/discount/6649f9c717de4' \
--header 'Accept: application/json' \
--header 'X-API-Key: exzbLclGAzBCyL0k1Yv29Evu6mwoYOATBF0lWPyT' \
--header 'Content-Type: application/json' \
--data-raw '{
"code": "SHOPYX2024",
"order_discount": 25.00
}'
Response Response Example
{
"status": "success",
"message": "Product cart retrieved successfully",
"data": {
"session_id": "6649f9c717de4",
"count": 1,
"summary": {
"id": 4,
"reference_no": "ECOM1105262",
"date": "2024-05-27 17:10:18",
"note": "ecommerce sale",
"order_tax": "0.00",
"order_shipping": "250.00",
"order_discount": "25.00",
"grand_total": "1,805.00",
"paid": "0.00",
"balance": "1,580.00",
"customer_payment": {
"paid": "0.00",
"change": "0.00",
"paying_by": 0
},
"paid_status": {
"value": 0,
"text": "Partial"
},
"warehouse": {
"id": 1,
"name": "Warehouse 1"
},
"customer": null,
"biller": null,
"sale_by": "Ecommerce",
"status": {
"value": 0,
"text": "Pending"
}
},
"cart": [
{
"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": 4,
"subtotal": "1,580.00"
}
},
...
...
...
]
}
}
Request
Path Params
session_id
stringÂ
required
Example:
6649f9c717de4
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:16:36