Obter informações de uma entidade jurídica por CNPJ
curl --request GET \
--url https://services.pref.rio/rmi/v1/legal-entity/{cnpj} \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/rmi/v1/legal-entity/{cnpj}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/rmi/v1/legal-entity/{cnpj}', 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://services.pref.rio/rmi/v1/legal-entity/{cnpj}",
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://services.pref.rio/rmi/v1/legal-entity/{cnpj}"
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://services.pref.rio/rmi/v1/legal-entity/{cnpj}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/rmi/v1/legal-entity/{cnpj}")
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": "<unknown>",
"capital_social": 123,
"cnae_fiscal": "<string>",
"cnae_secundarias": [
"<string>"
],
"cnpj": "<string>",
"contador": {
"pf": {
"classificacao_crc": "<string>",
"id": "<string>",
"sequencial_crc": "<string>",
"tipo_crc": "<string>"
},
"pj": {
"classificacao_crc": "<string>",
"id": "<string>",
"sequencial_crc": "<string>",
"tipo_crc": "<string>"
}
},
"contato": {
"email": "<string>",
"telefone": [
{
"ddd": "<string>",
"telefone": "<string>"
}
]
},
"endereco": {
"bairro": "<string>",
"cep": "<string>",
"complemento": "<string>",
"id_municipio": "<string>",
"id_pais": "<string>",
"logradouro": "<string>",
"municipio_exterior_nome": "<string>",
"municipio_nome": "<string>",
"numero": "<string>",
"tipo_logradouro": "<string>",
"uf": "<string>"
},
"ente_federativo": {
"id": "<string>",
"tipo": "<string>"
},
"formas_atuacao": [
"<string>"
],
"inicio_atividade_data": "<string>",
"language": "<string>",
"matriz_filial": {
"descricao": "<string>",
"id": "<string>"
},
"natureza_juridica": {
"descricao": "<string>",
"id": "<string>"
},
"nire": "<string>",
"nome_fantasia": "<string>",
"orgao_registro": {
"descricao": "<string>",
"id": "<string>"
},
"porte": {
"descricao": "<string>",
"id": "<string>"
},
"razao_social": "<string>",
"responsavel": {
"cpf": "<string>",
"inclusao_data": "<string>",
"qualificacao_descricao": "<string>",
"qualificacao_id": "<string>"
},
"situacao_cadastral": {
"data": "<string>",
"descricao": "<string>",
"id": "<string>",
"motivo_descricao": "<string>",
"motivo_id": "<string>"
},
"situacao_especial": {
"data": "<string>",
"descricao": "<string>"
},
"socios": [
{
"cnpj_socio": "<string>",
"codigo_pais": "<string>",
"cpf_representante_legal": "<string>",
"cpf_socio": "<string>",
"data_situacao_especial": "<string>",
"nome_socio_estrangeiro": "<string>",
"qualificacao_representante_legal": "<string>",
"qualificacao_socio": "<string>",
"tipo": "<string>"
}
],
"socios_quantidade": 123,
"sucessoes": [
"<unknown>"
],
"tipos_unidade": [
"<string>"
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}legal-entity
Obter informações de uma entidade jurídica por CNPJ
Recupera informações detalhadas de uma entidade jurídica (pessoa jurídica) pelo CNPJ. O acesso é permitido para administradores ou se o CPF do JWT estiver como responsável ou sócio da entidade.
GET
/
legal-entity
/
{cnpj}
Obter informações de uma entidade jurídica por CNPJ
curl --request GET \
--url https://services.pref.rio/rmi/v1/legal-entity/{cnpj} \
--header 'Authorization: Bearer <token>'import requests
url = "https://services.pref.rio/rmi/v1/legal-entity/{cnpj}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://services.pref.rio/rmi/v1/legal-entity/{cnpj}', 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://services.pref.rio/rmi/v1/legal-entity/{cnpj}",
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://services.pref.rio/rmi/v1/legal-entity/{cnpj}"
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://services.pref.rio/rmi/v1/legal-entity/{cnpj}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://services.pref.rio/rmi/v1/legal-entity/{cnpj}")
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": "<unknown>",
"capital_social": 123,
"cnae_fiscal": "<string>",
"cnae_secundarias": [
"<string>"
],
"cnpj": "<string>",
"contador": {
"pf": {
"classificacao_crc": "<string>",
"id": "<string>",
"sequencial_crc": "<string>",
"tipo_crc": "<string>"
},
"pj": {
"classificacao_crc": "<string>",
"id": "<string>",
"sequencial_crc": "<string>",
"tipo_crc": "<string>"
}
},
"contato": {
"email": "<string>",
"telefone": [
{
"ddd": "<string>",
"telefone": "<string>"
}
]
},
"endereco": {
"bairro": "<string>",
"cep": "<string>",
"complemento": "<string>",
"id_municipio": "<string>",
"id_pais": "<string>",
"logradouro": "<string>",
"municipio_exterior_nome": "<string>",
"municipio_nome": "<string>",
"numero": "<string>",
"tipo_logradouro": "<string>",
"uf": "<string>"
},
"ente_federativo": {
"id": "<string>",
"tipo": "<string>"
},
"formas_atuacao": [
"<string>"
],
"inicio_atividade_data": "<string>",
"language": "<string>",
"matriz_filial": {
"descricao": "<string>",
"id": "<string>"
},
"natureza_juridica": {
"descricao": "<string>",
"id": "<string>"
},
"nire": "<string>",
"nome_fantasia": "<string>",
"orgao_registro": {
"descricao": "<string>",
"id": "<string>"
},
"porte": {
"descricao": "<string>",
"id": "<string>"
},
"razao_social": "<string>",
"responsavel": {
"cpf": "<string>",
"inclusao_data": "<string>",
"qualificacao_descricao": "<string>",
"qualificacao_id": "<string>"
},
"situacao_cadastral": {
"data": "<string>",
"descricao": "<string>",
"id": "<string>",
"motivo_descricao": "<string>",
"motivo_id": "<string>"
},
"situacao_especial": {
"data": "<string>",
"descricao": "<string>"
},
"socios": [
{
"cnpj_socio": "<string>",
"codigo_pais": "<string>",
"cpf_representante_legal": "<string>",
"cpf_socio": "<string>",
"data_situacao_especial": "<string>",
"nome_socio_estrangeiro": "<string>",
"qualificacao_representante_legal": "<string>",
"qualificacao_socio": "<string>",
"tipo": "<string>"
}
],
"socios_quantidade": 123,
"sucessoes": [
"<unknown>"
],
"tipos_unidade": [
"<string>"
]
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
CNPJ da entidade (14 dígitos)
Required string length:
14Response
Informações da entidade jurídica obtidas com sucesso
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I
