GET
/api/company/get_cep_detailLook up address by CEP
Resolves a Brazilian CEP (ZIP code) returning UF, IBGE municipality code and address data. Useful for filling in company and customer addresses. Requires a distributor (b2b) account.
Required headers
tokenstring | string | Distributor token (b2b — the account must have isb2b=true) |
signstring | string | MD5 signature (path includes the query string) |
timestampstring | string | Unix timestamp in seconds |
Query string
cep*string | string | Brazilian CEP (8 digits, with or without dash) |
* Required field.
Examples
# sign = md5(token + path + body + timestamp) # Template generated from the endpoint path; replace the placeholders curl -X GET "https://api.tffiscal.com/api/company/get_cep_detail" \ -H "Content-Type: application/json" \ -H "token: $TOKEN" \ -H "timestamp: $TIMESTAMP" \ -H "sign: $SIGN"
GET /api/company/get_cep_detail?cep=01001000
{
"success": true,
"data": {
"cep": "01001-000",
"uf": "SP",
"ibge": 3550308,
"logradouro": "Praça da Sé",
"bairro": "Sé",
"localidade": "São Paulo",
"ddd": "11"
}
}