curl --request POST \
--url https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "<string>",
"walletId": "<string>",
"subjectType": "<string>",
"subjectId": "<string>",
"requester": {
"userId": "<string>",
"name": "<string>",
"email": "<string>"
},
"body": {},
"walletName": "<string>"
}
'import requests
url = "https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations"
payload = {
"accountId": "<string>",
"walletId": "<string>",
"subjectType": "<string>",
"subjectId": "<string>",
"requester": {
"userId": "<string>",
"name": "<string>",
"email": "<string>"
},
"body": {},
"walletName": "<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({
accountId: '<string>',
walletId: '<string>',
subjectType: '<string>',
subjectId: '<string>',
requester: {userId: '<string>', name: '<string>', email: '<string>'},
body: JSON.stringify({}),
walletName: '<string>'
})
};
fetch('https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations', 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.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations",
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([
'accountId' => '<string>',
'walletId' => '<string>',
'subjectType' => '<string>',
'subjectId' => '<string>',
'requester' => [
'userId' => '<string>',
'name' => '<string>',
'email' => '<string>'
],
'body' => [
],
'walletName' => '<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://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations"
payload := strings.NewReader("{\n \"accountId\": \"<string>\",\n \"walletId\": \"<string>\",\n \"subjectType\": \"<string>\",\n \"subjectId\": \"<string>\",\n \"requester\": {\n \"userId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n },\n \"body\": {},\n \"walletName\": \"<string>\"\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://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"<string>\",\n \"walletId\": \"<string>\",\n \"subjectType\": \"<string>\",\n \"subjectId\": \"<string>\",\n \"requester\": {\n \"userId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n },\n \"body\": {},\n \"walletName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations")
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 \"accountId\": \"<string>\",\n \"walletId\": \"<string>\",\n \"subjectType\": \"<string>\",\n \"subjectId\": \"<string>\",\n \"requester\": {\n \"userId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n },\n \"body\": {},\n \"walletName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"actions": {
"autoAction": "APPROVE",
"hierarchy": true,
"moveBalance": {
"addBalance": true,
"fromAccountId": "<string>",
"fromWalletId": "<string>"
},
"approvals": [
{
"type": "USER",
"id": "<string>",
"name": "<string>"
}
]
},
"id": "<string>",
"realmId": "<string>",
"organizationId": "<string>",
"context": "PAYMENT",
"name": "<string>",
"description": "<string>",
"order": 123,
"status": "ACTIVE",
"conditions": {
"logic": "AND",
"groups": [
{
"logic": "AND",
"items": [
{
"operator": "<string>",
"field": "<string>",
"maskType": "<string>",
"dynamicFieldValue": "<string>",
"value": "<unknown>"
}
],
"dependsOn": [
"<string>"
]
}
]
},
"createdAt": "<string>",
"updatedAt": "<string>"
}/realms/{realmId}/organizations/{organizationId}/policy-evaluations
curl --request POST \
--url https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"accountId": "<string>",
"walletId": "<string>",
"subjectType": "<string>",
"subjectId": "<string>",
"requester": {
"userId": "<string>",
"name": "<string>",
"email": "<string>"
},
"body": {},
"walletName": "<string>"
}
'import requests
url = "https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations"
payload = {
"accountId": "<string>",
"walletId": "<string>",
"subjectType": "<string>",
"subjectId": "<string>",
"requester": {
"userId": "<string>",
"name": "<string>",
"email": "<string>"
},
"body": {},
"walletName": "<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({
accountId: '<string>',
walletId: '<string>',
subjectType: '<string>',
subjectId: '<string>',
requester: {userId: '<string>', name: '<string>', email: '<string>'},
body: JSON.stringify({}),
walletName: '<string>'
})
};
fetch('https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations', 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.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations",
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([
'accountId' => '<string>',
'walletId' => '<string>',
'subjectType' => '<string>',
'subjectId' => '<string>',
'requester' => [
'userId' => '<string>',
'name' => '<string>',
'email' => '<string>'
],
'body' => [
],
'walletName' => '<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://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations"
payload := strings.NewReader("{\n \"accountId\": \"<string>\",\n \"walletId\": \"<string>\",\n \"subjectType\": \"<string>\",\n \"subjectId\": \"<string>\",\n \"requester\": {\n \"userId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n },\n \"body\": {},\n \"walletName\": \"<string>\"\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://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accountId\": \"<string>\",\n \"walletId\": \"<string>\",\n \"subjectType\": \"<string>\",\n \"subjectId\": \"<string>\",\n \"requester\": {\n \"userId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n },\n \"body\": {},\n \"walletName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-evaluations")
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 \"accountId\": \"<string>\",\n \"walletId\": \"<string>\",\n \"subjectType\": \"<string>\",\n \"subjectId\": \"<string>\",\n \"requester\": {\n \"userId\": \"<string>\",\n \"name\": \"<string>\",\n \"email\": \"<string>\"\n },\n \"body\": {},\n \"walletName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"actions": {
"autoAction": "APPROVE",
"hierarchy": true,
"moveBalance": {
"addBalance": true,
"fromAccountId": "<string>",
"fromWalletId": "<string>"
},
"approvals": [
{
"type": "USER",
"id": "<string>",
"name": "<string>"
}
]
},
"id": "<string>",
"realmId": "<string>",
"organizationId": "<string>",
"context": "PAYMENT",
"name": "<string>",
"description": "<string>",
"order": 123,
"status": "ACTIVE",
"conditions": {
"logic": "AND",
"groups": [
{
"logic": "AND",
"items": [
{
"operator": "<string>",
"field": "<string>",
"maskType": "<string>",
"dynamicFieldValue": "<string>",
"value": "<unknown>"
}
],
"dependsOn": [
"<string>"
]
}
]
},
"createdAt": "<string>",
"updatedAt": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
PAYMENT, SPEND_REVIEW, TRAVEL 1111Show child attributes
Show child attributes
Show child attributes
Show child attributes
1Response
Successful response
Evaluation response — a pure read.
A match returns the whole matched policy; NO match returns exactly { actions: { autoAction: "APPROVE" } }. Callers key off actions.autoAction and must tolerate every other field being absent.
approvals[] carries each participant's display name, resolved at read time exactly as the business-policy CRUD reads do. The name is best-effort: a participant that cannot be resolved keeps its {type, id} and omits name.
Show child attributes
Show child attributes
The business surface a policy governs.
PAYMENT, SPEND_REVIEW, TRAVEL Evaluation sorts ascending; first match wins.
ARCHIVED is a soft delete: terminal, set only through the archive endpoint, and never evaluated against a transaction.
ACTIVE, DISABLED, ARCHIVED Show child attributes
Show child attributes