cURL
curl --request POST \
--url https://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"holderId": 123,
"organizationId": 123,
"userPlanConsumeUniqueId": 123
}
'import requests
url = "https://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId}"
payload = {
"holderId": 123,
"organizationId": 123,
"userPlanConsumeUniqueId": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({holderId: 123, organizationId: 123, userPlanConsumeUniqueId: 123})
};
fetch('https://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId}', 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://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId}",
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([
'holderId' => 123,
'organizationId' => 123,
'userPlanConsumeUniqueId' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId}"
payload := strings.NewReader("{\n \"holderId\": 123,\n \"organizationId\": 123,\n \"userPlanConsumeUniqueId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"holderId\": 123,\n \"organizationId\": 123,\n \"userPlanConsumeUniqueId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"holderId\": 123,\n \"organizationId\": 123,\n \"userPlanConsumeUniqueId\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"reason": "",
"register": {
"summary": {
"ALL": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"ISDEFENDANT": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"RISK_PROTEST": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"EXECUTION_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"IS_ACTIVE_WITHOUT_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"PERSON_NOT_CLASSIFIED": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"ISAUTHOR": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"IS_INACTIVE_WITHOUT_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"IS_INACTIVE_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"RISK_WORKER": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"ISDEFENDANT_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"CRIMINAL_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"RISK_DEBTOR": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"PERSON_NOT_CLASSIFIED_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"RISK_EXECUTION": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"ISAUTHOR_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"IS_ACTIVE_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"WORKER_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"RISK_CRIMINAL": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"LITIGATION": {
"vltotalProcess": "<string>",
"totalProcess": 123
}
},
"userPlanConsumeProtestSummaryId": "594c6a7d-2a05-468a-a535-594c6a7d",
"bucketName": "bucket",
"statusIndex": "DONE",
"statusProtest": "INITIAL",
"filenameFull": "30072024_180018_FULL_7658.xlsx",
"lastUserPlanConsumeAnalytics": 7642,
"statusReport": "DONE",
"typePlan": "SEARCH_ANALYZER_PREMIUM_PROTEST",
"urlTempFull": "https://s3.aws.com/bucket/xxx/ANALYTICS/xxx/30072024_180018_FULL_7658.xlsx",
"userPlanConsumeUniqueId": 1082,
"createdAt": "30/07/2024 14:59:18",
"userPlanConsumeAnalyticsId": 7658,
"folder": "xxx/ANALYTICS/xxx/",
"urlTemp": "https://s3.aws.com/bucket/xxx/ANALYTICS/xxx/30072024_180018_7658.xlsx",
"importantTerms": [
""
],
"status": "DONE"
}
}{}Módulo Análise
Consultar uma análise
Api para resumir o total por classificacao de risco do CPF ou CNPJ
POST
/
v2
/
analytics
/
{userPlanConsumeAnalyticsId}
cURL
curl --request POST \
--url https://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"holderId": 123,
"organizationId": 123,
"userPlanConsumeUniqueId": 123
}
'import requests
url = "https://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId}"
payload = {
"holderId": 123,
"organizationId": 123,
"userPlanConsumeUniqueId": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({holderId: 123, organizationId: 123, userPlanConsumeUniqueId: 123})
};
fetch('https://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId}', 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://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId}",
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([
'holderId' => 123,
'organizationId' => 123,
'userPlanConsumeUniqueId' => 123
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId}"
payload := strings.NewReader("{\n \"holderId\": 123,\n \"organizationId\": 123,\n \"userPlanConsumeUniqueId\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"holderId\": 123,\n \"organizationId\": 123,\n \"userPlanConsumeUniqueId\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://search.tratum.com.br/v2/analytics/{userPlanConsumeAnalyticsId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"holderId\": 123,\n \"organizationId\": 123,\n \"userPlanConsumeUniqueId\": 123\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"reason": "",
"register": {
"summary": {
"ALL": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"ISDEFENDANT": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"RISK_PROTEST": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"EXECUTION_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"IS_ACTIVE_WITHOUT_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"PERSON_NOT_CLASSIFIED": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"ISAUTHOR": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"IS_INACTIVE_WITHOUT_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"IS_INACTIVE_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"RISK_WORKER": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"ISDEFENDANT_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"CRIMINAL_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"RISK_DEBTOR": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"PERSON_NOT_CLASSIFIED_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"RISK_EXECUTION": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"ISAUTHOR_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"IS_ACTIVE_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"WORKER_WITH_RISK": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"RISK_CRIMINAL": {
"vltotalProcess": "<string>",
"totalProcess": 123
},
"LITIGATION": {
"vltotalProcess": "<string>",
"totalProcess": 123
}
},
"userPlanConsumeProtestSummaryId": "594c6a7d-2a05-468a-a535-594c6a7d",
"bucketName": "bucket",
"statusIndex": "DONE",
"statusProtest": "INITIAL",
"filenameFull": "30072024_180018_FULL_7658.xlsx",
"lastUserPlanConsumeAnalytics": 7642,
"statusReport": "DONE",
"typePlan": "SEARCH_ANALYZER_PREMIUM_PROTEST",
"urlTempFull": "https://s3.aws.com/bucket/xxx/ANALYTICS/xxx/30072024_180018_FULL_7658.xlsx",
"userPlanConsumeUniqueId": 1082,
"createdAt": "30/07/2024 14:59:18",
"userPlanConsumeAnalyticsId": 7658,
"folder": "xxx/ANALYTICS/xxx/",
"urlTemp": "https://s3.aws.com/bucket/xxx/ANALYTICS/xxx/30072024_180018_7658.xlsx",
"importantTerms": [
""
],
"status": "DONE"
}
}{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
ID da análise
Body
application/json
Corpo da requisição
⌘I
