Docs
Postal codes

Look up a postal code

Returns the street, neighborhood, city and state of a Brazilian postal code (CEP).

GET
/postal-codes/{postal_code}

Authorization

apiKey
headerAuthorizationBearer <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).

Path Parameters

postal_code*string

The postal code, with or without the hyphen.

Match^[0-9]{5}-?[0-9]{3}$

Response Body

The address of the postal code.

application/json
  1. response

The address of a postal code (CEP), from the Correios postal code database.

object*string

Object type. Always postal_code.

postal_code*string

The 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*string

City of the postal code.

state*string

State of the postal code.

Possible values

  • AC: Acre
  • AL: Alagoas
  • AP: Amapá
  • AM: Amazonas
  • BA: Bahia
  • CE: Ceará
  • DF: Distrito Federal
  • ES: Espírito Santo
  • GO: Goiás
  • MA: Maranhão
  • MT: Mato Grosso
  • MS: Mato Grosso do Sul
  • MG: Minas Gerais
  • PA: Pará
  • PB: Paraíba
  • PR: Paraná
  • PE: Pernambuco
  • PI: Piauí
  • RJ: Rio de Janeiro
  • RN: Rio Grande do Norte
  • RS: Rio Grande do Sul
  • RO: Rondônia
  • RR: Roraima
  • SC: Santa Catarina
  • SP: São Paulo
  • SE: Sergipe
  • TO: 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"}