Migrate from SintegraWS
How to replace the SintegraWS RF, ST, SN and SF plugins with the Lookup CNPJ operation of the CNPJá API, in one request: parameters, fields and errors.
This guide shows how to move an integration with the SintegraWS API to the CNPJá API: operations, parameters, response fields and behavior differences.
Overview
- The SintegraWS
RF,ST,SNandSFplugins become a single operation, Lookup CNPJ. The plugin is replaced by optional resources inexpand, and one request can bring all of them. - The token leaves the query string and goes, on its own, in the
Authorizationheader. - The HTTP status now gives the result. Only errors carry
status,codeandmessagein the body, andcodeis stable text, such asESTABLISHMENT_, instead of a number.NOT_ FOUND - Values are no longer formatted: CNPJ, CEP and CNAE without punctuation,
YYYY-MM-DDdates, numeric share capital, E.164 phones and classifications ascodeandlabelpairs. - You choose the maximum data age with
maxAge, and billing separates cached queries from live queries. - Looking up a state registration by its number has no equivalent.
Effort: medium. Switching the URL and authentication is small; most of the work is rewriting the field mapping and the error handling.
Prerequisites
- Account and key: sign up and create a key in API keys. The walkthrough is in First request.
- Authentication: send the key as the entire value of the
Authorizationheader, with no prefix:Authorization: YOUR_. WithAPI_ KEY Bearer, the request is rejected with401API_. See Authentication and Keys and security.KEY_ INVALID - Base URL:
https:/./ api. cnpja. com/ v2 - What changes: nothing from the SintegraWS account carries over. The token and the credits purchased there don’t work at CNPJá, and usage now follows your organization’s plan quotas, renewed every month.
Matching operations
| SintegraWS | CNPJá | Notes |
|---|---|---|
execute-api. with plugin=RF | Lookup CNPJ | No expand. See CNPJ lookup. |
execute-api. with plugin=ST and cnpj | Lookup CNPJ with expand=stateRegistry | State registrations from the CCC. See State registrations. |
execute-api. with plugin=ST, ie and uf | No equivalent | The API doesn’t look up by state registration number. |
execute-api. with plugin=SN | Lookup CNPJ with expand=company. | With company. for previous periods and future events. See Tax regime. |
execute-api. with plugin=SF | Lookup CNPJ with expand=suframa | SUFRAMA registrations. See SUFRAMA. |
url_ from the SF plugin | Issue CNPJ dossier with certificates=SUFRAMA_ | Returns the PDF directly, with no temporary URL. See Certificates. |
cnpjs_ from the RF plugin | Lookup company | By the 8-character CNPJ root; lists the establishments in establishments. |
Request example
SintegraWS, RF plugin:
GET /api/v1/execute-api.php?token=YOUR_TOKEN&cnpj=37335118000180&plugin=RF HTTP/1.1
Host: www.sintegraws.com.br CNPJá:
GET /v2/establishments/37335118000180 HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY CNPJá, with the RF, ST, SN and SF plugins in a single request:
GET /v2/establishments/37335118000180?expand=company.taxRegime,stateRegistry,suframa HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY Parameters
| SintegraWS | CNPJá | Notes |
|---|---|---|
token | Authorization header | Key with no prefix. |
cnpj | taxId in the path | 14 characters without punctuation; uppercase letters are accepted for alphanumeric CNPJs. |
plugin=RF | No expand | The CNPJ registration always comes back. |
plugin=ST | expand=stateRegistry | stateRegistry. picks the UFs: ORIGIN (default), UFs such as SP, or ALL. stateRegistry. adds the address, activity and dates of each registration. |
plugin=SN | expand=company. | company. adds timeline and, for SIMPLES_, regularIbsStartDate and regularCbsStartDate. |
plugin=SF | expand=suframa | |
ie | No equivalent | |
uf | No equivalent | It only existed for the ie lookup. To choose the UFs of a CNPJ’s registrations, use stateRegistry.. |
| No equivalent | maxAge | Maximum accepted data age, default 45d. See Max age and partial success. |
| No equivalent | company., stateRegistry., suframa. | Maximum age for a single resource; requires the resource in expand. |
Send multiple expand values comma-separated or by repeating the parameter. See Response expansion.
Response fields
In the tables, CNPJá paths are relative to the Lookup CNPJ response, unless stated otherwise.
Request control
| SintegraWS | CNPJá | Notes |
|---|---|---|
code, status, message | HTTP status and, for errors, code and message | See the code table under Behavior differences. |
ultima_ (RF plugin) | updatedAt | ISO 8601 date-time in UTC, instead of dd/. |
cache (RF plugin) | No equivalent | The maximum age is the one you ask for in maxAge, and each resource reports its last update in its own updatedAt. |
extra | No equivalent |
Identification and status (RF plugin)
| SintegraWS | CNPJá | Notes |
|---|---|---|
cnpj | taxId | No punctuation. |
tipo | type. | MATRIZ becomes HEAD; FILIAL becomes BRANCH. |
abertura | incorporationDate | YYYY-MM-DD. |
nome | company. | |
fantasia | tradeName | null when there is no trade name. |
situacao | status. | See the code table below. |
data_ | statusDate | YYYY-MM-DD. |
motivo_ | statusReason., statusReason. | Present only when the establishment is not active. |
situacao_ | specialStatus., specialStatus. | Present only when there is a special status. |
data_ | specialStatusDate | Same condition as specialStatus. |
situacao | status. |
|---|---|
ATIVA | ACTIVE |
BAIXADA | CLOSED |
INAPTA | NONCOMPLIANT |
SUSPENSA | SUSPENDED |
NULA | VOID |
Address and contacts (RF plugin)
| SintegraWS | CNPJá | Notes |
|---|---|---|
logradouro | address. | |
tipo_ | No equivalent | |
numero | address. | |
complemento | address. | |
bairro | address. | |
municipio | address. | |
uf | address. | |
cep | address. | 8 digits, instead of 00.. |
ibge. | address. | 7 digits. |
ibge. | No equivalent | The UF comes as an abbreviation in address.. |
telefone | phones[]. | A list; each number in E.164, such as +551123958400, with the type in phones[].. |
email | emails[]. | A list, with the type in emails[].. |
Activities (RF plugin)
| SintegraWS | CNPJá | Notes |
|---|---|---|
atividade_ | primaryActivity. | An object, instead of a one-item list. 7-digit CNAE. |
atividade_ | primaryActivity. | |
atividades_ | secondaryActivities[]. | 7-digit CNAE, without punctuation. |
atividades_ | secondaryActivities[]. |
Company and partners (RF plugin)
| SintegraWS | CNPJá | Notes |
|---|---|---|
natureza_ | company., company. | 206-2 - Sociedade Empresária Limitada becomes 2062 and a separate label. |
sigla_ | No equivalent | |
porte | company. | ME becomes MICRO; EPP becomes SMALL; DEMAIS becomes OTHER. |
capital_ | company. | A number, such as 56758501, instead of formatted text. |
efr | company., company. | Present only for public-administration legal natures. |
qsa[] | company. | See Partners and people. |
qsa[]. | company. | |
qsa[]. | company., company. | 37-Sócio Pessoa Jurídica Domiciliado no Exterior becomes 37 and a separate label. |
qsa[]. | company., .label | Two-letter country code, such as US, present for every partner, not only foreign ones. |
qsa[]. | company. | legalRepresentative exists only when there is a representative, instead of empty text. |
qsa[]. | company., .label | |
cnpjs_ | establishments[]. in Lookup company | |
cnpjs_ | establishments[]. in Lookup company | |
cnpjs_ | establishments[]. in Lookup company | HEAD or BRANCH. |
Partners also carry fields with no SintegraWS counterpart, such as person., person. (masked CPF or CNPJ), person., admissionDate and person..
State registrations (ST plugin)
With expand=stateRegistry. Fields marked DETAILED require stateRegistry..
| SintegraWS | CNPJá | Notes |
|---|---|---|
cnpj | taxId | |
nome_ | company. | |
nome_ | tradeName | |
situacao_ | stateRegistry. | Boolean for a restriction as recipient in the UF: false when the source returns Sem restrição. The CNPJ status at the Receita Federal is in status.. |
porte_ | company. | |
inscricao_ | stateRegistry. | |
uf | stateRegistry. | |
tipo_ | stateRegistry., .label | |
contribuinte_ | stateRegistry. | There is no boolean: the type separates, for example, a taxpayer (STATE_) from a non-taxpayer (NON_). |
situacao_ | stateRegistry. | Boolean for an enabled registration; doesn’t separate Inativo from Baixado. |
situacao_ | No equivalent | |
data_ | stateRegistry. | YYYY-MM-DD, instead of dd-MM-yyyy. |
informacao_ | No equivalent | |
data_ | stateRegistry. | DETAILED. |
data_ | stateRegistry. | DETAILED. |
cnae_, cnae_ | stateRegistry., .label | DETAILED. |
logradouro, numero, complemento, bairro | stateRegistry., .number, .details, .district | DETAILED. |
municipio, cep | stateRegistry., .postalCode | DETAILED. |
ibge. | stateRegistry. | DETAILED. |
ibge. | No equivalent | |
regime_ | stateRegistry. | DETAILED. A boolean, instead of text: true when the CCC regime indicates an exceeded sublimit, and false for the others, such as the normal one. |
outras_ | The other items of stateRegistry. | Request the UFs in stateRegistry., or ALL. |
outras_, .uf, .situacao_ | stateRegistry., .state, .isEnabled |
Simples Nacional (SN plugin)
With expand=company.. timeline requires company..
| SintegraWS | CNPJá | Notes |
|---|---|---|
cnpj | taxId | |
cnpj_ | No direct field | In Lookup company, the head office is the establishments[] item whose type. is HEAD. |
nome_ | company. | |
situacao_ | company., company. | SIMPLES_, SIMPLES_ or SIMPLES_ for optants, with SIMPLES_ for those that also opt into the IBS or CBS regular regime; start of the current period, present only for these codes. |
situacao_ | company., company. | SIMPLES_ for optants; start of the current period, present only for SIMPLES_. |
situacao_ | company. with type. equal to SIMPLES_ | Each period with startDate, endDate and details. |
situacao_ | company. with type. equal to SIMEI_ | |
eventos_ | company. with type. equal to SIMPLES_ or SIMPLES_ | |
eventos_ | company. with type. equal to SIMEI_ | |
agendamentos | No equivalent |
When company. is SIMPLES_, company. also returns company. and company., the start of the current IBS and CBS regular regime periods, which come only from live queries at the Simples Nacional. Either may be null when the company opts into only one of the two. The previous periods and upcoming events of these regimes come in company. with type. equal to REGULAR_, REGULAR_, REGULAR_, REGULAR_, REGULAR_ or REGULAR_.
SUFRAMA (SF plugin)
With expand=suframa.
| SintegraWS | CNPJá | Notes |
|---|---|---|
cnpj | taxId | |
razao_, nome_ | company. | |
inscricao_ | suframa. | A list, instead of a single registration. |
situacao_ | suframa. | ACTIVE, INACTIVE, BLOCKED or CANCELLED. |
data_ | No equivalent | |
endereco_ | suframa. | A list. |
telefone | suframa. | A list, in E.164. |
natureza_, .descricao | company., .label | Comes from the Receita Federal registration. |
endereco., .numero, .complemento, .bairro | suframa., .number, .details, .district | |
endereco., .uf, .cep | suframa., .state, .postalCode | |
atividade_, with codigo and descricao | suframa., .label | 7-digit CNAE, instead of 17. |
atividades_, with code and text, or atividade_, with codigo and descricao | suframa., .label | 7-digit CNAE, instead of 17. |
atividade_ of the primary and secondary activities | No equivalent | |
incentivos[] | Mapa dos Incentivos Fiscais | SUFRAMA no longer publishes the incentives of each registration and now points to this official spreadsheet, so the API doesn’t return them. The criteria SUFRAMA applied are in Estimate incentives, to estimate the incentives and confirm them in the spreadsheet. |
url_ | Issue CNPJ dossier with certificates=SUFRAMA_ | The PDF in the response, instead of a URL valid for 10 minutes. |
Each registration also carries registrationDate, hasApprovedProject, approvalDate and updatedAt, with no SintegraWS counterpart.
Behavior differences
Freshness and caching
In CNPJá, each resource comes from the cache while it is within maxAge and is queried live, before the response, when it is older or was never fetched. maxAge ranges from 5m to 1y, with a 45d default, and each resource reports its last update in its own updatedAt. Each resource also accepts a limit of its own, such as stateRegistry.. See Max age and partial success.
Partial success
When a live query fails or runs past its time limit, the response is 206, with the same shape as 200: the affected resource keeps its cached data, or comes back empty if it was never fetched, and is not billed. With no cached data to fall back on, such as on a CNPJ’s first lookup, the request fails instead of returning 206. Treat 206 as success and compare each resource’s updatedAt with the limit you asked for. See Partial success.
Errors
SintegraWS reports the result in code, status and message in the body; in CNPJá, the HTTP status gives the result. Every error body carries status, code, message and traceId. Handle errors by code, which is stable, and use message for display only. See Limits and errors.
SintegraWS code | CNPJá |
|---|---|
0 Pesquisa realizada com sucesso | 200, or 206 on partial success |
1 not registered at the Receita Federal (RF plugin) | 404 ESTABLISHMENT_ |
1 not registered at SINTEGRA (ST plugin) | 200 with an empty stateRegistry. |
1 not registered at SUFRAMA (SF plugin) | 200 with an empty suframa. |
2 Invalid CNPJ | 400 REQUEST_ |
3 Invalid token | 401 API_, API_ or API_ |
5 Credits exhausted | 402, when the month’s quota or the overage budget is used up, with one of the codes in Error codes. The ways out are in Quota used up |
6 Plugin doesn’t exist | 400 REQUEST_, with errors[]. equal to ENUM, for an invalid expand value |
7 Source instability | 206 with the cached resource; with no cache, the request fails and should be retried later |
8 Internal error | 500 UNEXPECTED_ |
Limits
With a key, the requests-per-second and concurrent-request limits apply to the whole organization, across all of its keys, and follow its plan; without a key, they apply to each source IP. The values are in Usage limits. Above them, the response is 429, not billed. Each request has a maximum duration, and the client timeout must stay above it, as shown in Timeout and size.
Billing
Each resource in the response is billed separately, as a live query, which costs more, or a cached query, and each unit has its own quota in the plan, renewed every month. On Pro, the quota of each unit can grow with packs, and the organization can set a budget to pay for each query beyond the quota at the per-query overage price, so an exhausted quota does not have to stop the integration. When a quota runs out with no overage budget, or the month’s budget runs out, every request made with one of the organization’s keys gets 402, as explained in Quota used up; on Free, which has no packs or budget, this happens as soon as the quota runs out. Requests without a key, rejected requests and server failures are not billed, as listed in What is not charged. Requesting the RF, ST, SN and SF plugins in one request bills the registration, company., stateRegistry and suframa separately. With stateRegistry., billing grows with the registrations and the requested UFs. A 404 is billed too, as detailed in What is charged even without a useful result. Responses carry no cost headers: track usage under Usage. See Queries and quota, what each operation consumes in the Metering Rules and Pricing.
Language and labels
label values and error messages come in Portuguese by default; send Accept-Language: en-US to get them in English. Codes, field names and official source data are never translated. Use code in your logic and label for display only. See Language.
Missing values
Where SintegraWS returns empty or masked text, such as ********, CNPJá returns null, an empty list or omits the field, depending on the case. See Response format.
No equivalent
- Lookup by state registration number (
iewithuf). - The sandbox CNPJ. Validate the integration with real CNPJs, using the key.
- The temporary certificate URL (
url_). Issue CNPJ dossier returns the PDF in the response.comprovante - SUFRAMA
data_.validade_ cadastral sigla_,natureza_ juridica tipo_,logradouro situacao_,ie_ desc informacao_,ie_ como_ destinatario agendamentos,ibge.andcodigo_ uf extra.- The other SintegraWS APIs, such as Receita Federal CPF, SII RUT, Consulta Saldo and Validação Dados Bancários.
Step by step
- Create the account and an API key, as in First request.
- Replace
execute-api.withphp GET https:/followed by the CNPJ without punctuation./ api. cnpja. com/ v2/ establishments/ - Remove
tokenfrom the URL and send the key in theAuthorizationheader, with no prefix. - Replace each
pluginwith the matchingexpandvalue, and merge into one request the plugins you called in sequence for the same CNPJ. - Set
maxAgeand each resource’s own limit according to how current the data must be. - Rewrite the response parsing with the tables above, using
codeinstead of text and converting dates, CEP, phones and share capital. - Handle errors by HTTP status and
code, accept206as success, and retry429,500and504with a delay. - Review the flows that looked up by state registration number, which have no equivalent.
- Validate the integration with the key, including the
expandresources, and follow usage in Usage. - Move traffic gradually and compare responses before turning off the SintegraWS integration.
Sources for this comparison
What this page says about SintegraWS comes from its public documentation:
- API Receita Federal: the
RFplugin, the request parameters, the registration fields and the response codes. - API SINTEGRA: the
STplugin and the state registration fields. - API Simples Nacional: the
SNplugin and the Simples Nacional and SIMEI fields. - API SUFRAMA: the
SFplugin and the SUFRAMA registration fields. - SintegraWS APIs: the API catalog.
Sources accessed on November 19, 2026.
Third-party trademarks on this page are used only to identify them, with no affiliation or endorsement (Terms of Use).