Add Item to Shopping Cart
POST
DOMAIN/cart/add
- Parameters
Parameter |
Type |
Description |
productId required |
int |
Product Identifier |
quantity required |
int |
Product quantity |
- Sample request
{
productId: 5,
quantity: 2
}
- Success Response
HTTP1/1 200 OK
{
status: 'success'
}
- Error Response
HTTP1/1 400 Bad Request
{
status: 'error',
message: 'Bad request'
}
- Translation message keys
Key |
Description |
system.bad_request |
Message for bad request |
system.product_not_found |
Product not found |
system.product_availability_error |
Temporarily out of stock |
system.product_successfully_added_to_basket |
Message for success |
Update Shopping Cart Items
POST
DOMAIN/cart/update
- Parameters
Parameter |
Type |
Description |
quantities required |
array |
Quantities by product identifier |
- Sample request
{
quantities:
[
1: 5,
5: 3
]
}
- Success Response
HTTP1/1 200 OK
{
status: 'success'
}
- Error Response
HTTP1/1 400 Bad Request
{
status: 'error',
message: 'Bad request'
}
- Translation message keys
Key |
Description |
system.bad_request |
Message for bad request |
system.product_availability_error |
Temporarily out of stock |
system.basket_successfully_updated |
Message for success |
Remove Shopping Cart Item
POST
DOMAIN/cart/delete
- Parameters
Parameter |
Type |
Description |
itemId required |
int |
Shopping cart item identifier |
- Sample request
{
itemId: 15
}
- Success Response
HTTP1/1 200 OK
{
status: 'success'
}
- Error Response
HTTP1/1 400 Bad Request
{
status: 'error',
message: 'Bad request'
}
- Translation message keys
Key |
Description |
system.bad_request |
Message for bad request |
system.basket_item_successfully_deleted |
Message for success |
Clear Shopping Cart
GET
DOMAIN/cart/clear
- Success Response
HTTP1/1 200 OK
{
status: 'success'
}
- Error Response
HTTP1/1 400 Bad Request
{
status: 'error',
message: 'Bad request'
}
- Translation message keys
Key |
Description |
system.bad_request |
Message for bad request |
system.basket_successfully_cleaned |
Message for success |
Checkout
POST
DOMAIN/cart/checkout
- Success Response
HTTP1/1 200 OK
{
status: 'success'
}
- Error Response
HTTP1/1 400 Bad Request
{
status: 'error',
message: 'Bad request'
}
- Translation message keys
Key |
Description |
system.bad_request |
Message for bad request |