Consultar resultado da operação
Retorna o resultado hierárquico de uma operação completed: a árvore cedente → sacados → títulos com issues por nó, mais summary, coverage e degraded_rules. Antes de completed, retorna 409. filter=issues (padrão) poda nós aprovados; filter=all devolve a árvore completa.
curl --request GET \
--url https://221b-api.sherlocker.com.br/api/v1/operations/{id}/result \
--header 'Authorization: Bearer <token>'import requests
url = "https://221b-api.sherlocker.com.br/api/v1/operations/{id}/result"
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/operations/{id}/result', 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/operations/{id}/result",
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/operations/{id}/result"
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/operations/{id}/result")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://221b-api.sherlocker.com.br/api/v1/operations/{id}/result")
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{
"operation_id": "b2c3d4e5-0000-0000-0000-000000000001",
"cedente": {
"id": "c0a80001-0000-0000-0000-000000000001",
"cnpj": "12345678000195",
"razao_social": "CEDENTE LTDA",
"status": "blocked",
"issues": [
{
"rule_id": "CEDENTE_PROTESTOS",
"rule_name": "Protestos",
"category": "blocking",
"status": "blocked",
"message": "Cedente: Protestos encontrados",
"detail": {
"field": "protestos",
"actual": "3",
"expected": "0"
},
"data_sources": [
{
"name": "cenprot",
"fetched_at": "2026-07-06T09:00:00.000Z",
"age_days": 3
}
]
}
],
"sacados": [
{
"id": "c0a80001-0000-0000-0000-000000000002",
"cnpj_cpf": "98765432000188",
"razao_social": "SACADO SA",
"tipo": "PJ",
"status": "alerted",
"issues": [],
"titulos": [
{
"id": "c0a80001-0000-0000-0000-000000000003",
"numero": "DOC-001",
"valor": 1234.56,
"data_vencimento": "2026-08-01",
"nfe_chave": "35230612345678000195550010000000011000000011",
"status": "alerted",
"issues": [
{
"rule_id": "TITULO_NFE_DIVERGENCIA",
"rule_name": "Divergência com NFe",
"category": "alert",
"status": "alerted",
"message": "Título: valor diverge da NFe",
"detail": {
"field": "valor",
"actual": "1234.56",
"expected": "1230.00"
},
"data_sources": [
{
"name": "nfe",
"fetched_at": "2026-07-09T12:01:00.000Z",
"age_days": 0
}
]
}
]
}
]
}
]
},
"summary": {
"total_titulos": 12,
"approved": 9,
"blocked": 2,
"alerted": 1,
"total_value": 100000,
"approved_value": 80000,
"blocked_value": 15000,
"alerted_value": 5000,
"sacados": {
"total": 5,
"with_issues": 2
},
"cedente": {
"status": "blocked"
}
},
"engine_id": "0b3c6c7e-9d2a-4f1b-8e5d-2a1b3c4d5e6f",
"engine_name": "Motor Borderô",
"timestamp": "2026-07-09T12:02:15.000Z",
"coverage": [
{
"provider": "rfb",
"requested": 6,
"succeeded": 5,
"failed_keys": [
"98765432000188"
]
}
],
"degraded_rules": [
{
"rule_id": "SACADO_SERASA",
"provider": "serasa",
"titulos_affected": 2
}
]
}{
"type": "https://docs.sherlocker.com.br/problems/validation_error",
"title": "Validation Error",
"status": 400,
"code": "validation_error",
"detail": "Invalid filter value. Use \"issues\" or \"all\".",
"instance": "/v1?request_id=3166fb9a-384c-44b7-ab77-90aca3146e0a"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
],
"required": 123,
"balance": 123,
"request_access_url": "<string>"
}{
"type": "https://docs.sherlocker.com.br/problems/not_found",
"title": "Not Found",
"status": 404,
"code": "not_found",
"detail": "Operation not found",
"instance": "/v1?request_id=3166fb9a-384c-44b7-ab77-90aca3146e0a"
}{
"type": "https://docs.sherlocker.com.br/problems/conflict",
"title": "Conflict",
"status": 409,
"code": "conflict",
"detail": "Operation has not completed yet. Current status: processing",
"instance": "/v1?request_id=3166fb9a-384c-44b7-ab77-90aca3146e0a"
}Authorizations
Chave de API do workspace (prefixo slhk_), enviada no header: Authorization: Bearer slhk_sua_chave_aqui
Headers
Identificador de rastreio opcional fornecido pelo cliente. Ecoado no header da resposta (nunca no body).
Path Parameters
UUID da operação (campo operation_id da resposta do POST).
Query Parameters
issues (padrão): poda títulos aprovados e sacados sem problemas. all: árvore completa. Outro valor retorna 400 (Invalid filter value. Use "issues" or "all".).
issues, all Blocos extras, separados por vírgula. Valor suportado: execution_plan (adiciona o campo execution_plan à resposta; hoje sempre []).
Response
Resultado hierárquico da operação.
Resultado hierárquico da operação: árvore cedente → sacados → títulos, com issues por nó.
UUID da operação.
Nó raiz da árvore do resultado.
Show child attributes
Show child attributes
Resumo do dataset completo. Não muda com o parâmetro filter. O verdict interno incompleto aparece como alerted, com o motivo em degraded_rules.
Show child attributes
Show child attributes
Engine de borderô usada na operação.
Nome da engine.
"Motor Borderô"
Timestamp ISO 8601 do resultado.
Cobertura por provider: requested, succeeded e failed_keys.
Show child attributes
Show child attributes
Regras não avaliadas por fonte indisponível.
Show child attributes
Show child attributes
Presente apenas com ?include=execution_plan. Hoje sempre [].
curl --request GET \
--url https://221b-api.sherlocker.com.br/api/v1/operations/{id}/result \
--header 'Authorization: Bearer <token>'import requests
url = "https://221b-api.sherlocker.com.br/api/v1/operations/{id}/result"
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/operations/{id}/result', 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/operations/{id}/result",
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/operations/{id}/result"
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/operations/{id}/result")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://221b-api.sherlocker.com.br/api/v1/operations/{id}/result")
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{
"operation_id": "b2c3d4e5-0000-0000-0000-000000000001",
"cedente": {
"id": "c0a80001-0000-0000-0000-000000000001",
"cnpj": "12345678000195",
"razao_social": "CEDENTE LTDA",
"status": "blocked",
"issues": [
{
"rule_id": "CEDENTE_PROTESTOS",
"rule_name": "Protestos",
"category": "blocking",
"status": "blocked",
"message": "Cedente: Protestos encontrados",
"detail": {
"field": "protestos",
"actual": "3",
"expected": "0"
},
"data_sources": [
{
"name": "cenprot",
"fetched_at": "2026-07-06T09:00:00.000Z",
"age_days": 3
}
]
}
],
"sacados": [
{
"id": "c0a80001-0000-0000-0000-000000000002",
"cnpj_cpf": "98765432000188",
"razao_social": "SACADO SA",
"tipo": "PJ",
"status": "alerted",
"issues": [],
"titulos": [
{
"id": "c0a80001-0000-0000-0000-000000000003",
"numero": "DOC-001",
"valor": 1234.56,
"data_vencimento": "2026-08-01",
"nfe_chave": "35230612345678000195550010000000011000000011",
"status": "alerted",
"issues": [
{
"rule_id": "TITULO_NFE_DIVERGENCIA",
"rule_name": "Divergência com NFe",
"category": "alert",
"status": "alerted",
"message": "Título: valor diverge da NFe",
"detail": {
"field": "valor",
"actual": "1234.56",
"expected": "1230.00"
},
"data_sources": [
{
"name": "nfe",
"fetched_at": "2026-07-09T12:01:00.000Z",
"age_days": 0
}
]
}
]
}
]
}
]
},
"summary": {
"total_titulos": 12,
"approved": 9,
"blocked": 2,
"alerted": 1,
"total_value": 100000,
"approved_value": 80000,
"blocked_value": 15000,
"alerted_value": 5000,
"sacados": {
"total": 5,
"with_issues": 2
},
"cedente": {
"status": "blocked"
}
},
"engine_id": "0b3c6c7e-9d2a-4f1b-8e5d-2a1b3c4d5e6f",
"engine_name": "Motor Borderô",
"timestamp": "2026-07-09T12:02:15.000Z",
"coverage": [
{
"provider": "rfb",
"requested": 6,
"succeeded": 5,
"failed_keys": [
"98765432000188"
]
}
],
"degraded_rules": [
{
"rule_id": "SACADO_SERASA",
"provider": "serasa",
"titulos_affected": 2
}
]
}{
"type": "https://docs.sherlocker.com.br/problems/validation_error",
"title": "Validation Error",
"status": 400,
"code": "validation_error",
"detail": "Invalid filter value. Use \"issues\" or \"all\".",
"instance": "/v1?request_id=3166fb9a-384c-44b7-ab77-90aca3146e0a"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"code": "<string>",
"detail": "<string>",
"instance": "<string>",
"errors": [
{
"field": "<string>",
"message": "<string>"
}
],
"required": 123,
"balance": 123,
"request_access_url": "<string>"
}{
"type": "https://docs.sherlocker.com.br/problems/not_found",
"title": "Not Found",
"status": 404,
"code": "not_found",
"detail": "Operation not found",
"instance": "/v1?request_id=3166fb9a-384c-44b7-ab77-90aca3146e0a"
}{
"type": "https://docs.sherlocker.com.br/problems/conflict",
"title": "Conflict",
"status": 409,
"code": "conflict",
"detail": "Operation has not completed yet. Current status: processing",
"instance": "/v1?request_id=3166fb9a-384c-44b7-ab77-90aca3146e0a"
}