API

<back to all web services

i2cCorreiosDNE

Consulta Diretorio Nacional de Enderecos [Correios]

The following routes are available for this service:
All Verbs/i2c/Correios/DNE
All Verbs/i2c/100003
All Verbs/i2c100003
Parameters:
NameParameterData TypeRequiredDescription
CEPpathNumeroYesNumero do CEP

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /json/reply/i2cCorreiosDNE HTTP/1.1 
Host: api.xdata.com.br 
Content-Type: application/json
Content-Length: length

{"CEP":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Response":{"Status":{"Protocol":"00000000000000000000000000000000","DateTime":"\/Date(-62135596800000-0000)\/","Code":0,"Message":"String","Detail":"String","Mode":"String","Type":"String","Source":"String","HTML":"String","URL":"String","Cookie":"String"},"Input":[{"Key":"String","Value":"String"}],"Output":[{"RazaoSocial":"String","CodigoIBGEMunicipio":0,"Nome":"String","TipoLogradouro":"String","Logradouro":"String","Numero":"String","Complemento":"String","Bairro":"String","Municipio":"String","UF":"String","CEP":"String"}],"Error":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String"}]}}}