TF Fiscal
Documentation

Identity lookup

CNPJ lookup

Official company registry data for a 14-digit CNPJ.

GET/openapi/v3/consultas/cnpj/{cnpj}

Requires the token, timestamp and sign signature headers, see Authentication.

Returns company registry data for a 14-digit corporate tax number: legal name, trade name, registration status, legal nature, CNAE activity code, registered address, contacts and share capital.

The response is a bare object with no platform envelope. The field table lists every possible field; when the source holds no data for a field it comes back empty, and such fields are left out of the example. GET request: the signed body is the empty string and the CNPJ is part of the signed path.

Parameters

Path parameters

  • cnpjstringrequired

    14 digits, digits only. Formatted CNPJs are rejected: the / in 40.673.061/0001-34 would be parsed as a path separator.

    Example: 40673061000134

Responses

200

Lookup succeeded. Company registry data.

  • nistring

    CNPJ, 14 digits.

  • tipoEstabelecimentostring

    Establishment type: 1 headquarters, 2 branch.

    Values:12
  • nomeEmpresarialstring

    Registered legal name.

  • nomeFantasiastring

    Trade name (doing-business-as).

  • situacaoCadastralobject

    Registration status.

  • naturezaJuridicaobject

    Legal nature (code + description).

  • dataAberturastring

    Incorporation date, yyyy-MM-dd.

  • cnaePrincipalobject

    Primary economic activity (code + description).

  • enderecoobject

    Registered address. To render a full street line, concatenate tipoLogradouro + logradouro yourself; the source returns them separately.

  • municipioJurisdicaoobject

    Tax jurisdiction municipality (code + description).

  • telefonesarray

    Phone numbers.

  • correioEletronicostring

    E-mail address.

  • capitalSocialnumber

    Share capital.

  • portestring

    Company size code.

  • situacaoEspecialstring

    Special status (e.g. judicial recovery); usually absent.

  • dataSituacaoEspecialstring

    Effective date of the special status.

Errors

CodeHTTP
10016010400

Invalid CNPJ format (14 digits required). Check for stray formatting characters.

10016011400

Invalid CNPJ check digits. Validate locally with the mod-11 algorithm first.

10016012400

CNPJ not found. No such CNPJ in the official registry.

10016020503

Upstream data source is temporarily unavailable. Retry with exponential backoff (start at 1 s, double up to 30 s, add jitter); contact the platform if it persists.

Local validation and billing

Format and check-digit errors (10016010, 10016011) are rejected locally by the platform and never reach the upstream source: they consume no quota and are not billed. Authentication-layer errors (401 / 403 / 429) use the platform envelope; see the error model in Identity lookup.