At the end of the shopping user will checkout and calculate total price for different shopping items.
-
Item is the unit of the supermarket shopping cart
-
Shopping promotions are associate with items hence ItemCode
-
Actual price of an Item can be get after applying promotions
- Promotions
- Buy two can of beans for £1
- Buy two get one free
URI: http://supermarket.com/cart/addItem
HttpMethod: POST
{ cart-item: {
item-code: <some item code>,
quantity: <item count>
}
}
URI: http://supermarket.com/checkout
HttpMethod: POST
{ cart-items: {
{
item-code: <some item code>,
quantity: <item count>
}
},
{
item-code: <some item code>,
quantity: <item count>
},
{
item-code: <some item code>,
quantity: <item count>
}
}
}
