Skip to content
Partners and QSA in the API
API · Features

Partners and QSA in the API

Get each company's QSA and each partner's companies via the API, search people by name, CPF or CNPJ and follow ownership chains up to the controlling parties.

Tip: Concepts on this page: Partners and administrators board, Person types, Masked CPF, Current participations and Ownership chains.

The API returns each company’s current QSA and treats each member as a person, with its own id and the list of companies it participates in. This makes it possible to navigate in both directions: from a company to its partners, and from a person to their companies. The board is also returned by Lookup CNPJ, available through public access; the people and company operations require an API key.

Request

The board of partners and people appear in five operations:

OperationInputReturnsFreshness
Lookup CNPJCNPJcompany.partners, along with the establishment’s registration dataLive query or cached data, according to maxAge
Lookup companyCNPJ rootpartners, with the company data and a summary of each establishmentCached data only
Search CNPJFilterscompany.partners in every recordCached data only
Lookup personPerson idThe person and all current participationsCached data only
Search peopleFiltersPages of people, each with their current participationsCached data only

Lookup CNPJ, described in CNPJ lookup, is the only one of these operations that makes live queries and accepts public access. The others require an API key.

The examples on this page use a fictitious company and partner: EXEMPLO TECNOLOGIA LTDA, of CNPJ EXEMPLO0000154, and FULANA EXEMPLO.

Lookup company

Lookup company takes the CNPJ root in the path, in id: the first 8 characters, with no punctuation and in uppercase. The response carries the full board in partners.

GET /v2/companies/EXEMPLO0 HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY

The full CNPJ and an 8-character ID with lowercase letters or punctuation are rejected with 400 REQUEST_VALIDATION_FAILED, with no charge.

Lookup person

Lookup person takes the person’s id in the path, a UUID obtained from person.id, legalRepresentative.person.id or Search people. The response carries the person with all current participations, with no paging.

GET /v2/people/0f8e7d6c-5b4a-4c3d-9e2f-1a0b9c8d7e6f HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY

Search people

Search people finds people by name, CPF or CNPJ when the id is not known. Each record has the same content as Lookup person, participations included.

ParameterSelects
searchPeople whose name or CPF/CNPJ contains the term, in free text
type.code.inPerson types, comma-separated, such as INDIVIDUAL,ESTABLISHMENT
legalName.in and legalName.ninFull names to include or exclude, comma-separated
taxId.inCPFs or CNPJs, comma-separated
ageGroup.inAge groups, such as 21-30,31-40
domicileCountry.code.in and domicileCountry.code.ninAlpha-2 codes of the countries of domicile to include or exclude, in uppercase, such as AR,CL
participations.gte and participations.lteNumber of current participations, as a minimum or maximum
sort and orderField used to sort records, relevance (default), legalName or participations, and the direction, ASC or DESC, in uppercase
limit and cursorRecords per page, from 1 to 1000, default 10, and the cursor of the next page, sent with no other parameters
GET /v2/people?search=FULANA%20EXEMPLO&type.code.in=INDIVIDUAL HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY
  • A full CPF in search or taxId.in is compared by the visible digits of the masked CPF only and therefore also matches other people with the same digits. To narrow the result, send the CPF and the name in the same search, replacing FULL_CPF with the 11 digits, with no punctuation:
GET /v2/people?search=FULL_CPF%20FULANA%20EXEMPLO HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY
  • UNKNOWN people do not appear in the search, so type.code.in=UNKNOWN returns no records. They are still available in Lookup person.
  • When order is omitted, relevance and participations start from the highest value, and legalName from the lowest. legalName is compared by character code, without ignoring case or accents: uppercase letters come before lowercase ones, and accented letters come after both. With any sort, ties follow ascending legalName, then ascending id.
  • With the default sort=relevance, records come in ascending order of legalName when there is no search or it has a single word. With more than one word, exact matches come first, then records containing the exact phrase, then the rest, each group in that same order.
  • Operators, text matching and paging follow the same rules as CNPJ search. The page format, with records, total, limit and nextCursor, is described in Response format.
  • A search with no results returns 200 with empty records, not 404.

Response fields

Excerpt of Lookup company, trimmed to the board of partners:

