lob-elixir icon indicating copy to clipboard operation
lob-elixir copied to clipboard

Question regarding additional components in address prefixes (e.g., APT, STE, etc...)

Open amiralles opened this issue 2 years ago • 0 comments

Hey guys, hope you are doing great!

We've been using your address verification services for a while with great success so far. The API is easy to use. Response times are impressive, and no false positives whatsoever. An absolute A+.

Now we started integrating autocomplete services with great success, too, but we ran into this particular situation:

If we make an API call using a regular address without any STE or APT "components," everything works as expected:

iex> Lob.USAutocompletion.autocomplete(%{                                           
  address_prefix: "1355 Market Street",
  city: "San Francisco",
  state: "CA"
})
{:ok,
 %{
   id: "us_auto_xxxxxxxxxxxxxxxxxxxx",
   object: "us_autocompletion",
   suggestions: [
     %{
       city: "SAN FRANCISCO",
       primary_line: "1355 MARKET ST",
       state: "CA",
       zip_code: "94103"
     }
   ]
 },
 [...]
}

However, if we include the STE number, we get no results back:

Lob.USAutocompletion.autocomplete(%{                                           
  address_prefix: "1355 Market Street STE 900",
  city: "San Francisco",
  state: "CA"
})
{:ok,
 %{
   id: "us_auto_39e96a7e68ff44199c63",
   object: "us_autocompletion",
   suggestions: []
 },
 [...]
}

At the moment, we are whipping out STE, APT, and friends from the address prefix, and everything works like a charm, but we are wondering if it'll be possible to pass those along and maybe even get them back as part of the response.

Most services don't include apartment or floor information because it's almost impossible to track, but we are curious if we are missing something obvious here. A hidden setting or something like that, maybe?

Thanks in advance, and keep up the excellent work!!

amiralles avatar Mar 23 '23 02:03 amiralles