Request Parameters:


User can vote for store only registered user allowed


URL : ../Api/Client/Vote


Header:

Content-Type:application/json


Required Parameters :  


Case-1. Exception parameters :
Parameter:
{

           "ApiSecretKey":"i99b98d117m116a112o98k115c111",

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

           "StoreId": "",

       "PollAnswerId":""

}
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",

       "PollAnswerId":"101"

}

Response :
{

    "Status": 0,

    "Message": "No poll answer found with the specified id",

    "Data": null,

    "ValidationMessage": [],

    "ErrorMessage": null

}


Case-3. Success Response :
Parameter:
{

           "ApiSecretKey":"i99b98d117m116a112o98k115c111",

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

           "StoreId": "1",

       "PollAnswerId":"1"

}

Response :

{

    "Status": 1,

    "Message": "Success.",

    "Data": {

        "Id": 1,

        "Name": "Do you like nopCommerce?",

        "AlreadyVoted": true,

        "TotalVotes": 1,

        "Answers": [

            {

                "Id": 1,

                "Name": "Excellent",

                "NumberOfVotes": 1,

                "PercentOfTotalVotes": 100

            },

            {

                "Id": 2,

                "Name": "Good",

                "NumberOfVotes": 0,

                "PercentOfTotalVotes": 0

            },

            {

                "Id": 3,

                "Name": "Poor",

                "NumberOfVotes": 0,

                "PercentOfTotalVotes": 0

            },

            {

                "Id": 4,

                "Name": "Very bad",

                "NumberOfVotes": 0,

                "PercentOfTotalVotes": 0

            }

        ],

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

        "Message": null

    },

    "ValidationMessage": [],

    "ErrorMessage": null

}