Request Parameters:


URL: ../Api/Client/UpdateCart


  • Update cart quantity by specifying NewQuantity.
  • To remove cart item set NewQuantity to 0.

Header:

Content-Type:application/json


Required Parameters :  


Case-1. Exception parameters :
Parameter:
{

           "ApiSecretKey":"i99b98d117m116a112o98k115c111",

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

           "StoreId": "1",

       "CurrencyId":"1",

       "LanguageId":"1",

       "ItemId":"13",

       "NewQuantity":"3"

}
Response :
{

    "Status": 0,

    "Message": "Request cannot be empty",

    "Data": null,

    "ValidationMessage": [],

    "ErrorMessage": null

}


Case-2. Incorrect Parameters :

Parameter:
{

           "ApiSecretKey":"i99b98d117m116a112o98k115c111",

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

           "StoreId": "1",

       "CurrencyId":"1",

       "LanguageId":"1",

       "ItemId":"72",

       "NewQuantity":"3"

}
Response :

{

    "Status": 0,

    "Message": "Item not exist in cart.",

    "Data": null,

    "ValidationMessage": [],

    "ErrorMessage": null

}


Case-3. Success Response :

Parameter:
{

           "ApiSecretKey":"i99b98d117m116a112o98k115c111",

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

           "StoreId": "1",

       "CurrencyId":"1",

       "LanguageId":"1",

       "IsEditable":"true",

       "ItemId":"12",

       "NewQuantity":"1"

}
Response :

{

    "Status": 1,

    "Message": "Success.",

    "Data": {

        "OnePageCheckoutEnabled": true,

        "ShowSku": true,

        "ShowProductImages": true,

        "IsEditable": true,

        "Items": [

            {

                "Sku": "M8_HTC_5L",

                "Picture": {

                    "ImageUrl": "http://localhost:15536/images/thumbs/0000041_htc-one-m8-android-l-50-lollipop_80.jpeg",

                    "ThumbImageUrl": "http://localhost:15536/images/thumbs/0000041_htc-one-m8-android-l-50-lollipop_100.jpeg",

                    "FullSizeImageUrl": "http://localhost:15536/images/thumbs/0000041_htc-one-m8-android-l-50-lollipop.jpeg",

                    "Title": "Show details for HTC One M8 Android L 5.0 Lollipop",

                    "AlternateText": "Picture of HTC One M8 Android L 5.0 Lollipop",

                    "Form": null,

                    "CustomProperties": {}

                },

                "ProductId": 18,

                "ProductName": "HTC One M8 Android L 5.0 Lollipop",

                "ProductSeName": "htc-one-m8-android-l-50-lollipop",

                "UnitPrice": "$245.00",

                "SubTotal": "$245.00",

                "Discount": null,

                "Quantity": 1,

                "AllowedQuantities": [],

                "AttributeInfo": "",

                "RecurringInfo": null,

                "RentalInfo": null,

                "AllowItemEditing": false,

                "Warnings": null,

                "Id": 12,

                "Message": null

            },

            {

                "Sku": "LT_MIR_DC",

                "Picture": {

                    "ImageUrl": "http://localhost:15536/images/thumbs/0000039_leica-t-mirrorless-digital-camera_80.jpeg",

                    "ThumbImageUrl": "http://localhost:15536/images/thumbs/0000039_leica-t-mirrorless-digital-camera_100.jpeg",

                    "FullSizeImageUrl": "http://localhost:15536/images/thumbs/0000039_leica-t-mirrorless-digital-camera.jpeg",

                    "Title": "Show details for Leica T Mirrorless Digital Camera",

                    "AlternateText": "Picture of Leica T Mirrorless Digital Camera",

                    "Form": null,

                    "CustomProperties": {}

                },

                "ProductId": 16,

                "ProductName": "Leica T Mirrorless Digital Camera",

                "ProductSeName": "leica-t-mirrorless-digital-camera",

                "UnitPrice": "$530.00",

                "SubTotal": "$1,590.00",

                "Discount": null,

                "Quantity": 3,

                "AllowedQuantities": [],

                "AttributeInfo": "",

                "RecurringInfo": null,

                "RentalInfo": null,

                "AllowItemEditing": false,

                "Warnings": null,

                "Id": 13,

                "Message": null

            }

        ],

        "CheckoutAttributeInfo": "Gift wrapping: No",

        "CheckoutAttributes": [

            {

                "Name": "Gift wrapping",

                "DefaultValue": null,

                "TextPrompt": null,

                "IsRequired": true,

                "SelectedDay": null,

                "SelectedMonth": null,

                "SelectedYear": null,

                "AllowedFileExtensions": null,

                "AttributeControlType": 1,

                "Values": [

                    {

                        "Name": "Gift wrapping",

                        "ColorSquaresRgb": null,

                        "PriceAdjustment": "+$10.00",

                        "IsPreSelected": false,

                        "Message": null,

                        "Id": 2

                    }

                ],

                "Message": null,

                "Id": 1

            }

        ],

        "Warnings": [],

        "MinOrderSubtotalWarning": null,

        "TermsOfServiceOnShoppingCartPage": true,

        "TermsOfServiceOnOrderConfirmPage": false,

        "DiscountBox": {

            "Display": true,

            "Message": null,

            "CurrentCode": null

        },

        "GiftCardBox": {

            "Display": true,

            "Message": null

        },

        "OrderReviewData": null,

        "DisplayTaxShippingInfo": false,

        "TaxRates": null,

        "DisplayTax": false,

        "DisplayTaxRates": false,

        "Tax": null,

        "IsApplied": false,

        "Message": null,

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

    },

    "ValidationMessage": [],

    "ErrorMessage": null

}