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.


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.

address_flow_v2.png
Country CodeCountry Name
USAUnited States
FRAFrance
DEUGermany
ESPSpain
GBRUnited Kingdom
CHESwitzerland
BELBelgium
preparing...

All endpoints are only accessible via HTTPS.

Use POST API: https://api.aftership.com/address/2024-07/addresses/validate

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.

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.