v1

latestOpenAPI 3.0.02026-07-1397337495.2 KB
addresses

Validate An Address

Address validation ensures accurate addresses and can lead to reduced shipping costs by preventing address correction surcharges. ShipEngine cross references multiple databases to validate addresses and identify potential deliverability issues.

post/v1/addresses/validate

Request body

namestring

The name of a contact person at this address. This field may be set instead of - or in addition to - the company_name field.

phonestring

The phone number of a contact person at this address. The format of this phone number varies depending on the country.

emailstring nullable

Email for the address owner.

company_namestring nullable

If this is a business address, then the company name should be specified here.

address_line1string

The first line of the street address. For some addresses, this may be the only line. Other addresses may require 2 or 3 lines.

address_line2string nullable

The second line of the street address. For some addresses, this line may not be needed.

address_line3string nullable

The third line of the street address. For some addresses, this line may not be needed.

city_localitystring

The name of the city or locality

state_provincestring

The state or province. For some countries (including the U.S.) only abbreviations are allowed. Other countries allow the full name or abbreviation.

postal_codestring

postal code

country_codestring
address_residential_indicator'unknown' | 'yes' | 'no'

Indicates whether an address is residential.

Example request

[
  {
    "name": "John Doe",
    "phone": "+1 204-253-9411 ext. 123",
    "email": "example@example.com",
    "company_name": "The Home Depot",
    "address_line1": "1999 Bishop Grandin Blvd.",
    "address_line2": "Unit 408",
    "address_line3": "Building #7",
    "city_locality": "Winnipeg",
    "state_province": "Manitoba",
    "postal_code": "78756-3717",
    "country_code": "CA"
  }
]

Response

The request was a success.

status'unverified' | 'verified' | 'warning' | 'error' required

The possible address validation status values

Example response

[
  {
    "original_address": {
      "name": "John Doe",
      "phone": "+1 204-253-9411 ext. 123",
      "email": "example@example.com",
      "company_name": "The Home Depot",
      "address_line1": "1999 Bishop Grandin Blvd.",
      "address_line2": "Unit 408",
      "address_line3": "Building #7",
      "city_locality": "Winnipeg",
      "state_province": "Manitoba",
      "postal_code": "78756-3717",
      "country_code": "CA"
    },
    "matched_address": {
      "name": "John Doe",
      "phone": "+1 204-253-9411 ext. 123",
      "email": "example@example.com",
      "company_name": "The Home Depot",
      "address_line1": "1999 Bishop Grandin Blvd.",
      "address_line2": "Unit 408",
      "address_line3": "Building #7",
      "city_locality": "Winnipeg",
      "state_province": "Manitoba",
      "postal_code": "78756-3717",
      "country_code": "CA"
    },
    "messages": [
      {
        "message": "Invalid Postal Code"
      }
    ]
  }
]