The problemMany software developers have misconceptions about postal codes (usually referred to as zipcodes in the United States) and how they relate to geographic areas. We hope that this guide will help cast light on some of the common misconceptions, and thus help prevent developers from building applications based on faulty logic. One of the most common problems we see is developers struggling when the assumptions they made about postcodes based on their home country turn out not to be valid in other countries.
BackgroundThe key point to understand is that postal codes are a tool used by postal services to speed up the delivery of physical mail. In some parts of the world postal codes have become a shorthand way to refer to areas, and this has lead to a mistaken, albeit understandable, perception that postcodes always correspond to locations.
Common points of confusion and misconceptions
Postcodes always represent locationsNo, for most countries postcodes represent mail delivery points. Those points may or may not be in fixed locations. For example, many countries assign postcodes to military units. The postcodes stays the same regardless of where the unit is physically based. In many countries large companies or government departments have their own postal code with no correlation to physical location.
Postcodes never move or changeNo, in most countries there is on-going fluctuations in postcodes. New postcodes are created, old codes are retired, large organization move and take their code with them. Occasionally countries will change their entire postcode system (fun!).
Postcodes work roughly the same way in all countriesNo, not at all. Almost every aspect of what a postcode is and what it means can differ across countries. The format of the code, the number of people it represents, etc, etc.
All countries have postcodesNo, many countries do not have any form of postal code at all. Also, some countries technically have a postcode system, but it is not widely used.
Every geographic location belongs to a certain, unique postcode region.While some countries have assigned postcode regions to all of their territory, many others have not. Remote locations, for example in a large forest, or lakes or other bodies of water, may not fall into any postal region.
Locations have a single, unique postcodeNo, often large buildings will have multiple postcodes, for example if there are multiple, large organizations based there. Usually it will depend on how many people are at the location (and thus how much mail typically needs to be sent there). An example: skyscrapers in New York can have multiple "zipcodes" (as postcodes are known in the US). Also when postcodes change people will often keep using the old postcode, even after a new postcode has been assigned to the location.
Postal systems are unique to a specific countryNo, many countries and territories of the world use the postal service of other countries. For example Liechtenstein uses the Swiss postal system. For logistical convenience, exclaves of one country often use the postal system of another country. For example the German exclave Büsingen uses both the German and Swiss postal services.
Postcodes are unique to a specific countryNo, many countries use strings of numbers as their postal code. So if you just send us a query like
12345we have no idea which country you mean. Please always also add a country name.