Skip to main content
POST
Save an address
  • Safe to repeat. Saving an address your company already has returns the saved one instead of a copy. Case and spacing don’t matter, and a state’s code counts the same as its name.
  • US only, as in the dashboard. Send the state as its two-letter code or its name; Hoppier stores the name.
  • The oldest address is the default. New programs use it when you leave out addressId. Saving another address doesn’t change the default.
  • At most 50 saved addresses per company.
  • Not in the API: changing or deleting an address. Use the dashboard.

Authorizations

Authorization
string
header
required

Send your key in the Authorization header: Authorization: Bearer hk_live.…. The word Bearer is case-sensitive.

Keys are shown once. Treat them like passwords and never put one in code that runs in a browser or an app.

Body

application/json
line1
string
required
Required string length: 4 - 255
Example:

"350 Fifth Avenue"

city
string
required
Required string length: 1 - 255
Example:

"New York"

state
string
required

A US state or territory, by its two-letter code (NY) or its name (New York), in any case. The District of Columbia, Puerto Rico, Guam, the US Virgin Islands, American Samoa and the Northern Mariana Islands are included.

Example:

"NY"

postalCode
string
required

A US ZIP code, five digits or ZIP+4.

Pattern: ^\d{5}(-\d{4})?$
Example:

"10118"

line2
string
Maximum string length: 255
Example:

"Floor 20"

country
enum<string>
default:US

Only US addresses can be saved.

Available options:
US

Response

The address: the new one, or the saved one if your company already had it.

One of your company's saved addresses.

id
string
required

The address's id. Starts with ad_.

Example:

"ad_7Ym2p0Lx3Q"

object
string
required
Allowed value: "address"
line1
string
required
Example:

"350 Fifth Avenue"

city
string
required
Example:

"New York"

state
string
required

The state or territory's name.

Example:

"New York"

postalCode
string
required
Example:

"10118"

country
string
required

Two-letter country code.

Example:

"US"

isDefault
boolean
required

true for the address new programs use when you leave out addressId: your company's oldest saved address.

line2
string

Left out when the address has no second line.

Example:

"Floor 20"