API Quick Start
This quickstart guide gives you an overview of what the AfterShip Address API is and provides you with the most common scenario in which it is used.
1. What is the AfterShip Address API?
The Address API ensures accurate address entry in e-commerce and other applications by providing real-time validation and error messages for incorrect addresses, along with suggested corrections. This improves user experience, enhances address accuracy, and reduces manual verification.
For example, if your customer enters an incorrect address on the checkout page, it can prevent order fulfillment and create extra work for your team. By integrating our Address API, you can validate addresses at checkout, streamlining the order process,enhancing order fulfillment.

Supported Countries
Country Code | Country Name |
---|---|
USA | United States |
FRA | France |
DEU | Germany |
ESP | Spain |
GBR | United Kingdom |
CHE | Switzerland |
BEL | Belgium |
2. API Endpoint
All endpoints are only accessible via HTTPS
.
3. Common scenarios
Use POST API: https://api.aftership.com/address/2024-07/addresses/validate
Scenario 1. Direct Address Validation
You do not need to assume which carrier will be used for shipping. Simply enter the address for validation, and if the address is incorrect or missing key information, you will receive a suggested correction.
Sample Request
preparing...
Sample Response
preparing...
As shown in the common example above, the status
in the response is utilized to ascertain the validity of the request_address
. Moreover, the suggested_addresses
included in the response are significantly more accurate, as they are based on enhanced data obtained from the AfterShip API.
Scenario 2. Address Validation with a Specific Carrier
In this scenario, you can specify the carrier to validate the address. This ensures that the shipment address meets the specific requirements and standards set by the chosen carrier, allowing for a smooth and efficient shipping process.
Currently, our supported carrier options list: FedEx and UPS
.
Sample Request
preparing...
Sample Response
preparing...
As shown in the example above, both the request_address
and carrier_slug
input parameters are used to validate the address with the slug.