How to Validate Shipping Addresses in Brazil

Published: 8 Oct 2014

Last Updated: 9 Dec 2014

Address validation is an important part of the e-commerce checkout when working with physical goods. In this article we will detail how to automatically validated address in Brazil.

CEP and Address validation

The CEP, Postal Address Code, also known as the Brazilian Zip Code, is an 8-digit identification number which can be used to look up:

  • State
  • City
  • District
  • Neighborhood
  • Street name

These codes are assigned by Correios, or the Brazilian Postal Office but used as a reference code for logistics companies.

CEPs are used as a reference for calculating shipping costs and delivery time by Brazilian e-commerce websites. Unlike many other Brazilian identification codes like the CPF, CEPs don’t include a verification digit, which makes the code validation against a database an even more important part of the check-out process.

Brazilian e-commerce pages usually validate CEP numbers automatically, mostly during checkout stages of sales. A convenient solution commonly employed on these pages is the automatic filling of address parameters based on information from CEPs looked up in a database. This leaves only the most specific address identification parameters to be added by the customer, like numbers of building and apartment. This is both convenient for customers and let them easily see if a CEP number was mistyped.

Additional Address Information

A very important parameter for deliveries specific to Brazil is the Complemento, the field in the address description specific for information beyond the house or building numbers. The Complemento can, among other information, refer to:

  • Apartment numbers
  • Building block specification
  • House specification in case there are multiple ones sharing the same number

Unlike in other countries, deliveries in Brazil must be directed to specific locations, in this case, specific apartments or houses, to reach their customers successfully. Also, because of the multiple types of information it can refer to, companies delivering in the country must not limit the Complemento field to just a few characters, or limit just to numbers.

Integration with CEP Database

There are multiple paths to integrate an automatic CEP lookup in Correios data base:

Acquire the Database

Correios offers updated versions of their address and CEP database formatted in MS-Access for the premium version or text files for the basic version. Both of which must be acquired at their sales page at around BRL 1,100.00 and BRL 2,500.00 each.

The database is updated quarterly, and Correios offers a full year of updates after the purchase at no additional cost. After this period they charge an annual maintenance fee of BRL 840.00 or BRL 2,100.00 depending on the version.

Link to Correios CEP Query Service

A zero cost alternative to acquiring the full data base is to embed a frame to the page on Correios website that provides the CEP search service. This approach lets the customer lookup the CEP or search CEP by address but does not offer any integration or API for the e-commerce operator.

If you do not provide a full integration with the CEP database directly, this is the minimum requirement, as Brazilians generally do not remember the CEP code of where they live off the top of their head. This is especially common in larger cities where one building can have several entrances from different streets, and therefore have multiple CEP numbers.

Third-Party or Unofficial Integration with CEP Databases

Many third-party, unofficial alternatives to direct integration with CEP databases are available online. These services are normally offered through proprietary APIs or by simply embedding their Javascript on your check-out page.

These methods can offer quicker solutions to integrate CEP query without the need to manually developing a database query system based on the Correios raw database. These services, however, also introduce an additional point of possible failure in your check-out flow.

Addresses unable to receive deliveries

Some locations with CEPs in Brazil are subject to restriction of deliveries by Correios. Those areas are comprised of rural, difficult to reach regions or locations that present risks for delivery staff, such as areas with high crime rates.

When a delivery is directed to restricted areas, the parcel will be redirected by Correios to a near post office from its location, where it can be picked up in a period of seven days before being returned to sender. The recipient, however, is usually not notified and must inquiry the delivery himself.

Correios does not provide a complete overview of these areas on their database, as many of them are frequently removed or added to the restriction list. The only means for customers to check if their addresses can be delivered to is to access a special page on Correios website.

The non-inclusion of the restrictions on their CEP database can be problematic for e-commerce companies who use their services, as orders to these addresses can be normally validated without any warning to customers.

It is also important to note that most Brazilian e-commerce websites require CEP to process orders, so anyone without the code is unable to place an order online.

Shipping Information Validation Solutions

When selecting an e-commerce solution to work with in the Brazilian market it is important to make sure they are familiar with the local shipping and fulfillment challenges.

Digital River is one such e-commerce solution provider, offering services to help companies minimize the risks for invalid address information during the check-out process, effectively helping you reduce support costs and increase customer satisfaction.

Address verification in Brazil is not only a topic for Brazilian e-commerce business but increasingly also a topic of global e-commerce business, as Brazilian consumers are getting used to order goods online from abroad. Digital River provides their local experience at a global scale, making them an ideal partner also for businesses that see an increase in orders from Brazilian customers.

Get Assistance with E-commerce in Brazil

Tech in Brazil have teamed up with some great companies that provide assistance in Brazil. By filling out the short form below you will receive a recommendation of the companies that are best suited to handle your inquiry by e-mail. This service is a FREE service for readers of Tech in Brazil.


Article Author

Marcelo Teixeira

Marcelo Teixeira