curl --request GET \
--url https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/business-policiesimport requests
url = "https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/business-policies"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/business-policies', 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}/business-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/business-policies"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/business-policies")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/business-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"next": "NjcyMGYzYTFjOWU3N2IwMDEyYTRkNmY5",
"items": [
{
"id": "3f1c9a52-7d4e-4b8a-9c21-5e6f0a8b2d47",
"realmId": "f495ff0c-ab54-4f99-8e92-ca8682e4de9b",
"organizationId": "c4bd3f21-dfbd-44e8-8055-68ba15bed410",
"context": "PAYMENT",
"name": "Payments over R$ 5,000",
"order": 10,
"status": "ACTIVE",
"conditions": {
"logic": "AND",
"groups": [
{
"logic": "AND",
"items": [
{
"operator": "GREATER_THAN",
"field": "amount",
"maskType": "<string>",
"dynamicFieldValue": "<string>",
"value": 500000
}
],
"dependsOn": [
"<string>"
]
}
]
},
"actions": {
"hierarchy": false,
"autoAction": "NONE",
"moveBalance": {
"addBalance": true,
"fromAccountId": "66f2a1c7b4d3e80012c9a0b4",
"fromWalletId": "6710b8e4c9e77b0012a4d6f3"
},
"approvals": [
{
"type": "GROUP",
"id": "8b0e4c2a-1f6d-4e3b-a9c7-2d5f8e1b6c30",
"name": "Financeiro"
}
]
},
"createdAt": "2026-10-14T13:45:12.000Z",
"updatedAt": "2026-11-03T18:02:40.000Z",
"description": "Pagamentos acima de R$ 5.000,00 precisam da aprovação do time financeiro."
}
]
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BUSINESS_POLICY_FORBIDDEN",
"origin": "RULE_ENGINE",
"message": "You do not have permission to manage business policies"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "RULE_ENGINE",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "context",
"message": "Invalid option: expected one of \"PAYMENT\"|\"SPEND_REVIEW\"|\"TRAVEL\"",
"code": "CONTEXT_ONE_OF"
}
]
}List an organization's business policies
Lists the organization’s business policies, in evaluation order.
curl --request GET \
--url https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/business-policiesimport requests
url = "https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/business-policies"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/business-policies', 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}/business-policies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/business-policies"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/business-policies")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/business-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"next": "NjcyMGYzYTFjOWU3N2IwMDEyYTRkNmY5",
"items": [
{
"id": "3f1c9a52-7d4e-4b8a-9c21-5e6f0a8b2d47",
"realmId": "f495ff0c-ab54-4f99-8e92-ca8682e4de9b",
"organizationId": "c4bd3f21-dfbd-44e8-8055-68ba15bed410",
"context": "PAYMENT",
"name": "Payments over R$ 5,000",
"order": 10,
"status": "ACTIVE",
"conditions": {
"logic": "AND",
"groups": [
{
"logic": "AND",
"items": [
{
"operator": "GREATER_THAN",
"field": "amount",
"maskType": "<string>",
"dynamicFieldValue": "<string>",
"value": 500000
}
],
"dependsOn": [
"<string>"
]
}
]
},
"actions": {
"hierarchy": false,
"autoAction": "NONE",
"moveBalance": {
"addBalance": true,
"fromAccountId": "66f2a1c7b4d3e80012c9a0b4",
"fromWalletId": "6710b8e4c9e77b0012a4d6f3"
},
"approvals": [
{
"type": "GROUP",
"id": "8b0e4c2a-1f6d-4e3b-a9c7-2d5f8e1b6c30",
"name": "Financeiro"
}
]
},
"createdAt": "2026-10-14T13:45:12.000Z",
"updatedAt": "2026-11-03T18:02:40.000Z",
"description": "Pagamentos acima de R$ 5.000,00 precisam da aprovação do time financeiro."
}
]
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BUSINESS_POLICY_FORBIDDEN",
"origin": "RULE_ENGINE",
"message": "You do not have permission to manage business policies"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "BAD_REQUEST",
"origin": "RULE_ENGINE",
"message": "Bad Request: Your request is invalid or incomplete. Please make sure you are requesting with the right fields.",
"fields": [
{
"field": "context",
"message": "Invalid option: expected one of \"PAYMENT\"|\"SPEND_REVIEW\"|\"TRAVEL\"",
"code": "CONTEXT_ONE_OF"
}
]
}conditions and the actions taken when they match — approve, deny, or open an approval request. Within a context, active policies are tried by ascending order and the first match decides.
Archived policies are left out unless you ask for them with status=ARCHIVED. Filter by context, status, autoAction and moveBalance, search names and descriptions with query, and page with limit + next. A blank parameter counts as not sent, and an unknown one is ignored. Each approver in actions.approvals carries the user’s or group’s current name; it is left out when the approver can no longer be found.
Any member of the organization can list its policies.Path Parameters
ID of your realm.
Format: UUID
ID of the organization whose policies you want to list.
Format: UUID
Query Parameters
Only policies of this context.
PAYMENT, SPEND_REVIEW, TRAVEL Only policies in this status. Omitted, the list holds ACTIVE and DISABLED policies; send ARCHIVED to list the archived ones.
ACTIVE, DISABLED, ARCHIVED Only policies whose name or description contains this text (case-insensitive).
1 - 120Only policies with this actions.autoAction. NONE lists the policies that open an approval request.
APPROVE, DENY, NONE true: only policies that fund the payment from another wallet (actions.moveBalance.addBalance). false: only those that don't, including policies without moveBalance.
true, false Field to sort by. Defaults to order, the evaluation order, so the list reads in the order policies are tried.
order, name, createdAt Sort direction. Defaults to asc.
asc, desc Cursor returned as next by the previous page. Omit for the first page.
Page size. Defaults to 20.
1 <= x <= 100Response
Successful response