Addresses
Learn to create, validate, and retrieve Shippo addresses.
Overview
We must provide the “from” address and address to ship an item. We must validate these addresses before shipping an item to avoid failed shipping. The Shippo API validates U.S. addresses free of cost and charges for global (non-U.S.) addresses for the live token. If we use the test token, the API passes the address without validation for global addresses.
Create an address
We use the following endpoint, which uses the POST method to create an address object:
https://api.goshippo.com/addresses/
Request parameters
Some important input parameters are provided in the table below:
Object | Type | Category | Description |
| string | required | This is the name of the person. |
| string | optional | This is the name of the company. |
| string | required | This is the person’s street address. |
| string | optional | This is the person’s street number. |
| string | required | This is the person’s city. |
| string | required | This is the area’s zip code. |
| string | required | This is the state name of the address. It is required for some countries. |
| string | required | This is the country name of the concerned person. ISO 2 country codes are applicable. |
| string | optional | This is the person’s phone number. |
| string | optional | This is the person’s email address. |
| string | optional | This indicates whether the address is residential or commercial. |
| boolean | optional | This field determines whether or not we want to validate the address. |
Note: We can use the addresses created by the API call above as "from" or "to" addresses while creating a shipment object. ...