Skip to content
Migrate from SintegraWS
API · Migration

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, SN and SF plugins become a single operation, Lookup CNPJ. The plugin is replaced by optional resources in expand, and one request can bring all of them.
  • The token leaves the query string and goes, on its own, in the Authorization header.
  • The HTTP status now gives the result. Only errors carry status, code and message in the body, and code is stable text, such as ESTABLISHMENT_NOT_FOUND, instead of a number.
  • Values are no longer formatted: CNPJ, CEP and CNAE without punctuation, YYYY-MM-DD dates, numeric share capital, E.164 phones and classifications as code and label pairs.
  • 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 Authorization header, with no prefix: Authorization: YOUR_API_KEY. With Bearer, the request is rejected with 401 API_KEY_INVALID. See Authentication and Keys and security.
  • 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

SintegraWSCNPJáNotes
execute-api.php with plugin=RFLookup CNPJNo expand. See CNPJ lookup.
execute-api.php with plugin=ST and cnpjLookup CNPJ with expand=stateRegistryState registrations from the CCC. See State registrations.
execute-api.php with plugin=ST, ie and ufNo equivalentThe API doesn’t look up by state registration number.
execute-api.php with plugin=SNLookup CNPJ with expand=company.taxRegimeWith company.taxRegime.view=DETAILED for previous periods and future events. See Tax regime.
execute-api.php with plugin=SFLookup CNPJ with expand=suframaSUFRAMA registrations. See SUFRAMA.
url_comprovante from the SF pluginIssue CNPJ dossier with certificates=SUFRAMA_REGISTRATIONReturns the PDF directly, with no temporary URL. See Certificates.
cnpjs_do_grupo from the RF pluginLookup companyBy 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

SintegraWSCNPJáNotes
tokenAuthorization headerKey with no prefix.
cnpjtaxId in the path14 characters without punctuation; uppercase letters are accepted for alphanumeric CNPJs.
plugin=RFNo expandThe CNPJ registration always comes back.
plugin=STexpand=stateRegistrystateRegistry.states picks the UFs: ORIGIN (default), UFs such as SP, or ALL. stateRegistry.view=DETAILED adds the address, activity and dates of each registration.
plugin=SNexpand=company.taxRegimecompany.taxRegime.view=DETAILED adds timeline and, for SIMPLES_NACIONAL_HYBRID, regularIbsStartDate and regularCbsStartDate.
plugin=SFexpand=suframa
ieNo equivalent
ufNo equivalentIt only existed for the ie lookup. To choose the UFs of a CNPJ’s registrations, use stateRegistry.states.
No equivalentmaxAgeMaximum accepted data age, default 45d. See Max age and partial success.
No equivalentcompany.taxRegime.maxAge, stateRegistry.maxAge, suframa.maxAgeMaximum 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

SintegraWSCNPJáNotes
code, status, messageHTTP status and, for errors, code and messageSee the code table under Behavior differences.
ultima_atualizacao (RF plugin)updatedAtISO 8601 date-time in UTC, instead of dd/mm/aaaa hh:mm:ss.
cache (RF plugin)No equivalentThe maximum age is the one you ask for in maxAge, and each resource reports its last update in its own updatedAt.
extraNo equivalent

Identification and status (RF plugin)

SintegraWSCNPJáNotes
cnpjtaxIdNo punctuation.
tipotype.codeMATRIZ becomes HEAD; FILIAL becomes BRANCH.
aberturaincorporationDateYYYY-MM-DD.
nomecompany.legalName
fantasiatradeNamenull when there is no trade name.
situacaostatus.codeSee the code table below.
data_situacaostatusDateYYYY-MM-DD.
motivo_situacaostatusReason.code, statusReason.labelPresent only when the establishment is not active.
situacao_especialspecialStatus.code, specialStatus.labelPresent only when there is a special status.
data_situacao_especialspecialStatusDateSame condition as specialStatus.
situacaostatus.code
ATIVAACTIVE
BAIXADACLOSED
INAPTANONCOMPLIANT
SUSPENSASUSPENDED
NULAVOID

Address and contacts (RF plugin)

SintegraWSCNPJáNotes
logradouroaddress.street
tipo_logradouroNo equivalent
numeroaddress.number
complementoaddress.details
bairroaddress.district
municipioaddress.city
ufaddress.state
cepaddress.postalCode8 digits, instead of 00.000-000.
ibge.codigo_municipioaddress.municipality7 digits.
ibge.codigo_ufNo equivalentThe UF comes as an abbreviation in address.state.
telefonephones[].numberA list; each number in E.164, such as +551123958400, with the type in phones[].type.code.
emailemails[].addressA list, with the type in emails[].type.code.

Activities (RF plugin)

SintegraWSCNPJáNotes
atividade_principal[0].codeprimaryActivity.codeAn object, instead of a one-item list. 7-digit CNAE.
atividade_principal[0].textprimaryActivity.label
atividades_secundarias[].codesecondaryActivities[].code7-digit CNAE, without punctuation.
atividades_secundarias[].textsecondaryActivities[].label