{
  "updatedAt": "2026-01-27T03:00:00.000Z",
  "id": "EXEMPLO0",
  "legalName": "EXEMPLO TECNOLOGIA LTDA",
  "partners": [
    {
      "role": { "code": "49", "label": "Sócio-Administrador" },
      "admissionDate": "2026-01-01",
      "person": {
        "id": "0f8e7d6c-5b4a-4c3d-9e2f-1a0b9c8d7e6f",
        "type": { "code": "INDIVIDUAL", "label": "Pessoa Física" },
        "legalName": "FULANA EXEMPLO",
        "taxId": "***456789**",
        "domicileCountry": { "code": "BR", "label": "Brasil" },
        "ageGroup": "31-40"
      }
    }
  ]
}

Each item of partners, and of participations, carries:

FieldContent
rolePartner role, with a 2-character code and a label
admissionDateDate the partner joined the company, in YYYY-MM-DD format, or null
legalRepresentativeLegal representative, with person and role. Present only when the partner is represented
personThe partner person, in partners
companyCompany summary, in participations

Excerpt of Lookup person:

{
  "updatedAt": "2026-01-27T03:00:00.000Z",
  "id": "0f8e7d6c-5b4a-4c3d-9e2f-1a0b9c8d7e6f",
  "type": { "code": "INDIVIDUAL", "label": "Pessoa Física" },
  "legalName": "FULANA EXEMPLO",
  "taxId": "***456789**",
  "domicileCountry": { "code": "BR", "label": "Brasil" },
  "ageGroup": "31-40",
  "participations": [
    {
      "role": { "code": "49", "label": "Sócio-Administrador" },
      "admissionDate": "2026-01-01",
      "company": {
        "updatedAt": "2026-01-27T03:00:00.000Z",
        "id": "EXEMPLO0",
        "legalName": "EXEMPLO TECNOLOGIA LTDA",
        "shareCapital": 99999.99,
        "legalNature": { "code": "2062", "label": "Sociedade Empresária Limitada" },
        "size": { "code": "SMALL", "label": "Empresa de Pequeno Porte" }
      }
    }
  ]
}

Person fields, in person, in legalRepresentative.person and at the root of Lookup person and Search people:

FieldContent
idUnique person identifier, a stable UUID, the same across operations, which can be stored
typePerson type, with code and label
legalNamePerson’s name, as registered with the official source
taxIdCNPJ, masked CPF or null, depending on the type
domicileCountryCountry of domicile, with the alpha-2 code in code and the name in label
ageGroupAge group. Present only for INDIVIDUAL people
updatedAtLast update from the Receita Federal. Only in Lookup person and Search people
participationsCurrent participations. Only in Lookup person and Search people

The content of taxId and ageGroup depends on type.code:

type.codetaxIdageGroup
INDIVIDUALMasked CPF, as in ***456789**Age group
ESTABLISHMENTFull CNPJ of the establishment registered as the partnerNot applicable
FOREIGNERnull, with the country abroad in domicileCountryNot applicable
UNKNOWNnullNot applicable
  • participations[].company carries the CNPJ root in id, the legal name, the share capital, the legal nature, the company size, updatedAt and, when the legal nature belongs to the public administration, federativeEntity.
  • A company with no registered partners returns an empty partners, and a person with no current participations returns an empty participations.

Ownership chains

When a partner is another company (ESTABLISHMENT), the ownership chain can be followed in both directions with chained calls, up to the controlling parties or down to the controlled companies. The concept, with where a chain ends and its cycles, is in Ownership chains.

Controlling parties of a company

  1. Look up the company with Lookup company.
  2. For each ESTABLISHMENT partner, take the first 8 characters of person.taxId and look up that company.
  3. Repeat until only INDIVIDUAL, FOREIGNER or UNKNOWN partners remain, which end the chain.

Holdings of a company

  1. In Search people, send the CNPJ in taxId.in. If you do not know which of the company’s CNPJs is registered as the partner, send all of the establishments[].taxId values returned by Lookup company.
  2. The ESTABLISHMENT person returned lists in participations the companies where that CNPJ is a partner.
  3. Follow participations[].company.id with Lookup company and repeat.

If the company already appeared as a partner on another board, its person.id leads straight to Lookup person.

  • Keep track of the roots already visited: cross participations can form cycles, and each step consumes queries.
  • Both directions show only the current board and participations, and participations can lag behind partners, as explained in Current participations.

