Reference
Errors
Status codes and the shape of error responses.
| Status | When |
|---|---|
400 | CNPJ with invalid format or check digits; in search, an invalid limit or cursor. |
404 | Valid CNPJ, but not in the database. |
429 | Paginated search: server limit reached. |
502 | No provider answered. The body carries each error. |
Shape
// v2
{ "error": "Invalid CNPJ: use 12 alphanumeric characters + 2 check digits." }
// v1
{ "detail": "Invalid CNPJ: use 12 alphanumeric characters + 2 check digits." }502 error
{
"message": "Falha ao consultar CNPJ em ambas as fontes.",
"minhareceita_error": "HTTP 500 ao consultar minhareceita.org",
"receitaws_error": "HTTP 429 ao consultar receitaws.com.br"
}