End Point: Shopping Cart

Add Item to Shopping Cart


POST
DOMAIN/cart/add

Parameter Type Description
productId required int Product Identifier
quantity required int Product quantity

{
      productId: 5,
      quantity: 2
}

HTTP1/1 200 OK
{
      status: 'success'
}

HTTP1/1 400 Bad Request
{
      status: 'error',
      message: 'Bad request'
}

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

Parameter Type Description
quantities required array Quantities by product identifier

{
      quantities:
           [
                  1: 5,
                  5: 3 
           ]
}

HTTP1/1 200 OK
{
      status: 'success'
}

HTTP1/1 400 Bad Request
{
      status: 'error',
      message: 'Bad request'
}

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

Parameter Type Description
itemId required int Shopping cart item identifier

{
      itemId: 15
}

HTTP1/1 200 OK
{
      status: 'success'
}

HTTP1/1 400 Bad Request
{
      status: 'error',
      message: 'Bad request'
}

Key Description
system.bad_request Message for bad request
system.basket_item_successfully_deleted Message for success


Clear Shopping Cart


GET
DOMAIN/cart/clear

HTTP1/1 200 OK
{
      status: 'success'
}

HTTP1/1 400 Bad Request
{
      status: 'error',
      message: 'Bad request'
}

Key Description
system.bad_request Message for bad request
system.basket_successfully_cleaned Message for success


Checkout


POST
DOMAIN/cart/checkout

HTTP1/1 200 OK
{
      status: 'success'
}

HTTP1/1 400 Bad Request
{
      status: 'error',
      message: 'Bad request'
}

Key Description
system.bad_request Message for bad request