Request Parameters:


We can add product to cart as well as wishlist (Product which don't have attributes.


Below url and parameter use for add to cart product.


URL:  ../Api/Client/CatalogAddProductToCart


Header:

Content-Type:application/json


Required Parameters :  


Note:

1)For Shopping cart and wishlist we have to use shoppingCartTypeId 1 and 2 respectively.

2)If you are Guest Customer then Pass "CustomerGUID":"00000000-0000-0000-0000-000000000000"


in response option available for RedirectionPage are

1. Login

2. ShoppingCart

3. Wishlist


If IsRedirect is true, then need to redirect user to respective page as per response parameter - RedirectionPage


Case-1. Incorrect parameters :
Parameter:
{    

      "ApiSecretKey":"i99b98d117m116a112o98k115c111",

      "CustomerGUID":"496DBB2A-F9EB-4522-A804-B108693B69CE",

      "StoreId": "1",

      "CurrencyId": "1",

      "ProductId":"574",

      "Quantity":"1",

      "ShoppingCartTypeId":"1",

      "ForceRedirection":"false",

       "LanguageId":"1"

}
Response :
{

    "Status": 0,

    "Message": "No product found with id : 574",

    "Data": null,

    "ValidationMessage": [],

    "ErrorMessage": null

}


Case-2. Success Response (Shopping Cart) :
Parameter:
{    

      "ApiSecretKey":"i99b98d117m116a112o98k115c111",

      "CustomerGUID":"496DBB2A-F9EB-4522-A804-B108693B69CE",

      "StoreId": "1",

      "CurrencyId": "1",

      "ProductId":"33",

      "Quantity":"1",

      "ShoppingCartTypeId":"1",

      "ForceRedirection":"false",

       "LanguageId":"1"

}

Response :
{

    "Status": 1,

    "Message": "Success.",

    "Data": {

        "CustomerGuid": "496dbb2a-f9eb-4522-a804-b108693b69ce",

        "IsRedirect": true,

        "RedirectionPage": "ShoppingCart",

        "UpdateHtml": "(4)",

        "UpdateFlyoutcartsectionHtml": "<div id=\"flyout-cart\" class=\"flyout-cart\">\r\n    <div class=\"mini-shopping-cart\">\r\n        <div class=\"count\">\r\nYou have no items in your shopping cart.        </div>\r\n    </div>\r\n</div>\r\n",

        "Message": "The product has been added to your shopping cart"

    },

    "ValidationMessage": [],

    "ErrorMessage": null

}


Case-3. Success Response (Wishlist) :
Parameter:
{    

      "ApiSecretKey":"i99b98d117m116a112o98k115c111",

      "CustomerGUID":"496DBB2A-F9EB-4522-A804-B108693B69CE",

      "StoreId": "1",

      "CurrencyId": "1",

      "ProductId":"33",

      "Quantity":"1",

      "ShoppingCartTypeId":"1",

      "ForceRedirection":"false",

       "LanguageId":"1"

}

Response :
{

    "Status": 1,

    "Message": "Success.",

    "Data": {

        "CustomerGuid": "496dbb2a-f9eb-4522-a804-b108693b69ce",

        "IsRedirect": true,

        "RedirectionPage": "Wishlist",

        "UpdateHtml": "(3)",

        "UpdateFlyoutcartsectionHtml": null,

        "Message": "The product has been added to your wishlist"

    },

    "ValidationMessage": [],

    "ErrorMessage": null

}