Request Parameters:


For add new shipping address


URL : ../Api/Client/AddNewShippingAddress


Header:

Content-Type:application/json


Required Parameters :  


Note:

1. AttributeControlIds: address_attribute_addressAttributeId_addressAttributeValueId (If you don't have any custom address attribute then pass attributeControlIds": [""])

2. For Guest_customers as we get the CustomerGUID after add the product into the cart from that CustomerGUID  get the CustomerGUID and pass that CustomerGUID in to the parameter.


Case-1. Exception parameters :
Parameter:
{

      "ApiSecretKey":"i99b98d117m116a112o98k115c111",

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

      "StoreId": "1",

      "CurrencyId": "",    

           "AttributeControlIds":["address_attribute_1_2"],

      "AddressModel":

          {

                 "FirstName": "Ella ",

                    "LastName": "Aria ",

                    "Email": "Ella@gmail.com",

                    "Company": "Aria Solutions Ltd",

                    "CountryId": "1",

                    "StateProvinceId": "",

                    "City": "New York",

                    "Address1": "21 West 52nd Street",

                    "Address2": "",

                    "ZipPostalCode": "10021",

                    "PhoneNumber": "12345678",

                    "FaxNumber": ""

          }

}
Response :
{

    "Status": 0,

    "Message": "Request cannot be empty",

    "Data": null,

    "ValidationMessage": [],

    "ErrorMessage": null

}


Case-2. Exception Response :
Parameter:
{

      "ApiSecretKey":"i99b98d117m116a112o98k115c111",

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

      "StoreId": "1",

      "CurrencyId": "1",    

           "AttributeControlIds":["address_attribute_1_2"],

      "AddressModel":

          {

                 "FirstName": "Ella ",

                    "LastName": "Aria ",

                    "Email": "Ella@gmail.com",

                    "Company": "Aria Solutions Ltd",

                    "CountryId": "1",

                    "StateProvinceId": "400",

                    "City": "New York",

                    "Address1": "21 West 52nd Street",

                    "Address2": "",

                    "ZipPostalCode": "10021",

                    "PhoneNumber": "12345678",

                    "FaxNumber": ""

          }

}

Response :
{

    "Status": 0,

    "Message": null,

    "Data": null,

    "ValidationMessage": [],

    "ErrorMessage": "The property 'Id' on entity type 'Address' has a temporary value while attempting to change the entity's state to 'Unchanged'. Either set a permanent value explicitly or ensure that the database is configured to generate values for this property."

}


Case-3. Success Response :
Parameter:
{

      "ApiSecretKey":"i99b98d117m116a112o98k115c111",

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

      "StoreId": "1",

      "CurrencyId": "1",    

           "AttributeControlIds":["address_attribute_1_2"],

      "AddressModel":

          {

                 "FirstName": "Ella ",

                    "LastName": "Aria ",

                    "Email": "Ella@gmail.com",

                    "Company": "Aria Solutions Ltd",

                    "CountryId": "1",

                    "StateProvinceId": "40",

                    "City": "New York",

                    "Address1": "21 West 52nd Street",

                    "Address2": "",

                    "ZipPostalCode": "10021",

                    "PhoneNumber": "12345678",

                    "FaxNumber": ""

          }

}

Response :
{

    "Status": 1,

    "Message": "Success",

    "Data": {

        "ShippingMethods": [

            {

                "ShippingRateComputationMethodSystemName": "Shipping.FixedByWeightByTotal",

                "Name": "Ground",

                "Description": "Compared to other shipping methods, ground shipping is carried out closer to the earth",

                "Fee": "$0.00",

                "Selected": true,

                "ShippingOption": "<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ShippingOption xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n  <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>\r\n  <Rate>0</Rate>\r\n  <Name>Ground</Name>\r\n  <Description>Compared to other shipping methods, ground shipping is carried out closer to the earth</Description>\r\n</ShippingOption>"

            },

            {

                "ShippingRateComputationMethodSystemName": "Shipping.FixedByWeightByTotal",

                "Name": "Next Day Air",

                "Description": "The one day air shipping",

                "Fee": "$0.00",

                "Selected": false,

                "ShippingOption": "<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ShippingOption xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n  <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>\r\n  <Rate>0</Rate>\r\n  <Name>Next Day Air</Name>\r\n  <Description>The one day air shipping</Description>\r\n</ShippingOption>"

            },

            {

                "ShippingRateComputationMethodSystemName": "Shipping.FixedByWeightByTotal",

                "Name": "2nd Day Air",

                "Description": "The two day air shipping",

                "Fee": "$0.00",

                "Selected": false,

                "ShippingOption": "<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<ShippingOption xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">\r\n  <ShippingRateComputationMethodSystemName>Shipping.FixedByWeightByTotal</ShippingRateComputationMethodSystemName>\r\n  <Rate>0</Rate>\r\n  <Name>2nd Day Air</Name>\r\n  <Description>The two day air shipping</Description>\r\n</ShippingOption>"

            }

        ],

        "Warnings": null,

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

        "Message": "Address added successfully"

    },

    "ValidationMessage": [],

    "ErrorMessage": null

}