curl --request GET \
--url https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"document": "<string>",
"companyDocument": "<string>",
"branchNumber": "<string>",
"branchType": "HEADQUARTERS",
"status": "ANNULLED",
"refDate": "<string>",
"tradingName": "<string>",
"statusDate": "2023-11-07T05:31:56Z",
"statusReason": "<string>",
"specialStatus": "<string>",
"specialStatusDate": "2023-11-07T05:31:56Z",
"foundingDate": "2023-11-07T05:31:56Z",
"mainActivity": "<string>",
"secondaryActivities": [
"<string>"
],
"email": "<string>",
"phoneNumber": "<string>",
"secondaryPhoneNumber": "<string>",
"fax": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"cityCode": "<string>",
"state": "<string>",
"postalCode": "<string>"
},
"foreignCity": "<string>",
"country": "AD",
"countryCode": "<string>",
"legalName": "<string>",
"legalNature": "<string>",
"size": "NOT_INFORMED",
"capital": 123,
"responsibleQualification": "<string>",
"federativeEntity": "<string>",
"shareholders": [
{
"documentType": "CNPJ",
"name": "<string>",
"document": "<string>",
"qualification": "<string>",
"joinedAt": "2023-11-07T05:31:56Z",
"country": "AD",
"countryCode": "<string>",
"ageRange": "<string>",
"legalRepresentative": {
"document": "<string>",
"name": "<string>",
"qualification": "<string>"
}
}
],
"simples": {
"optIn": true,
"optInDate": "2023-11-07T05:31:56Z",
"optOutDate": "2023-11-07T05:31:56Z"
},
"mei": {
"optIn": true,
"optInDate": "2023-11-07T05:31:56Z",
"optOutDate": "2023-11-07T05:31:56Z"
},
"sourceHashes": {
"establishment": "<string>",
"company": "<string>",
"shareholders": "<string>",
"simples": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"statusReasonDescription": "<string>",
"legalNatureDescription": "<string>"
}/realms/{realmId}/organizations/{organizationId}/companies/{document}
curl --request GET \
--url https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.registry.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/companies/{document}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"_id": "<string>",
"document": "<string>",
"companyDocument": "<string>",
"branchNumber": "<string>",
"branchType": "HEADQUARTERS",
"status": "ANNULLED",
"refDate": "<string>",
"tradingName": "<string>",
"statusDate": "2023-11-07T05:31:56Z",
"statusReason": "<string>",
"specialStatus": "<string>",
"specialStatusDate": "2023-11-07T05:31:56Z",
"foundingDate": "2023-11-07T05:31:56Z",
"mainActivity": "<string>",
"secondaryActivities": [
"<string>"
],
"email": "<string>",
"phoneNumber": "<string>",
"secondaryPhoneNumber": "<string>",
"fax": "<string>",
"address": {
"street": "<string>",
"number": "<string>",
"complement": "<string>",
"neighborhood": "<string>",
"city": "<string>",
"cityCode": "<string>",
"state": "<string>",
"postalCode": "<string>"
},
"foreignCity": "<string>",
"country": "AD",
"countryCode": "<string>",
"legalName": "<string>",
"legalNature": "<string>",
"size": "NOT_INFORMED",
"capital": 123,
"responsibleQualification": "<string>",
"federativeEntity": "<string>",
"shareholders": [
{
"documentType": "CNPJ",
"name": "<string>",
"document": "<string>",
"qualification": "<string>",
"joinedAt": "2023-11-07T05:31:56Z",
"country": "AD",
"countryCode": "<string>",
"ageRange": "<string>",
"legalRepresentative": {
"document": "<string>",
"name": "<string>",
"qualification": "<string>"
}
}
],
"simples": {
"optIn": true,
"optInDate": "2023-11-07T05:31:56Z",
"optOutDate": "2023-11-07T05:31:56Z"
},
"mei": {
"optIn": true,
"optInDate": "2023-11-07T05:31:56Z",
"optOutDate": "2023-11-07T05:31:56Z"
},
"sourceHashes": {
"establishment": "<string>",
"company": "<string>",
"shareholders": "<string>",
"simples": "<string>"
},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"statusReasonDescription": "<string>",
"legalNatureDescription": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Successful response
Collection primary key — same value as document.
Full CNPJ, 14 uppercase alphanumeric chars (digits-only until 2026-07). Collection _id.
cnpj_basico — first 8 chars; groups every establishment of one company.
cnpj_ordem — 4 chars ("0001" = headquarters).
identificador_matriz_filial — 1 matriz / 2 filial
HEADQUARTERS, BRANCH situacao_cadastral — 01 NULA / 02 ATIVA / 03 SUSPENSA / 04 INAPTA / 08 BAIXADA
ANNULLED, ACTIVE, SUSPENDED, INAPT, CLOSED Dataset month ("2026-08") that last touched this doc.
RF motivo code — description via RF_MOTIVO_DESCRIPTIONS.
CNAE fiscal principal — 7-digit code; description via the cnaes collection.
E.164 when repairable (commons normalizePhone), else omitted.
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.
Show child attributes
Show child attributes
Only for establishments domiciled abroad.
AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW natureza_juridica 4-digit code — description via RF_NATUREZA_DESCRIPTIONS.
porte — 00/empty NÃO INFORMADO / 01 ME / 03 EPP / 05 DEMAIS
NOT_INFORMED, MICRO, SMALL, OTHER capital_social in integer CENTAVOS (fleet money convention).
RF qualification code of the person responsible for the company.
ente_federativo_responsavel — public bodies only.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Per-source-file content hashes (raw CSV line) — the monthly delta gate: an unchanged row is skipped instead of rewritten (see infra/rf/importer).
Show child attributes
Show child attributes