Validar uma transação
curl --request POST \
--url https://tracer.sandbox.lerian.net/v1/validations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '"<string>"'import requests
url = "https://tracer.sandbox.lerian.net/v1/validations"
payload = "<string>"
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('<string>')
};
fetch('https://tracer.sandbox.lerian.net/v1/validations', 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://tracer.sandbox.lerian.net/v1/validations",
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('<string>'),
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://tracer.sandbox.lerian.net/v1/validations"
payload := strings.NewReader("\"<string>\"")
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://tracer.sandbox.lerian.net/v1/validations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("\"<string>\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://tracer.sandbox.lerian.net/v1/validations")
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 = "\"<string>\""
response = http.request(request)
puts response.read_body{
"decision": "ALLOW",
"evaluatedAt": "2021-01-01T00:00:00Z",
"evaluatedRuleIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"limitUsageDetails": [
{
"attemptedAmount": "100.00",
"currentUsage": "500.00",
"exceeded": true,
"limitAmount": "1000.00",
"limitId": "00000000-0000-0000-0000-000000000000",
"period": "DAILY",
"scope": "account:00000000-0000-0000-0000-000000000000",
"skipReason": "outside_time_window",
"skipped": true
}
],
"matchedRuleIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"processingTimeMs": 12.5,
"reason": "Transaction denied by rule 'Block high-value checking transactions'",
"requestId": "00000000-0000-0000-0000-000000000000",
"totalRulesLoaded": 42,
"truncated": false,
"validationId": "00000000-0000-0000-0000-000000000000"
}Validar uma transação
Use este endpoint para validar uma transação em tempo real contra regras e limites configurados. Retorna uma decisão (ALLOW, DENY ou REVIEW) junto com detalhes sobre quais regras corresponderam e uso de limites.
POST
/
v1
/
validations
Validar uma transação
curl --request POST \
--url https://tracer.sandbox.lerian.net/v1/validations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '"<string>"'import requests
url = "https://tracer.sandbox.lerian.net/v1/validations"
payload = "<string>"
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('<string>')
};
fetch('https://tracer.sandbox.lerian.net/v1/validations', 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://tracer.sandbox.lerian.net/v1/validations",
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('<string>'),
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://tracer.sandbox.lerian.net/v1/validations"
payload := strings.NewReader("\"<string>\"")
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://tracer.sandbox.lerian.net/v1/validations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("\"<string>\"")
.asString();require 'uri'
require 'net/http'
url = URI("https://tracer.sandbox.lerian.net/v1/validations")
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 = "\"<string>\""
response = http.request(request)
puts response.read_body{
"decision": "ALLOW",
"evaluatedAt": "2021-01-01T00:00:00Z",
"evaluatedRuleIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"limitUsageDetails": [
{
"attemptedAmount": "100.00",
"currentUsage": "500.00",
"exceeded": true,
"limitAmount": "1000.00",
"limitId": "00000000-0000-0000-0000-000000000000",
"period": "DAILY",
"scope": "account:00000000-0000-0000-0000-000000000000",
"skipReason": "outside_time_window",
"skipped": true
}
],
"matchedRuleIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"processingTimeMs": 12.5,
"reason": "Transaction denied by rule 'Block high-value checking transactions'",
"requestId": "00000000-0000-0000-0000-000000000000",
"totalRulesLoaded": 42,
"truncated": false,
"validationId": "00000000-0000-0000-0000-000000000000"
}Autorizações
BearerAuthApiKeyAuth
JWT bearer token issued by the identity provider.
Corpo
application/json
The body is of type file.
Resposta
OK
Exemplo:
"ALLOW"
Exemplo:
"2021-01-01T00:00:00Z"
Show child attributes
Show child attributes
Exemplo:
12.5
Exemplo:
"Transaction denied by rule 'Block high-value checking transactions'"
Exemplo:
"00000000-0000-0000-0000-000000000000"
Exemplo:
42
Exemplo:
false
Exemplo:
"00000000-0000-0000-0000-000000000000"
Esta página foi útil?

