AnsweredAssumed Answered

Integration of ZIPCODE (CEP Brazil)

Question asked by allebueno on Jan 26, 2018
Latest reply on Mar 11, 2018 by pfroelicher

Hello.

 

I found this API to pull the ZIPCODE (here in Brazil we call CEP).

To integrate self-completion of the address based on the ZIPCODE ( CEP ) within the contact form how do I?

Could someone guide me?

 

 

Best regards!

Alexandre.

 

 

Examples:

 

 

/*

The returned result would be something like this:

 

[

    'zipCode' => '01001-000',

    'street' => 'Praça da Sé',

    'complement' => 'lado ímpar',

    'neighborhood' => 'Sé',

    'city' => 'São Paulo',

    'state' => 'SP',

    'ibge' => '3550308',

]

*/

 

 

JSON

URL: viacep.com.br/ws/01001000/json/

UNICODE: viacep.com.br/ws/01001000/json/unicode/

    {

      "cep": "01001-000",

      "logradouro": "Praça da Sé",

      "complemento": "lado ímpar",

      "bairro": "Sé",

      "localidade": "São Paulo",

      "uf": "SP",

      "unidade": "",

      "ibge": "3550308",

      "gia": "1004"

    }

 

JSONP

URL: viacep.com.br/ws/01001000/json/?callback=callback_name

UNICODE: viacep.com.br/ws/01001000/json/unicode/?callback=callback_name

    callback_name({

      "cep": "01001-000",

      "logradouro": "Praça da Sé",

      "complemento": "lado ímpar",

      "bairro": "Sé",

      "localidade": "São Paulo",

      "uf": "SP",

      "unidade": "",

      "ibge": "3550308",

      "gia": "1004"

    });

Outcomes