Validate Address

post
/addresses/validate

Support identify and standardize address.

Contact sales to activate this feature.

as-api-key
string
required

An API key is a token that you provide when making API calls. Include the token in a header parameter called as-api-key.

Examples:
as-api-key: 123
Content-Type
string

Content-Type for all calls should be application/json.

Default:
application/json
Example:
application/json

Create an address validation.

request_address
Address
required

Address object. Refer to below address schema.

type
string or null
Allowed values:
businessresidential
street_1
string
required

Address_line1 of address.

Example:
123 Main Street
street_2
string or null

Address_line2 of address.

Example:
Suite 200
street_3
string or null

Address_line3 of address.

street_number
string or null

Street number.

Example:
125
district
string or null

District name.

Example:
South District
county
string or null

County name.

Example:
Santa Clara County
postal_code
string or null

Postal code.

Example:
95113
city
string or null

City name.

Example:
San Jose
state
object or null

State object

country_region
object
required

Country region object.

coordinate
object

Coordinate object.

carrier_slug
string

Unique slug in AfterShip. Supported carrier slug: fedex, ups

Example:
fedex
max_address_response
integer

Maximum suggested addresses count in response.

>= 1<= 10
Example:
1

OK

meta
Meta

Meta data object.

code
number
required

Code

Default:
200
Example:
200
message
string

Error message, only exist if the response status is not 2xx

Example:
OK
details
array[object] or null
data
object
suggested_addresses
array[Address]

Common address object.

errors
Error

Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.

status
string
Allowed values:
validinvalid

Unauthorized

meta
Meta

Meta data object.

code
number
required

Code

Default:
200
Example:
200
message
string

Error message, only exist if the response status is not 2xx

Example:
OK
details
array[object] or null
data
object

Not Found

meta
Meta

Meta data object.

code
number
required

Code

Default:
200
Example:
200
message
string

Error message, only exist if the response status is not 2xx

Example:
OK
details
array[object] or null
data
object
Auth
:
Parameters
:
Body
{ "request_address": { "country_region": { "name": "United States", "code": "USA" }, "state": { "name": "California", "code": "US-CA" }, "county": "Santa Clara County", "city": "San Jose", "district": null, "street_1": "123 Main Street", "street_2": "Suite 200", "street_3": null, "street_number": "125", "postal_code": "95113" }, "carrier_slug": "fedex", "max_address_response": 1 }
Response Example
{ "meta": { "code": 200, "message": "OK", "details": [] }, "data": { "status": "valid", "suggested_addresses": [ { "country_region": { "name": "United States", "code": "USA" }, "state": { "name": "CALIFORNIA", "code": "US-CA" }, "county": null, "city": "SAN JOSE", "district": null, "street_1": "123 MAIN ST", "street_2": "STE 200", "street_3": null, "street_number": null, "postal_code": "95113", "type": null, "coordinate": null } ], "errors": [] } }