Company and partners (RF plugin)

SintegraWSCNPJáNotes
natureza_juridicacompany.legalNature.code, company.legalNature.label206-2 - Sociedade Empresária Limitada becomes 2062 and a separate label.
sigla_natureza_juridicaNo equivalent
portecompany.size.codeME becomes MICRO; EPP becomes SMALL; DEMAIS becomes OTHER.
capital_socialcompany.shareCapitalA number, such as 56758501, instead of formatted text.
efrcompany.federativeEntity.code, company.federativeEntity.labelPresent only for public-administration legal natures.
qsa[]company.partners[]See Partners and people.
qsa[].nomecompany.partners[].person.legalName
qsa[].qualcompany.partners[].role.code, company.partners[].role.label37-Sócio Pessoa Jurídica Domiciliado no Exterior becomes 37 and a separate label.
qsa[].pais_origemcompany.partners[].person.domicileCountry.code, .labelTwo-letter country code, such as US, present for every partner, not only foreign ones.
qsa[].nome_rep_legalcompany.partners[].legalRepresentative.person.legalNamelegalRepresentative exists only when there is a representative, instead of empty text.
qsa[].qual_rep_legalcompany.partners[].legalRepresentative.role.code, .label
cnpjs_do_grupo[].cnpjestablishments[].taxId in Lookup company
cnpjs_do_grupo[].ufestablishments[].address.state in Lookup company
cnpjs_do_grupo[].tipoestablishments[].type.code in Lookup companyHEAD or BRANCH.

Partners also carry fields with no SintegraWS counterpart, such as person.type, person.taxId (masked CPF or CNPJ), person.ageGroup, admissionDate and person.id.

State registrations (ST plugin)

With expand=stateRegistry. Fields marked DETAILED require stateRegistry.view=DETAILED.

SintegraWSCNPJáNotes
cnpjtaxId
nome_empresarialcompany.legalName
nome_fantasiatradeName
situacao_cnpjstateRegistry.registrations[].hasRestrictionBoolean 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.code.
porte_empresacompany.size.code
inscricao_estadualstateRegistry.registrations[].number
ufstateRegistry.registrations[].state
tipo_inscricaostateRegistry.registrations[].type.code, .label
contribuinte_icmsstateRegistry.registrations[].type.codeThere is no boolean: the type separates, for example, a taxpayer (STATE_TAXPAYER) from a non-taxpayer (NON_TAXPAYER).
situacao_iestateRegistry.registrations[].isEnabledBoolean for an enabled registration; doesn’t separate Inativo from Baixado.
situacao_ie_descNo equivalent
data_situacao_cadastralstateRegistry.registrations[].statusDateYYYY-MM-DD, instead of dd-MM-yyyy.
informacao_ie_como_destinatarioNo equivalent
data_inicio_atividadestateRegistry.registrations[].activityStartDateDETAILED.
data_fim_atividadestateRegistry.registrations[].activityEndDateDETAILED.
cnae_principal.code, cnae_principal.textstateRegistry.registrations[].primaryActivity.code, .labelDETAILED.
logradouro, numero, complemento, bairrostateRegistry.registrations[].address.street, .number, .details, .districtDETAILED.
municipio, cepstateRegistry.registrations[].address.city, .postalCodeDETAILED.
ibge.codigo_municipiostateRegistry.registrations[].address.municipalityDETAILED.
ibge.codigo_ufNo equivalent
regime_tributacaostateRegistry.registrations[].hasExceededSublimitDETAILED. 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_ies[]The other items of stateRegistry.registrations[]Request the UFs in stateRegistry.states, or ALL.
outras_ies[].inscricao_estadual, .uf, .situacao_iestateRegistry.registrations[].number, .state, .isEnabled

Simples Nacional (SN plugin)

With expand=company.taxRegime. timeline requires company.taxRegime.view=DETAILED.

SintegraWSCNPJáNotes
cnpjtaxId
cnpj_matrizNo direct fieldIn Lookup company, the head office is the establishments[] item whose type.code is HEAD.
nome_empresarialcompany.legalName
situacao_simples_nacionalcompany.taxRegime.type.code, company.taxRegime.simplesNacionalStartDateSIMPLES_NACIONAL, SIMPLES_NACIONAL_HYBRID or SIMPLES_NACIONAL_SIMEI for optants, with SIMPLES_NACIONAL_HYBRID for those that also opt into the IBS or CBS regular regime; start of the current period, present only for these codes.
situacao_simeicompany.taxRegime.type.code, company.taxRegime.simeiStartDateSIMPLES_NACIONAL_SIMEI for optants; start of the current period, present only for SIMPLES_NACIONAL_SIMEI.
situacao_simples_nacional_anteriorcompany.taxRegime.timeline[] with type.code equal to SIMPLES_NACIONAL_PERIODEach period with startDate, endDate and details.
situacao_simei_anteriorcompany.taxRegime.timeline[] with type.code equal to SIMEI_PERIOD
eventos_futuros_simples_nacionalcompany.taxRegime.timeline[] with type.code equal to SIMPLES_NACIONAL_INCLUSION or SIMPLES_NACIONAL_EXCLUSION
eventos_futuros_simples_simeicompany.taxRegime.timeline[] with type.code equal to SIMEI_EXCLUSION
agendamentosNo equivalent

