Address-type being sent on the request on Magento 2

Overview

In certain instances when you have address validation enabled and you notice that the address type isn’t being validated by ShipperHQ’s address validation feature, instead, the address type used is included on the request that is sent for ShipperHQ within the “options” field on the destination details.

"destination":{
    "country":"US",
    "region":"AR",
    "city":"Monticello",
    "street":"12802 Tomanet RD",
    "street2":null,
    "zipcode":"71655",
    "accessorials":null,
    "selectedOptions":{
      "options":[

        {
         "name":"destination_type",
         "value":"RESIDENTIAL"
        }]
    },

When that happens, the system will not trigger the address validation request to return the correct address-type.
The fix here is to query and deleted all the stored address-types for that address in the Magento “sales_order” table on the “destination_type” column.

Location to delete the address type of a address in Magento 2 portal.

Once the address type is removed from the table/column above, trigger a new request and the address type will not be indicated and system will use address validation to validate the address correctly and pass it back to Magento.

Was this doc helpful?