Why is the address data combined onto one line?

FAQ

Question

Last Updated: March 15, 2013

We've recently started supplying a separate Unit Number field to your address validator. The validator does accept this and corrects/amends it. The problem I'm having is that it doesn't seem to return the UnitNumber as a distinct field in the results set, but rather combines the unit number with the Street field. Is this expected behavior?

Answer

The USPS addressing guidelines state that any information that is critical to address validation should go into the address1 field. Any "additional data" is relegated to the address2 field. Critical information means things like the street address, apartment number, suite number, building number, box number, and so on. Here are some examples.


Example 1: -input- [street] 3615 Jasmine Ave [street2] 3 [lastline] Los Angeles CA 90034 -output- [delivery_line_1] 3615 Jasmine Ave Apt 3 [lastline] Los Angeles CA 90034-5051 +component data

The "3" in the [street2] field is recognized as an apartment number and since that is critical address information, it is moved into the [delivery_line_1] field.

Example 2: -input- [street] 3615 Jasmine Ave [street2] Put packages behind bushes beside the door [secondary] 3 [lastline] Los Angeles CA 90034 -output- [delivery_line_1] 3615 Jasmine Ave Apt 3 [delivery_line_2] Put Packages Behind Bushes Beside The Door [lastline] Los Angeles CA 90034-5051 +component data

The "3" in the [secondary] field is recognized as an apartment number that is critical to the address validation process. It is thus added to the end of the [delivery_line_1] field. The information in the [street2] field is determined to be "additional data" that IS helpful for delivery but not critical for validation. It is thus left in the [delivery_line_2] field.

Example 3: -input- [street] Put packages behind bushes beside the door [street2] 3615 Jasmine Ave [secondary] 3 [lastline] Los Angeles CA 90034 -output- [delivery_line_1] 3615 Jasmine Ave Apt 3 [delivery_line_2] Put Packages Behind Bushes Beside The Door [lastline] Los Angeles CA 90034-5051 +component data

In this case, our system recognized that the [street] field did not contain any critical address data so it then looked at the [street2] field for data. Finding critical address data in the [street2] field allowed it to continue processing the address and you can see that the output is the same as example 2.


We do always return the component data just in case you need to compose the address in a manner other than what the USPS suggests. In that case, you would need to combine the different components and you could choose to keep the secondary data (suite, apt, bldg…) separate.

The USPS has a rather lengthy publication that addresses some guidelines on how to put together address components to form a "proper" address. Page 28 explains how secondary information is to be formatted. Page 70 includes all "Secondary Unit Designators".

-