Codes and values

  • role.code: 2-character code from the Receita Federal table of roles, also used in legalRepresentative.role. The most common codes, such as 49 (Managing Partner) and 22 (Partner), are in Qualifications and legal representative.
  • type.code: INDIVIDUAL, ESTABLISHMENT, FOREIGNER or UNKNOWN, described in Person types.
  • ageGroup: 0-12, 13-20, 21-30, 31-40, 41-50, 51-60, 61-70, 71-80 or 81+, in years.
  • domicileCountry.code: alpha-2 country code, such as BR.
  • Base your logic on code. The label is for display only and changes with the language, as explained in Response format. Person names and legal names are returned as registered, regardless of the response language.

Sources and updates

The sources of each person type are in Sources and freshness. In the API:

  • Lookup CNPJ makes a live query of the Receita Federal CNPJ registry when the cached data is older than maxAge, which defaults to 45d, or, in requests with an API key, does not include the CNPJ yet. The general rules are in Max age and partial success.
  • Lookup company, Lookup person and the searches deliver cached data only. To refresh a company’s board, or add the company to cached data, look up one of its CNPJs with Lookup CNPJ: the live query also updates partners, and people’s participations can take until the next open data release to reflect the change.
  • A live query can add UNKNOWN people to the board, known only by name.

Certificate

The RFB_PARTNERS certificate, issued by Issue CNPJ dossier, carries as a PDF the board of partners and administrators as it stood in the Receita Federal CNPJ registry at the live query that produced it. Whether the PDF is the source’s original or a reproduction generated by CNPJá, and what a certificate is not, is in CNPJ card and other certificates.

GET /v2/establishments/EXEMPLO0000154/dossier?certificates=RFB_PARTNERS HTTP/1.1
Host: api.cnpja.com
Authorization: YOUR_API_KEY
  • RFB_PARTNERS comes from the same live query of the CNPJ registry that produces the RFB_REGISTRATION registration certificate, and both can be requested together, as in certificates=RFB_REGISTRATION,RFB_PARTNERS.
  • The certificate is updated only by live queries, not by the open data. It can therefore require a live query even when Lookup CNPJ would answer from cached data.
  • A company with no partners in the Receita Federal registry gets the certificate with a notice in place of the board, as explained in Omitted certificates.

The other certificates and the dossier rules are in Certificates.

Billing

Lookup company, Lookup person and Search people consume cached queries, and partners add no usage to Lookup CNPJ or Search CNPJ. The usage of each operation is in the Metering Rules, that of 404 responses under What is charged even without a useful result, and the certificate under Issue certificates.

Frequent errors

StatusCodeCauseAction
400REQUEST_VALIDATION_FAILEDIn Lookup company, an id that is not 8 characters long, or that has lowercase letters or punctuation, such as the full CNPJ; in Lookup person, an id that is not a UUID; in Search people, an unknown filter, a value in the wrong format, an invalid sort or order value or cursor combined with another parameterFix what errors points to
400PAGE_CURSOR_INVALIDIn Search people, an expired or unknown cursorRun the search again from the first page
401API_KEY_MISSINGRequest without a key to Lookup company, Lookup person or Search people, or a public request to Lookup CNPJ with parametersSend the API key, as explained in Public access
404COMPANY_NOT_FOUNDThe root is not in cached dataLook up one of the company’s CNPJs with Lookup CNPJ, which adds it, and try again
404PERSON_NOT_FOUNDNo person has the given idGet the id from partners or from Search people
404ESTABLISHMENT_NOT_FOUNDIn Lookup CNPJ, the CNPJ is not in the Receita Federal registry or, without a key, is not in cached data yetCheck the CNPJ before repeating; without a key, send one. With a key, the 404 is charged

The other errors are in Limits and errors.

Use cases

  • Customer and supplier onboarding: Lookup CNPJ already includes company.partners. Use the partners and administrators to support verification before approving the registration, and keep the RFB_PARTNERS certificate when you need to record the board as it stood in the Receita Federal registry.
  • A person’s holdings: search by name and CPF with Search people and read participations.
  • Corporate groups: follow ESTABLISHMENT partners up to the controlling companies, and use taxId.in to find the companies a company holds stakes in.
  • Related parties: compare the person.id of the partners of two companies. The same id means the same person.
  • Tracking the board: look up the CNPJ periodically, with a suitable maxAge, and compare company.partners with your previous copy to detect partners joining and leaving. You are the controller of this data and need your own legal basis and retention period (LGPD).

In the app

On the platform, the board appears in the Partners and administrators section of the CNPJ record, and people in the Partners app, which searches people and opens each one’s record with their participations. See Search partners by name, CPF or CNPJ and Partner record.

Notes

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.