Request Parameters:


We can add product to cart as well as wishlist.


Below url and parameter use for add to cart product.


URL:  ../Api/Client/DetailAddProductToCart


Header:

Content-Type:application/json


Parameter:
{
            "ApiSecretKey":"d101g114q119n106g97y111j112d104",
          "CustomerGUID":"F1F13527-BA8E-4C5A-ACA2-9EC3D78B3FF4",
        "StoreId": "1",
        "CurrencyId": "1",
        "ProductId": "16",
        "ShoppingCartTypeId": "1",
        "Quantity": "1",
        "AttributeControlIds": ["product_attribute_16_5_4_13", "product_attribute_16_6_5_15",
        "Product_attribute_16_3_6_18", "product_attribute_16_4_7_20",
        "Product_attribute_16_8_8_22,23,24", "product_attribute_16_4_7_20" ],
        "RentalStartDate": "06/15/2015",
        "RentalEndDate": "06/17/2015"
}

Parameter for Guest_customer:
{
          "ApiSecretKey":"d101g114q119n106g97y111j112d104",
        "CustomerGUID":"00000000-0000-0000-0000-000000000000",
        "StoreId": "1",
        "CurrencyId": "1",
        "ProductId": "16",
        "ShoppingCartTypeId": "1",
        "Quantity": "1",
        "AttributeControlIds": ["product_attribute_16_5_4_13", "product_attribute_16_6_5_15",
        "Product_attribute_16_3_6_18", "product_attribute_16_4_7_20",
        "Product_attribute_16_8_8_22,23,24", "product_attribute_16_4_7_20" ],
        "RentalStartDate": "06/15/2015",
        "RentalEndDate": "06/17/2015"
}


Note:

1)AttributeControlIds:product_attribute_ProductId_ProductAttributeId_ProductAttributeMapId_AttributeValueId

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

3)For nopCommerce 3.40, rentalStartDate and rentalEndDate not supported.

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


Response :
{
   "CustomerGuid": "f1f13527-ba8e-4c5a-aca2-9ec3d78b3ff4",
   "Message": "The product has been added to your Cart. UpdatedCartSectionHtml = (1) "
}

Response for Guest_customer :
{
   "CustomerGuid": "35eff895-a31d-4ec0-afe7-660fa11d9294",
   "Message": "The product has been added to your Cart. UpdatedCartSectionHtml = (1) "
}


Request Parameters:


Below url and parameter use for Add to wish list product


URL: ./Api/Client/DetailAddProductToCart


Parameter:
{
       "ApiSecretKey":"d101g114q119n106g97y111j112d104",
       "CustomerGUID":"F1F13527-BA8E-4C5A-ACA2-9EC3D78B3FF4",
       "StoreId": "1",
       "CurrencyId": "1",
       "ProductId": "16",
       "ShoppingCartTypeId": "2",
       "Quantity": "1",
       "AttributeControlIds": ["product_attribute_16_5_4_13", "product_attribute_16_6_5_15",
       "Product_attribute_16_3_6_18", "product_attribute_16_4_7_20",
       "Product_attribute_16_8_8_22,23,24", "product_attribute_16_4_7_20" ],
       "RentalStartDate": "06/15/2015",
       "RentalEndDate": "06/17/2015"
}


Parameter for Guest_customer:
{
         "ApiSecretKey":"d101g114q119n106g97y111j112d104",
         "CustomerGUID":"00000000-0000-0000-0000-000000000000",
         "StoreId": "1",
         "CurrencyId": "1",
         "ProductId": "16",
         "ShoppingCartTypeId": "2",
         "Quantity": "1",
         "AttributeControlIds": ["product_attribute_16_5_4_13", "product_attribute_16_6_5_15",
         "Product_attribute_16_3_6_18", "product_attribute_16_4_7_20",
         "Product_attribute_16_8_8_22,23,24", "product_attribute_16_4_7_20" ],
         "RentalStartDate": "06/15/2015",
    "RentalEndDate": "06/17/2015"
}

Note: For add to wish list you need to pass “shoppingCartTypeId:2”.


Response :
{
   "CustomerGuid": "f1f13527-ba8e-4c5a-aca2-9ec3d78b3ff4",
   "Message": "The product has been added to your wishlist. UpdatedWishlistSectionHtml = (1) "
}

Response for Guest_customer :
{
   "CustomerGuid": "f0216817-33ab-4be7-8dbd-b08c8a23966b",
   "Message": "The product has been added to your wishlist. UpdatedWishlistSectionHtml = (1) "
}