Brazil CEP API

XML response from Brazil CEP API

Brazil CEP API returns to you the address of a specific CEP.
Like all DB-In APIs you have access to it from any plataform or device: Webhost, Flash Application, Desktop and Mobile.



FEATURES

  • Response can be XML, JSON or String.
  • Verify CEPs.
  • Fully open and no limits.


SIMPLE USAGE


http://db-in.com/apis/cep/?cep=04630-030

// Or with another format.

http://db-in.com/apis/cep/?cep=04630-030&formato=json


REQUEST

  • cep: The CEP string with format XXXXX-XXX. If you use anything different, an error will thrown.
  • formato: The formats of return. Can be XML or JSON or STRING. This is not case sensitive. If you pass anything different, the return format will be XML.


RESPONSE
Independent of return format what you will have in response is:

  • resultado: Return 1 to sucess, or 0 if cep is not finded or malformed.
  • resultado_txt: Can return “sucesso – cep completo” or “serviço indisponível/cep inválido”.
  • uf: The acronym of state with two letters. For example “SP”.
  • cidade: The name of the city.
  • bairro: The name of the district.
  • tipo_logradouro: The type of the street.
  • logradouro: The name of the street.


For example, with a XML format you will have:

	
		1
		sucesso - cep completo
		SP
		São Paulo
		Jardim Aeroporto
		Rua
		Carlos Pinto Alves
	


Bellow you can see some examples of return to:
http://db-in.com/apis/cep/?cep=04630-030&formato=xml
http://db-in.com/apis/cep/?cep=04630-030&formato=json
http://db-in.com/apis/cep/?cep=04630-030&formato=string


Enjoy and good Code!

No comments yet.

No trackbacks yet.