Dívidas
Dívidas federais por CPF
Retorna dívidas na Dívida Ativa da União, FGTS e Previdenciária vinculadas ao CPF. Inscrições com o mesmo número são agrupadas como histórico.
GET
/
dividas
/
cpf
/
{cpf}
Dívidas federais por CPF
curl --request GET \
--url https://221b-api.sherlocker.com.br/api/v1/dividas/cpf/{cpf} \
--header 'Authorization: Bearer <token>'import requests
url = "https://221b-api.sherlocker.com.br/api/v1/dividas/cpf/{cpf}"
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/cpf/{cpf}', 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/cpf/{cpf}",
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/cpf/{cpf}"
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/cpf/{cpf}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://221b-api.sherlocker.com.br/api/v1/dividas/cpf/{cpf}")
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": "12345678901",
"nome": "Fulano De Tal",
"total": 2,
"valor_total": 21230.5,
"ajuizado": true,
"dividas": [
{
"numero_inscricao": "80000000000001",
"fonte": "ativa_uniao",
"receita": "IRPF",
"ajuizado": true,
"data_inscricao": "2019-03-15",
"valor_atual": 12500,
"uf": "SP",
"unidade_responsavel": "DRF CAMPINAS",
"historico": [
{
"situacao": "Ativa",
"valor": 12500,
"data_inscricao": "2019-03-15"
}
]
},
{
"numero_inscricao": "80000000000002",
"fonte": "fgts",
"receita": "FGTS",
"ajuizado": false,
"data_inscricao": "2020-06-01",
"valor_atual": 8730.5,
"uf": "SP",
"unidade_responsavel": "SRTE/SP",
"entidade_responsavel": "CEF",
"historico": [
{
"situacao": "Ativa",
"valor": 8730.5,
"data_inscricao": "2020-06-01"
}
]
}
]
}{
"success": true,
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Example:
"12345678901"
⌘I
Dívidas federais por CPF
curl --request GET \
--url https://221b-api.sherlocker.com.br/api/v1/dividas/cpf/{cpf} \
--header 'Authorization: Bearer <token>'import requests
url = "https://221b-api.sherlocker.com.br/api/v1/dividas/cpf/{cpf}"
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/cpf/{cpf}', 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/cpf/{cpf}",
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/cpf/{cpf}"
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/cpf/{cpf}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://221b-api.sherlocker.com.br/api/v1/dividas/cpf/{cpf}")
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": "12345678901",
"nome": "Fulano De Tal",
"total": 2,
"valor_total": 21230.5,
"ajuizado": true,
"dividas": [
{
"numero_inscricao": "80000000000001",
"fonte": "ativa_uniao",
"receita": "IRPF",
"ajuizado": true,
"data_inscricao": "2019-03-15",
"valor_atual": 12500,
"uf": "SP",
"unidade_responsavel": "DRF CAMPINAS",
"historico": [
{
"situacao": "Ativa",
"valor": 12500,
"data_inscricao": "2019-03-15"
}
]
},
{
"numero_inscricao": "80000000000002",
"fonte": "fgts",
"receita": "FGTS",
"ajuizado": false,
"data_inscricao": "2020-06-01",
"valor_atual": 8730.5,
"uf": "SP",
"unidade_responsavel": "SRTE/SP",
"entidade_responsavel": "CEF",
"historico": [
{
"situacao": "Ativa",
"valor": 8730.5,
"data_inscricao": "2020-06-01"
}
]
}
]
}{
"success": true,
"error": "<string>"
}