Brazil

PropertyValue
CodeBR
CurrencyBRL
RegionAmericas, South America
Name orderGiven name first
StateState/province, a list of 27
PostcodeRequired, checked, like 01310-100, and by state
RulesGET /v1/countries/BR

Form

The address form, in English. A field that is not required shows its optional label.

CountryBrazil First name Last name Postal code01310-100 Address Apartment, suite, etc. (optional) City State/provinceChoose… Phone number (optional)(11) 96123-4567

Fields

FieldLabelRequiredAutocomplete
countryCountry (list)yescountry
first_nameFirst nameyesgiven-name
last_nameLast nameyesfamily-name
postcodePostal codeyespostal-code
line1Addressyesaddress-line1
line2Apartment, suite, etc.noaddress-line2
cityCityyesaddress-level2
stateState/province (list)yesaddress-level1
phone_numberPhone numbernotel
emailEmailyesemail

Postcode

RuleValue
Requiredyes
Pattern^[0-9]{5}([0-9]{3})?$
Example01310-100
Written as#####, #####-###
Checked by state27 of 27, below

POST /v1/validate refuses a postcode sent with a state it does not start like, as not_in_state. A state not listed is checked by pattern only. From libaddressinput.

StateStarts with
Acre699
Alagoas57
Amapá689
Amazonas69[0-24-8]
Bahia4[0-8]
Ceará6[0-3]
Distrito Federal7[0-1]|72[0-7]|73[0-6]
Espírito Santo29
Goiás72[89]|73[7-9]|7[4-6]
Maranhão65
Mato Grosso78[0-8]
Mato Grosso do Sul79
Minas Gerais3
Paraná8[0-7]
Paraíba58
Pará6[6-7]|68[0-8]
Pernambuco5[0-6]
Piauí64
Rio Grande do Norte59
Rio Grande do Sul9
Rio de Janeiro2[0-8]
Rondônia76[89]
Roraima693
Santa Catarina8[89]
Sergipe49
São Paulo[01][1-9]
Tocantins77

Phone

RuleValue
Calling code+55
National prefix0
Pattern^[0-9]{8,12}$
Example(11) 96123-4567
Written as(##) #####-####

Address format

How an address is written for reading, on an order page, a receipt or a label: address.format in the rules.

CODE
{first_name} {last_name}
{line1}
{line2}
{city}-{state}
{postcode}
{country}

On an envelope, the city and state/province are written in capitals.

Example

A real address in Brazil, from address.example, written with the format and the state by its name:

CODE
João Silva
Praça dos Três Poderes
Palácio do Congresso Nacional
Brasília-Distrito Federal
70160-900
Brazil

State/province

The form submits the code, which is what an order stores; the name is what the shopper reads, in their language.

CodeName
AcreAcre
AlagoasAlagoas
AmapáAmapá
AmazonasAmazonas
BahiaBahia
CearáCeará
Distrito FederalDistrito Federal
Espírito SantoEspírito Santo
GoiásGoiás
MaranhãoMaranhão
Mato GrossoMato Grosso
Mato Grosso do SulMato Grosso do Sul
Minas GeraisMinas Gerais
ParanáParaná
ParaíbaParaíba
ParáPará
PernambucoPernambuco
PiauíPiauí
Rio Grande do NorteRio Grande do Norte
Rio Grande do SulRio Grande do Sul
Rio de JaneiroRio de Janeiro
RondôniaRondônia
RoraimaRoraima
Santa CatarinaSanta Catarina
SergipeSergipe
São PauloSão Paulo
TocantinsTocantins

Messages

What the form shows under a field when a value is refused, in English. Every language is on its page under Languages.

FieldErrorMessage
countrynot_selectedSelect a country
first_nameblankEnter a first name
first_nameinvalid_charactersFirst name can only contain letters, spaces, hyphens and apostrophes
first_namecontains_emojiFirst name can't contain emojis
first_nametoo_longFirst name must be 255 characters or fewer
last_nameblankEnter a last name
last_nameinvalid_charactersLast name can only contain letters, spaces, hyphens and apostrophes
last_namecontains_emojiLast name can't contain emojis
last_nametoo_longLast name must be 255 characters or fewer
postcodeblankEnter a postal code
postcodeinvalidEnter a valid postal code, like 01310-100
postcodecontains_emojiPostal code can't contain emojis
postcodetoo_longPostal code must be 64 characters or fewer
line1blankEnter an address
line1contains_emojiAddress can't contain emojis
line1too_longAddress must be 255 characters or fewer
line2blankEnter address line 2
line2contains_emojiAddress line 2 can't contain emojis
line2too_longAddress line 2 must be 255 characters or fewer
cityblankEnter a city
cityinvalidEnter a valid city
citycontains_emojiCity can't contain emojis
citytoo_longCity must be 255 characters or fewer
statenot_selectedSelect a state or province
stateinvalidChoose a state or province from the list
statecontains_emojiState or province can't contain emojis
statetoo_longState or province must be 255 characters or fewer
phone_numberblankEnter a phone number
phone_numberinvalidEnter a valid phone number, like (11) 96123-4567
phone_numbercontains_emojiPhone number can't contain emojis
phone_numbertoo_longPhone number must be 24 characters or fewer
emailblankEnter an email address
emailinvalidEnter a valid email, like name@example.com
emailcontains_emojiEmail can't contain emojis
emailtoo_longEmail must be 254 characters or fewer