When company.taxRegime.type.code is SIMPLES_NACIONAL_HYBRID, company.taxRegime.view=DETAILED also returns company.taxRegime.regularIbsStartDate and company.taxRegime.regularCbsStartDate, 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.taxRegime.timeline[] with type.code equal to REGULAR_IBS_PERIOD, REGULAR_IBS_OPTION, REGULAR_IBS_OPTION_CANCELLATION, REGULAR_CBS_PERIOD, REGULAR_CBS_OPTION or REGULAR_CBS_OPTION_CANCELLATION.

SUFRAMA (SF plugin)

With expand=suframa.

SintegraWSCNPJáNotes
cnpjtaxId
razao_social, nome_empresarialcompany.legalName
inscricao_suframasuframa.registrations[].numberA list, instead of a single registration.
situacao_cadastralsuframa.registrations[].status.codeACTIVE, INACTIVE, BLOCKED or CANCELLED.
data_validade_cadastralNo equivalent
endereco_eletronicosuframa.registrations[].emails[].addressA list.
telefonesuframa.registrations[].phones[].numberA list, in E.164.
natureza_juridica.codigo, .descricaocompany.legalNature.code, .labelComes from the Receita Federal registration.
endereco.logradouro, .numero, .complemento, .bairrosuframa.registrations[].address.street, .number, .details, .district
endereco.municipio, .uf, .cepsuframa.registrations[].address.city, .state, .postalCode
atividade_principal, with codigo and descricaosuframa.registrations[].primaryActivity.code, .label7-digit CNAE, instead of 17.
atividades_secundarias[], with code and text, or atividade_secundaria[], with codigo and descricaosuframa.registrations[].secondaryActivities[].code, .label7-digit CNAE, instead of 17.
atividade_exercida of the primary and secondary activitiesNo equivalent
incentivos[]Mapa dos Incentivos FiscaisSUFRAMA 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_comprovanteIssue CNPJ dossier with certificates=SUFRAMA_REGISTRATIONThe 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.maxAge. 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 codeCNPJá
0 Pesquisa realizada com sucesso200, or 206 on partial success
1 not registered at the Receita Federal (RF plugin)404 ESTABLISHMENT_NOT_FOUND
1 not registered at SINTEGRA (ST plugin)200 with an empty stateRegistry.registrations
1 not registered at SUFRAMA (SF plugin)200 with an empty suframa.registrations
2 Invalid CNPJ400 REQUEST_VALIDATION_FAILED
3 Invalid token401 API_KEY_MISSING, API_KEY_INVALID or API_KEY_REVOKED
5 Credits exhausted402, 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 exist400 REQUEST_VALIDATION_FAILED, with errors[].code equal to ENUM, for an invalid expand value
7 Source instability206 with the cached resource; with no cache, the request fails and should be retried later
8 Internal error500 UNEXPECTED_ERROR

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.taxRegime, stateRegistry and suframa separately. With stateRegistry.view=DETAILED, 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 (ie with uf).
  • The sandbox CNPJ. Validate the integration with real CNPJs, using the key.
  • The temporary certificate URL (url_comprovante). Issue CNPJ dossier returns the PDF in the response.
  • SUFRAMA data_validade_cadastral.
  • sigla_natureza_juridica, tipo_logradouro, situacao_ie_desc, informacao_ie_como_destinatario, agendamentos, ibge.codigo_uf and extra.
  • The other SintegraWS APIs, such as Receita Federal CPF, SII RUT, Consulta Saldo and Validação Dados Bancários.

Step by step

  1. Create the account and an API key, as in First request.
  2. Replace execute-api.php with GET https://api.cnpja.com/v2/establishments/ followed by the CNPJ without punctuation.
  3. Remove token from the URL and send the key in the Authorization header, with no prefix.
  4. Replace each plugin with the matching expand value, and merge into one request the plugins you called in sequence for the same CNPJ.
  5. Set maxAge and each resource’s own limit according to how current the data must be.
  6. Rewrite the response parsing with the tables above, using code instead of text and converting dates, CEP, phones and share capital.
  7. Handle errors by HTTP status and code, accept 206 as success, and retry 429, 500 and 504 with a delay.
  8. Review the flows that looked up by state registration number, which have no equivalent.
  9. Validate the integration with the key, including the expand resources, and follow usage in Usage.
  10. 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 RF plugin, the request parameters, the registration fields and the response codes.
  • API SINTEGRA: the ST plugin and the state registration fields.
  • API Simples Nacional: the SN plugin and the Simples Nacional and SIMEI fields.
  • API SUFRAMA: the SF plugin 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).

Informational content that may change without notice. It is not tax, accounting or legal advice, and CNPJá's terms and policies prevail over this page.