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

name

string

required

This is the name of the person.

company

string

optional

This is the name of the company.

street1

string

required

This is the person’s street address.

street_no

string

optional

This is the person’s street number.

city

string

required

This is the person’s city.

zip

string

required

This is the area’s zip code.

state

string

required

This is the state name of the address. It is required for some countries.

country

string

required

This is the country name of the concerned person. ISO 2 country codes are applicable.

phone

string

optional

This is the person’s phone number.

email

string

optional

This is the person’s email address.

is_residential

string

optional

This indicates whether the address is residential or commercial.

validate

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. ...