Certidões
Emitir certidão de CNPJ
Inicia a consulta em tempo real dos dados oficiais de um CNPJ. A emissão é assíncrona; use o identificador retornado para acompanhar o resultado.
POST
/
certidoes
/
cnpj
Emitir certidão de CNPJ
curl --request POST \
--url 'https://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token=' \
--header 'Content-Type: application/json' \
--data '
{
"cnpj": "11222333000181"
}
'import requests
url = "https://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token="
payload = { "cnpj": "11222333000181" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({cnpj: '11222333000181'})
};
fetch('https://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token=', 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://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cnpj' => '11222333000181'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token="
payload := strings.NewReader("{\n \"cnpj\": \"11222333000181\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token=")
.header("Content-Type", "application/json")
.body("{\n \"cnpj\": \"11222333000181\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"cnpj\": \"11222333000181\"\n}"
response = http.request(request)
puts response.read_body{
"certidao_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tipo": "cnpj",
"status": "queued",
"stage": "waiting_worker",
"result": {
"nome_base": "<string>",
"nome_oficial": "<string>",
"divergente": true,
"fonte_nome": "tst_bndt",
"capturado_em": "2023-11-07T05:31:56Z",
"titular": {
"nome": "<string>"
},
"classificacao": "negativa"
},
"evidence": {
"status": "available",
"type": "official_certificate",
"mime_type": "application/pdf",
"pdf_url": "/api/v1/certidoes/0d7c8a8a-74e1-42f3-a74b-ecf60568ff51/pdf",
"sha256": "<string>"
},
"error": {
"code": "FONTE_INDISPONIVEL",
"category": "validation",
"message": "<string>",
"retryable": true,
"retry_after_seconds": 123
},
"links": {
"self": "<string>",
"pdf": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}Authorizations
Body
application/json
Pattern:
^[0-9]{14}$Example:
"11222333000181"
Response
Emissão enfileirada
Available options:
cnpj, cndt, nome Available options:
queued, processing, completed, failed Available options:
waiting_worker, accessing_source, completed, failed Dados estruturados da emissão. Os campos variam conforme o tipo da certidão.
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
Emitir certidão de CNPJ
curl --request POST \
--url 'https://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token=' \
--header 'Content-Type: application/json' \
--data '
{
"cnpj": "11222333000181"
}
'import requests
url = "https://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token="
payload = { "cnpj": "11222333000181" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({cnpj: '11222333000181'})
};
fetch('https://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token=', 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://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'cnpj' => '11222333000181'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token="
payload := strings.NewReader("{\n \"cnpj\": \"11222333000181\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token=")
.header("Content-Type", "application/json")
.body("{\n \"cnpj\": \"11222333000181\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://221b-api.sherlocker.com.br/api/v1/certidoes/cnpj?token=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"cnpj\": \"11222333000181\"\n}"
response = http.request(request)
puts response.read_body{
"certidao_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tipo": "cnpj",
"status": "queued",
"stage": "waiting_worker",
"result": {
"nome_base": "<string>",
"nome_oficial": "<string>",
"divergente": true,
"fonte_nome": "tst_bndt",
"capturado_em": "2023-11-07T05:31:56Z",
"titular": {
"nome": "<string>"
},
"classificacao": "negativa"
},
"evidence": {
"status": "available",
"type": "official_certificate",
"mime_type": "application/pdf",
"pdf_url": "/api/v1/certidoes/0d7c8a8a-74e1-42f3-a74b-ecf60568ff51/pdf",
"sha256": "<string>"
},
"error": {
"code": "FONTE_INDISPONIVEL",
"category": "validation",
"message": "<string>",
"retryable": true,
"retry_after_seconds": 123
},
"links": {
"self": "<string>",
"pdf": "<string>"
},
"created_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z"
}