Dívidas
Dívidas federais por CNPJ
Retorna dívidas na Dívida Ativa da União, FGTS e Previdenciária vinculadas ao CNPJ.
GET
/
dividas
/
cnpj
/
{cnpj}
Dívidas federais por CNPJ
curl --request GET \
--url https://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{cnpj} \
--header 'Authorization: Bearer <token>'import requests
url = "https://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{cnpj}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{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://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{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://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{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://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{cnpj}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{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{
"documento": "<string>",
"nome": "<string>",
"total": 123,
"valor_total": 123,
"ajuizado": true,
"dividas": [
{
"numero_inscricao": "<string>",
"receita": "<string>",
"ajuizado": true,
"data_inscricao": "2023-12-25",
"valor_atual": 123,
"uf": "<string>",
"unidade_responsavel": "<string>",
"entidade_responsavel": "<string>",
"historico": [
{
"situacao": "<string>",
"valor": 123,
"data_inscricao": "2023-12-25"
}
]
}
]
}{
"success": true,
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Example:
"12345678000199"
⌘I
Dívidas federais por CNPJ
curl --request GET \
--url https://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{cnpj} \
--header 'Authorization: Bearer <token>'import requests
url = "https://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{cnpj}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{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://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{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://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{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://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{cnpj}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://221b-api.sherlocker.com.br/api/v1/dividas/cnpj/{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{
"documento": "<string>",
"nome": "<string>",
"total": 123,
"valor_total": 123,
"ajuizado": true,
"dividas": [
{
"numero_inscricao": "<string>",
"receita": "<string>",
"ajuizado": true,
"data_inscricao": "2023-12-25",
"valor_atual": 123,
"uf": "<string>",
"unidade_responsavel": "<string>",
"entidade_responsavel": "<string>",
"historico": [
{
"situacao": "<string>",
"valor": 123,
"data_inscricao": "2023-12-25"
}
]
}
]
}{
"success": true,
"error": "<string>"
}