Skip to main content
GET
/realms/{realmId}/organizations/{organizationId}/companies/{document}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

realmId
string
required
organizationId
string
required
document
string
required

Response

200 - application/json

Successful response

_id
string
required

Collection primary key — same value as document.

document
string
required

Full CNPJ, 14 uppercase alphanumeric chars (digits-only until 2026-07). Collection _id.

companyDocument
string
required

cnpj_basico — first 8 chars; groups every establishment of one company.

branchNumber
string
required

cnpj_ordem — 4 chars ("0001" = headquarters).

branchType
enum<string>
required

identificador_matriz_filial — 1 matriz / 2 filial

Available options:
HEADQUARTERS,
BRANCH
status
enum<string>
required

situacao_cadastral — 01 NULA / 02 ATIVA / 03 SUSPENSA / 04 INAPTA / 08 BAIXADA

Available options:
ANNULLED,
ACTIVE,
SUSPENDED,
INAPT,
CLOSED
refDate
string
required

Dataset month ("2026-08") that last touched this doc.

tradingName
string
statusDate
string<date-time>
statusReason
string

RF motivo code — description via RF_MOTIVO_DESCRIPTIONS.

specialStatus
string
specialStatusDate
string<date-time>
foundingDate
string<date-time>
mainActivity
string

CNAE fiscal principal — 7-digit code; description via the cnaes collection.

secondaryActivities
string[]
email
string
phoneNumber
string

E.164 when repairable (commons normalizePhone), else omitted.

secondaryPhoneNumber
string
fax
string
address
object

One document per ESTABLISHMENT (full 14-char CNPJ) in the companies collection — Estabelecimentos + Empresas + Sócios + Simples grouped into a single read model (the approved grouping): company-level fields (Empresas/Sócios/Simples, keyed by the 8-char companyDocument) are denormalized onto every establishment of that company so the list filters (mainActivity, status, legalName, legalNature) hit ONE collection with ordinary indexes.

Field names follow identity's Organization/Shareholder conventions (legalName, tradingName, mainActivity, foundingDate, address.*) — never the RF portuguese names.

Everything here is RF public data — the ONLY writer is the monthly import (no write endpoints); refDate records the dataset month a doc was last touched by.

foreignCity
string

Only for establishments domiciled abroad.

country
enum<string>
Available options:
AD,
AE,
AF,
AG,
AI,
AL,
AM,
AO,
AQ,
AR,
AS,
AT,
AU,
AW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ÃO INFORMADO / 01 ME / 03 EPP / 05 DEMAIS

Available options:
NOT_INFORMED,
MICRO,
SMALL,
OTHER
capital
number

capital_social in integer CENTAVOS (fleet money convention).

responsibleQualification
string

RF qualification code of the person responsible for the company.

federativeEntity
string

ente_federativo_responsavel — public bodies only.

shareholders
object[]
simples
object
mei
object
sourceHashes
object

Per-source-file content hashes (raw CSV line) — the monthly delta gate: an unchanged row is skipped instead of rewritten (see infra/rf/importer).

createdAt
string<date-time>
updatedAt
string<date-time>
statusReasonDescription
string