Skip to content
English
  • There are no suggestions because the search field is empty.

ShipWise API and Address Validation (AVS)

This article covers everything you need to know about using address Validation with the ShipWise API.

This guide is here to help you seamlessly integrate our powerful address management tool into
your applications. Whether you're running an online store, a shipping service, or any
application that deals with addresses, our API can enhance your data quality and
streamline your processes.


In this documentation, you'll learn how to easily incorporate the Address Validation
tools in the use of the ShipWise API. 


Contents:

What is address validation

Why perform an address validation call?

Using AVS in the ShipWise API

Explanation of AVS Fields in the Response


What is address validation?

The Address Validation System (AVS) is an API that verifies if a package's destination address is correct or incorrect. In addition, the AVS obtains information that some carriers require such as a route number or the type of address (commercial or residential). If the address is incorrect, the AVS API that ShipWise communicates with will return a corrected address that matches what is stored in the USPS address database. Nothing will be returned if the AVS API can not locate the correct address. 

 

Please note that the address validation system can only be used for domestic orders in the United States. The AVS system will not verify international addresses.

 

 

Why perform an address validation call to our API?

Address validation is critical for ensuring all your shipments reach their destinations. Carriers such as FedEx and UPS require an address type to determine the correct shipping fee. The AVS can return the address type as either a residential home or a business. In addition, some carriers such as DHL require a route number for some of their services. An AVS call can provide this data as well.

Our Address Validation ensures that addresses are accurate and reliable in real-time. It fixes mistakes, fills in missing details, and confirms the authenticity of addresses. This means fewer shipping hiccups, fewer returns, and happier customers.


Using AVS in the ShipWise API:

You can use AVS in the ShipWise API as a standalone call, during rating, or inline with a RateAndShip call. 

You can find the API documentation and examples for the request and response on our API documentation site: https://api.shipwise.com/index.html

The Standalone ShipWise API AVS endpoint:

https://api.shipwise.com/api/v1/Rate/AddressVerify?avsType=

The request type is POST

The "avsType" parameter can have a 0 or 1 value. 0 - Default, 1 - Minimal

The Default(0) avsType will validate the whole address, including Address lines, City, State, postal code, and whether the address is residential or commercial.

The Minimal(1) avsType will only validate the City, State, and postal code.  Whether the address is residential or commercial will not be determined.

Using AVS in the ShipWise Rate API:

Endpoint: https://api.shipwise.com/api/v1/Rate

You can perform AVS during the rate call by setting addressVerification to true and setting the avsType in the request body.  This will run AVS, then do the rate call with the corrected/validated address.

Using AVS in the ShipWise RateAndShip API:

On the RateAndShip call, the AVS parameters are set in the request URL.  

To enable AVS, add the ? verifyToAddress=true parameter to the URL.

You can set the AVS type by adding the ?avsType= parameter to the URL.

For example, if you wanted to turn AVS on and verify the whole address you endpoint URL would be: https://api.shipwise.com/api/v1/Ship/RateAndShip?verifyToAddress=true?avsType=0

 

Explanation of AVS Fields in the Response

  
"correctedAddress": {
....
"avsInfo": {
            "validationState": 1,
            "isResidential": false,
            "uspsCarrierRoute": "C005"
        }
}

The correctedAddress object will contain the verified address. 

The validationState will return the status of the validation.  This can be 0 for Unverified, 1 for Valid,  and -1 for Invalid.

isResidential returns true or false
 
uspsCarrierRoute is the carrier route for the address from the USPS database. 

 
"avsResponseInformation": {
        "avsServiceUsed": "PubApi",
        "avsShortResult": "valid",
        "avsErrorMessage": null,
        "avsFailMessage": null,
        "avsCarrierRt": "C005",
        "avsUPSRuralFlag": "",
        "avsResidentialIndicatorFlag": "B",
        "avsPRUrbanization": "",
        "avsRecordType": "VALIDATED_CHANGED"
    }
 

avsShortResult indicates if the address is valid.

avsErrorMessage and avsFailMessage will have a message regarding the failure or error with the AVS request

avsCarrierRt is the carrier route for the address from the USPS database. 

avsResidentialIndicatorFlag will return the destination type.  R for residential and B for commercial/ business. 

avsRecordType indicates if the address was validated, and it was changed from what was submitted. Possible values are VALIDATED_AND_NOT_CHANGED, VALIDATED_CHANGED, and NOT_CHANGED 


 

Logo_Black_No_Whitespace