curl --request POST \
--url https://api.nlbs.ai/workflow-endpoints/{entrypoint_key} \
--header 'Content-Type: application/json' \
--data '
{
"document": "<string>",
"metadata": {}
}
'import requests
url = "https://api.nlbs.ai/workflow-endpoints/{entrypoint_key}"
payload = {
"document": "<string>",
"metadata": {}
}
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({document: '<string>', metadata: {}})
};
fetch('https://api.nlbs.ai/workflow-endpoints/{entrypoint_key}', 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/workflow-endpoints/{entrypoint_key}",
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([
'document' => '<string>',
'metadata' => [
]
]),
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/workflow-endpoints/{entrypoint_key}"
payload := strings.NewReader("{\n \"document\": \"<string>\",\n \"metadata\": {}\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/workflow-endpoints/{entrypoint_key}")
.header("Content-Type", "application/json")
.body("{\n \"document\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlbs.ai/workflow-endpoints/{entrypoint_key}")
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 \"document\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"execution_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"case_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deduplicated": false
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"node_key": "<string>"
}
]
}{
"detail": "Resource not found."
}Invocar um workflow pelo seu entrypoint HTTP
Inicia um workflow para um CPF ou CNPJ. A resposta é sempre imediata e nunca carrega um resultado: retorna o identificador da execução, consultado via GET /v1/workflow-executions/ com a mesma chave de API. A chave precisa ser a vinculada a este entrypoint; qualquer outra chave responde 404, exista ou não o entrypoint. Enquanto um caso de revisão do mesmo subject e entrypoint estiver aberto, uma chamada repetida retorna a MESMA execução em vez de iniciar uma segunda.
curl --request POST \
--url https://api.nlbs.ai/workflow-endpoints/{entrypoint_key} \
--header 'Content-Type: application/json' \
--data '
{
"document": "<string>",
"metadata": {}
}
'import requests
url = "https://api.nlbs.ai/workflow-endpoints/{entrypoint_key}"
payload = {
"document": "<string>",
"metadata": {}
}
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({document: '<string>', metadata: {}})
};
fetch('https://api.nlbs.ai/workflow-endpoints/{entrypoint_key}', 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/workflow-endpoints/{entrypoint_key}",
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([
'document' => '<string>',
'metadata' => [
]
]),
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/workflow-endpoints/{entrypoint_key}"
payload := strings.NewReader("{\n \"document\": \"<string>\",\n \"metadata\": {}\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/workflow-endpoints/{entrypoint_key}")
.header("Content-Type", "application/json")
.body("{\n \"document\": \"<string>\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nlbs.ai/workflow-endpoints/{entrypoint_key}")
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 \"document\": \"<string>\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"execution_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"case_uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deduplicated": false
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "Resource not found."
}{
"detail": "<string>",
"issues": [
{
"code": "<string>",
"message": "<string>",
"node_key": "<string>"
}
]
}{
"detail": "Resource not found."
}Path Parameters
Segmento de URL do entrypoint.
Body
The payload an external client POSTs to /v1/workflow-endpoints/{entrypoint_key}.
Exactly two fields, per the epic: the subject's document and free-form typed metadata. The model forbids unknown fields like every other model here, so a client that invents a third top-level key hears about it instead of having it silently dropped.
CPF ou CNPJ do subject. Aceito formatado ou não; é normalizado e seus dígitos verificadores são checados antes de qualquer outra coisa.
1Objeto livre carregado junto com o subject. Campos declarados no metadata_schema do entrypoint são validados por tipo e ficam legíveis pelas condições do workflow; campos não declarados são aceitos e armazenados, mas nenhuma condição os lê. Ver WorkflowEntrypointSummary.metadata_schema para o formato da declaração.
Response
Successful Response
Identificador público da execução, para consulta.
Estado no momento da resposta. queued significa aceito e não iniciado, seja porque o tenant está no teto de concorrência, seja porque o orquestrador ainda não pegou a execução.
queued, running, waiting_human, succeeded, failed, cancelled Identificador público do caso de revisão humana que esta execução abriu, ou nulo quando a execução ainda não chegou a um nó de fila. Numa chamada deduplicada, é o caso ABERTO que ocupava a chave de deduplicação, o mesmo que execution_uuid aponta.
True quando esta chamada NÃO criou uma execução porque já existe uma aberta para o mesmo tenant, subject e entrypoint. O identificador retornado é o dessa execução existente.

