Addresses
Model
Address Model
Anytime we respond with an address, it will always be in this model. There may times when many of the fields are null
, such as when a large carrier gives us a tracking update with only the city
and state
fields. We'll attempt to populate the address object with as much data as possible.
object "address"
The description of the model.
id String
The ID of the address, generated by hashing its properties.
city String
Name of the city.
coordinates [Number, Number]
An array of latitude and longitude components. Will be null
otherwise.
country String
The full name of the country, e.g: United States
country_code String
Two character ISO country code, e.g: US
formatted_address String
The full string of the address, e.g: 500 7th Ave, Fl 10, New York, NY, 10018
line1 String
The street line 1.
line2 String
The street line 2, usually a unit number.
postal_code String
Also referred to as zip code.
state String
The full name of the state, e.g: California
state_code String
The abbreviation of the state if it exists, e.g: CA
textarea String
Same as formatted_address
but with line breaks to add the address into a textarea input. The line2
will be removed from the textarea property. This is because the autocomplete does not generate a unit number and the <form/>
element displayed to a user will typically include another input asking for the line2
value.
timezone String
The tz
database timezone name, e.g: America/Los_Angeles
verified Boolean
If this address was verified.
hash String
The hash of the address. This hash is calculated in the same way as the hash that calculates the ID, however it does not include the line2
value. This way, you can determine if two addresses are in the same building.