API and developers
Countries Supported by the UPCS API
The UPCS API returns codes for 25 supported countries. See the list, how the country prefix works, and what unsupported_location means.
Updated 14 October 2026 · 2 min read
UPCS generates codes for locations in 25 countries. The API follows the same coverage as the website, so a point in one of these countries gets a code, and a point elsewhere is refused.
Supported countries
Pakistan, United States, India, China, Brazil, Australia, Canada, United Kingdom, Germany, France, Italy, Spain, Japan, Mexico, Russia, Argentina, South Africa, Nigeria, Egypt, Turkey, Iran, Saudi Arabia, United Arab Emirates, Thailand and Vietnam.
The country prefix
A code has the format CC-XXXX-XXXX. The first two letters are the country prefix, for example PK in PK-1A2B-3C4D. The API also returns country_code in its responses, and the lookup endpoint adds country_flag.
What happens outside the list
If the coordinates fall outside the supported countries, the API returns:
{
"success": false,
"message": "...",
"code": "unsupported_location"
}
The HTTP status is 422. The message wording can change, so match on the 422 status and unsupported_location.
This applies to the map selection, resolve and generate endpoints.
Handle it in your integration
- Treat
unsupported_locationas a normal outcome, not a server failure. - Show a clear message such as "This location is not covered yet".
- Let the customer continue with the normal address, since the UPCS code complements the address rather than replacing it.
- Do not retry the same point; the result will not change.
Accuracy at borders
Coverage is decided by the location of the point. Points near a border are handled by where the coordinates actually fall.
For all error responses, see error codes explained. The countries hub has information about postal systems by country.
Frequently asked questions
What happens outside the supported countries?
The request fails with a 422 response and the error code unsupported_location.
