Postal codes
Look up a postal code
Returns the street, neighborhood, city and state of a Brazilian postal code (CEP).
GET
apiKeyheader
AuthorizationBearer <token>API key in the Authorization: Bearer cf_live_... header. Create and revoke keys in the dashboard, under Desenvolvedores > Chaves de API (Developers > API keys).
postal_code*stringThe postal code, with or without the hyphen.
Match
^[0-9]{5}-?[0-9]{3}$The address of the postal code.
application/json- response
The address of a postal code (CEP), from the Correios postal code database.
object*stringObject type. Always postal_code.
postal_code*stringThe postal code, formatted as 00000-000.
Match
^[0-9]{5}-[0-9]{3}$street*|Street of the postal code. null when the code covers a whole city, which is common in small towns.
neighborhood*|Neighborhood of the postal code. null when the code covers a whole city.
city*stringCity of the postal code.
state*stringState of the postal code.
Possible values
AC: AcreAL: AlagoasAP: AmapáAM: AmazonasBA: BahiaCE: CearáDF: Distrito FederalES: Espírito SantoGO: GoiásMA: MaranhãoMT: Mato GrossoMS: Mato Grosso do SulMG: Minas GeraisPA: ParáPB: ParaíbaPR: ParanáPE: PernambucoPI: PiauíRJ: Rio de JaneiroRN: Rio Grande do NorteRS: Rio Grande do SulRO: RondôniaRR: RoraimaSC: Santa CatarinaSP: São PauloSE: SergipeTO: Tocantins
Value in
"AC""AL""AP""AM""BA""CE""DF""ES""GO""MA""MT""MS""MG""PA""PB""PR""PE""PI""RJ""RN""RS""RO""RR""SC""SP""SE""TO"curl "https://api.cartaflow.com.br/v1/postal-codes/string" \ -H "Authorization: Bearer $CARTAFLOW_API_KEY"{ "object": "postal_code", "postal_code": "01001-000", "street": "Praça da Sé", "neighborhood": "Sé", "city": "São Paulo", "state": "SP"}