-
Notifications
You must be signed in to change notification settings - Fork 4
Explore usage of Smarty Streets API for address validation #57
Comments
Note from Porta: can we compare to the USPS address validation API and see what they accept? |
Looking at USPS API we will:
This recap correctly @hartsick? |
We need input from SmartyStreets as to how to call their API to match as close a return as the USPS API (ex. SmartyStreets can return more than 1 address (in case of multiple potential matches), USPS API only returns one.) @ryanwoldatwork is this something we can ask SmartyStreets? |
@porta-antiporta Thinking more about this, I think we should find a way to submit the corrected address on the review page like what you had already specified in #43 (vs what we talked about earlier). I think we don't want to submit something to USPS that the person submitting hasn't seen and verified. |
@hartsick yes I agree. Apologies, I was looking at this issue as fleshing out technical approach to the API, was going to update #43 with our findings. So to confirm:
|
@porta-antiporta great! that makes sense to me! |
@porta-antiporta Poking around USPS.com and the Smarty Streets API, it seems like USPS shop currently doesn't accept dpv value |
10-4. updated above and in #43 |
For going forward with this, I think we have a couple of options (loose notes before I din break):
In all of these we'd need to implement in Javascript in order to display the suggested / corrected address back to the user before hitting the server. We would want to revalidate server-side just in case. |
Hi @hartsick - thanks for outlining these tradeoffs. If the USPS match is required (presumably, to support mailing needs), then strict makes sense. Overall, this prompts me to inquire about "failure demand" - and otherwise, is there a help system to catch outlier cases/user experiences? |
Notes from Jan 11 sync:
|
Explore address validation
With Smarty Streets API
To discover how we might deliver the best address validation experience
Resources
Approach
Prototype client-side autocompleteBenchmark / measure API usage of autocompleteNote: this is now only using the US street address validation API, since autocomplete has been deprioritized for launch.
Questions to answer
strict
match mode or by enabling invalid or enhanced APIs but filtering anydpv_match_codes
that are notY
,S
, orD
. Match output strategiesinvalid
orenhanced
are the only ways to suggest addresses to the user (strict
will not`).Running notes
strict
to only return results if they havedpv_match_code
of Y, S, or D, which we think maps to USPS deliverability. However, this seems to be very strict in practice - and won't return suggestionsdpv_match_code
, they can also returndpv_footnotes
with information from USPS about the address. See api docs. I assume this is only present forS
andD
types but not sure. Additionally, Smarty adds afootnotes
section (docs].dpv_match_code
ofD
, and only acceptsY
andS
.dpv_match_code
isS
additional information is preserved in the returned address even though it is incorrect.The text was updated successfully, but these errors were encountered: