Criar análise
curl --request POST \
--url https://api.nlbs.ai/analyses \
--header 'Content-Type: application/json' \
--data '
{
"entity_id": 410752090310337400,
"source": "frontend"
}
'import requests
url = "https://api.nlbs.ai/analyses"
payload = {
"entity_id": 410752090310337400,
"source": "frontend"
}
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({entity_id: 410752090310337400, source: 'frontend'})
};
fetch('https://api.nlbs.ai/analyses', 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.nlbs.ai/analyses",
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([
'entity_id' => 410752090310337400,
'source' => 'frontend'
]),
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://api.nlbs.ai/analyses"
payload := strings.NewReader("{\n \"entity_id\": 410752090310337400,\n \"source\": \"frontend\"\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://api.nlbs.ai/analyses")
.header("Content-Type", "application/json")
.body("{\n \"entity_id\": 410752090310337400,\n \"source\": \"frontend\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlbs.ai/analyses")
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 \"entity_id\": 410752090310337400,\n \"source\": \"frontend\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"risk": {
"risk_level": "low",
"score": 50
},
"subject": {
"display_name": "<string>",
"entity_id": 123,
"entity_type": "person",
"normalized_name": "<string>",
"age_range_code": 4,
"age_years": 1,
"birth_country": "<string>",
"birth_date": "2023-12-25",
"birth_state": "<string>",
"capital_social": 123,
"citizenship": "<string>",
"city": "<string>",
"company_size": "<string>",
"country": "<string>",
"currency": "<string>",
"death_status": "<string>",
"document": "<string>",
"document_type": "<string>",
"education_level": "illiterate",
"employee_count": 1,
"establishment_type": "headquarters",
"father_name": "<string>",
"federal_entity_responsible": "<string>",
"gender": "M",
"government_branch": "executivo",
"headquarters_entity_id": 1,
"incorporation_date": "2023-12-25",
"is_headquarters": true,
"last_registry_update": "2023-11-07T05:31:56Z",
"legal_name": "<string>",
"legal_nature_code": "<string>",
"legal_nature_description": "<string>",
"main_cnae_code": "<string>",
"main_cnae_description": "<string>",
"marital_status": "single",
"mei_end_date": "2023-12-25",
"mei_option": true,
"mei_start_date": "2023-12-25",
"mother_name": "<string>",
"nationality": "<string>",
"organization_category": "private_company",
"partner_count": 1,
"place_of_birth": "<string>",
"postal_code": "<string>",
"primary_address": "<string>",
"race_color": "white",
"registration_status_reason": "<string>",
"registration_status_reason_code": 123,
"secondary_cnae_codes": [
"<string>"
],
"simples_nacional_end_date": "2023-12-25",
"simples_nacional_option": true,
"simples_nacional_start_date": "2023-12-25",
"special_status": "<string>",
"special_status_date": "2023-12-25",
"state": "<string>",
"status": "<string>",
"status_date": "2023-12-25",
"title": "<string>",
"ubo_count": 1,
"unit_status": "ativo",
"unit_status_since": "2023-12-25",
"unit_type": "orgao"
},
"versions": {
"engine_fingerprint": "<string>",
"input_fingerprint": "<string>",
"rules_version": "<string>",
"verdict_fingerprint": "<string>",
"snapshot_hash": "<string>"
}
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}Análises
Criar análise
Roda a análise determinística para uma entidade subject de forma síncrona e retorna o veredito. Informe exatamente um de document (CPF/CNPJ completo) ou entity_id.
POST
/
analyses
Criar análise
curl --request POST \
--url https://api.nlbs.ai/analyses \
--header 'Content-Type: application/json' \
--data '
{
"entity_id": 410752090310337400,
"source": "frontend"
}
'import requests
url = "https://api.nlbs.ai/analyses"
payload = {
"entity_id": 410752090310337400,
"source": "frontend"
}
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({entity_id: 410752090310337400, source: 'frontend'})
};
fetch('https://api.nlbs.ai/analyses', 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.nlbs.ai/analyses",
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([
'entity_id' => 410752090310337400,
'source' => 'frontend'
]),
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://api.nlbs.ai/analyses"
payload := strings.NewReader("{\n \"entity_id\": 410752090310337400,\n \"source\": \"frontend\"\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://api.nlbs.ai/analyses")
.header("Content-Type", "application/json")
.body("{\n \"entity_id\": 410752090310337400,\n \"source\": \"frontend\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlbs.ai/analyses")
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 \"entity_id\": 410752090310337400,\n \"source\": \"frontend\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"risk": {
"risk_level": "low",
"score": 50
},
"subject": {
"display_name": "<string>",
"entity_id": 123,
"entity_type": "person",
"normalized_name": "<string>",
"age_range_code": 4,
"age_years": 1,
"birth_country": "<string>",
"birth_date": "2023-12-25",
"birth_state": "<string>",
"capital_social": 123,
"citizenship": "<string>",
"city": "<string>",
"company_size": "<string>",
"country": "<string>",
"currency": "<string>",
"death_status": "<string>",
"document": "<string>",
"document_type": "<string>",
"education_level": "illiterate",
"employee_count": 1,
"establishment_type": "headquarters",
"father_name": "<string>",
"federal_entity_responsible": "<string>",
"gender": "M",
"government_branch": "executivo",
"headquarters_entity_id": 1,
"incorporation_date": "2023-12-25",
"is_headquarters": true,
"last_registry_update": "2023-11-07T05:31:56Z",
"legal_name": "<string>",
"legal_nature_code": "<string>",
"legal_nature_description": "<string>",
"main_cnae_code": "<string>",
"main_cnae_description": "<string>",
"marital_status": "single",
"mei_end_date": "2023-12-25",
"mei_option": true,
"mei_start_date": "2023-12-25",
"mother_name": "<string>",
"nationality": "<string>",
"organization_category": "private_company",
"partner_count": 1,
"place_of_birth": "<string>",
"postal_code": "<string>",
"primary_address": "<string>",
"race_color": "white",
"registration_status_reason": "<string>",
"registration_status_reason_code": 123,
"secondary_cnae_codes": [
"<string>"
],
"simples_nacional_end_date": "2023-12-25",
"simples_nacional_option": true,
"simples_nacional_start_date": "2023-12-25",
"special_status": "<string>",
"special_status_date": "2023-12-25",
"state": "<string>",
"status": "<string>",
"status_date": "2023-12-25",
"title": "<string>",
"ubo_count": 1,
"unit_status": "ativo",
"unit_status_since": "2023-12-25",
"unit_type": "orgao"
},
"versions": {
"engine_fingerprint": "<string>",
"input_fingerprint": "<string>",
"rules_version": "<string>",
"verdict_fingerprint": "<string>",
"snapshot_hash": "<string>"
}
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}Body
application/json

