Lista os tipos de consulta disponíveis (filtrados pelas features do tenant).
curl --request GET \
--url https://api.example.com/api/services/app/Consultas/ListarTiposimport requests
url = "https://api.example.com/api/services/app/Consultas/ListarTipos"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/services/app/Consultas/ListarTipos', 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.example.com/api/services/app/Consultas/ListarTipos",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/services/app/Consultas/ListarTipos"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/services/app/Consultas/ListarTipos")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/services/app/Consultas/ListarTipos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"key": "<string>",
"type": 123,
"name": "<string>",
"acceptsCpf": true,
"acceptsCnpj": true
}
]Base de Consultas
Listar tipos de consulta
GET
/
api
/
services
/
app
/
Consultas
/
ListarTipos
Lista os tipos de consulta disponíveis (filtrados pelas features do tenant).
curl --request GET \
--url https://api.example.com/api/services/app/Consultas/ListarTiposimport requests
url = "https://api.example.com/api/services/app/Consultas/ListarTipos"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/services/app/Consultas/ListarTipos', 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.example.com/api/services/app/Consultas/ListarTipos",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/services/app/Consultas/ListarTipos"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/services/app/Consultas/ListarTipos")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/services/app/Consultas/ListarTipos")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"key": "<string>",
"type": 123,
"name": "<string>",
"acceptsCpf": true,
"acceptsCnpj": true
}
]Retorna o catálogo de tipos de consulta disponíveis para a sua loja, já filtrado
pelas funcionalidades que ela contratou. Use o
type (identificador numérico) de cada
item ao chamar Consultar, e os campos
acceptsCpf/acceptsCnpj para saber quais tipos se aplicam a um CPF e/ou CNPJ.
Só aparecem aqui os tipos que a sua loja contratou. Se um tipo esperado não aparece, fale com o time HubCred sobre as funcionalidades da loja.
Nem todo tipo aceita os dois documentos: o Serasa (104) é só CPF, e a Consulta Veicular (103) aceita CPF e CNPJ. É o que
acceptsCpf e acceptsCnpj informam em cada item.curl -X GET "https://gateway.hubcred.com.br/external/v1/api/services/app/Consultas/ListarTipos" \
-H "Authorization: Bearer SEU_TOKEN"