#17901·ToolJet

Marketplace plugin: CPF.CNPJ data source for Brazilian CPF and CNPJ lookups

Author: alissonlinnekerCreated Sep 10, 2026Updated Sep 16, 2026
Labelsmarketplace

Is your proposal related to a problem?

Teams in Brazil building internal tools with ToolJet (customer onboarding, KYC, supplier approval, billing, back office) constantly need to look up a person's CPF or a company's CNPJ against the Federal Revenue (Receita Federal) records: full name, registration status, company name, trade name, address, partners (QSA), Simples Nacional status and so on.

Today the only option is the generic REST API data source, so every app has to rebuild the same things: URL construction, check digit validation (CPF and the new alphanumeric CNPJ format in force since 2026), error code mapping and token handling. A dedicated marketplace plugin removes that boilerplate and gives users a dropdown of operations, the same way the AfterShip, GitHub and Asana plugins do.

Describe the solution you'd like

A new marketplace plugin in marketplace/plugins/cpfcnpj backed by the CPF.CNPJ API (https://www.cpfcnpj.com.br/dev/), a Brazilian provider operating since 2015 with real time (D+0) data straight from Receita Federal and other official sources, certified ISO/IEC 27001, ISO/IEC 27701 and ISO 37301, and used by companies such as SumSub, GOL, Bybit, KaBuM!, Sicoob, Sicredi, Unimed, TOTVS and Wise.

Proposed scope, mirroring the AfterShip plugin (API key auth, native fetch, no extra runtime dependencies):

  • Authentication: a single encrypted token field in manifest.json (password input). The API expects the token as the first path segment, so the plugin builds https://api.cpfcnpj.com.br/{token}/{package}/{document}.
  • Operations (operations.json, dropdown plus a document field with codehinter):
    • CPF: name (package 1)
    • CPF: name, birth date, gender, address (package 3)
    • CNPJ: company name, trade name, address (package 5)
    • CNPJ: full registration with partners (QSA), status, Simples Nacional, CNAE, legal nature (package 6)
    • Balance: remaining credits of a package (free call, no credit consumed)
  • Local validation before calling the API: CPF check digits and CNPJ check digits, including the alphanumeric CNPJ format, so invalid input never spends a credit.
  • Error handling: the API answers {status: 0, erro, erroCodigo} for invalid document, invalid token, no credits or rate limit; the plugin surfaces those as QueryError with the numeric code in data.
  • Test connection: uses the free balance endpoint (/{token}/saldo/{package}), which validates the token and the source IP without consuming credits.
  • Entry in server/src/assets/marketplace/plugins.json, a README.md for the plugin, and Jest tests for validators, URL building, error mapping and testConnection (fetch mocked, no network in CI).

Reviewers can exercise every operation locally without creating an account: the public test token 5ae973d7a997af13f0aaf2bf60e65803 returns fictitious data at no cost for any document with valid check digits.

The docs page under docs/docs/marketplace/ can follow in a separate PR, as with the Asana plugin, or be included in the same PR if you prefer.

Describe alternatives you've considered

  • Keep using the REST API data source with a shared query template: it works, but every app repeats validation and error mapping, and there is no operation dropdown.
  • A built-in plugin under plugins/packages: looking at recent history that directory holds databases and infrastructure connectors, while third party API connectors go to the marketplace, so the marketplace looks like the right place.

If the feature is approved, would you be willing to submit a PR?

Yes. I maintain the integration on the CPF.CNPJ side and can submit the PR against main with the structure above, plus tests, and iterate on review feedback.