curl --request GET \
--url https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requestsimport requests
url = "https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests', 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-requests",
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}/policy-requests"
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}/policy-requests")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests")
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{
"items": [
{
"id": "4d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
"realmId": "f495ff0c-ab54-4f99-8e92-ca8682e4de9b",
"organizationId": "c4bd3f21-dfbd-44e8-8055-68ba15bed410",
"accountId": "66f2a1c7b4d3e80012c9a0b4",
"walletId": "6710b8e4c9e77b0012a4d6f3",
"context": "PAYMENT",
"subjectType": "PIX",
"subjectId": "6726a4f1b4d3e80012c9a3f1",
"requester": {
"userId": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
"name": "Ana Souza",
"email": "ana.souza@example.com"
},
"body": {
"amount": 123000,
"description": "Folders da campanha de novembro",
"creditParty": {
"name": "Gráfica Aurora Ltda"
},
"confirmation": {
"amount": 123000,
"category": "FLEX_INTERNATIONAL"
}
},
"policyId": "3f2e1d0c-9b8a-4c7d-8e6f-5a4b3c2d1e0f",
"status": "REQUESTED",
"executionStatus": "WAITING",
"approvalDeadline": "2026-11-07T00:00:00.000Z",
"approvalHierarchy": false,
"approvals": [
{
"type": "USER",
"id": "0b6f2c1e-8d4a-4f3b-9a7e-5c2d1e0f9a8b",
"name": "Rafael Lima",
"status": "REQUESTED",
"users": [
{
"userId": "0b6f2c1e-8d4a-4f3b-9a7e-5c2d1e0f9a8b",
"userName": "Rafael Lima",
"userEmail": "rafael.lima@example.com",
"status": "REQUESTED"
}
],
"createdAt": "2026-11-06T13:42:10.512Z",
"requestedAt": "2026-11-06T13:42:10.512Z",
"decisionAt": "2026-11-06T15:03:44.207Z",
"decisionReason": "Fora do orçamento do trimestre"
}
],
"createdAt": "2026-11-06T13:42:10.512Z",
"updatedAt": "2026-11-06T13:42:10.512Z",
"walletName": "Marketing",
"cardName": "Cartão Marketing",
"denialReason": "Fora do orçamento do trimestre",
"resolution": "AUTO",
"executionMode": "MOVE_BALANCE_ONLY",
"executionFailReason": "MOVE_BALANCE_SOURCE_MISSING",
"executionMoveBalance": {
"addBalance": true,
"fromAccountId": "66f2a1c7b4d3e80012c9a0b4",
"fromWalletId": "66f2a1c7b4d3e80012c9a0b9"
},
"fundingClaimedAt": "2026-11-06T15:03:45.031Z",
"fundedAt": "2026-11-06T15:03:46.418Z",
"fundingClaim": true,
"executionAttempts": 1
}
],
"next": "MjAyNi0xMS0wN1QwMDowMDowMC4wMDBa"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "POLICY_REQUEST_FORBIDDEN",
"origin": "RULE_ENGINE",
"message": "You do not have permission to perform this action"
}{
"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": "query",
"message": "Too big: expected string to have <=120 characters",
"code": "QUERY_MAX"
}
]
}List an organization's policy requests
Lists the organization’s policy requests — the approval requests opened when a business policy requires approval for a payment, a transfer request or a reviewed transaction.
curl --request GET \
--url https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requestsimport requests
url = "https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests', 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-requests",
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}/policy-requests"
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}/policy-requests")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests")
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{
"items": [
{
"id": "4d2c1b0a-9f8e-4d7c-8b6a-5f4e3d2c1b0a",
"realmId": "f495ff0c-ab54-4f99-8e92-ca8682e4de9b",
"organizationId": "c4bd3f21-dfbd-44e8-8055-68ba15bed410",
"accountId": "66f2a1c7b4d3e80012c9a0b4",
"walletId": "6710b8e4c9e77b0012a4d6f3",
"context": "PAYMENT",
"subjectType": "PIX",
"subjectId": "6726a4f1b4d3e80012c9a3f1",
"requester": {
"userId": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
"name": "Ana Souza",
"email": "ana.souza@example.com"
},
"body": {
"amount": 123000,
"description": "Folders da campanha de novembro",
"creditParty": {
"name": "Gráfica Aurora Ltda"
},
"confirmation": {
"amount": 123000,
"category": "FLEX_INTERNATIONAL"
}
},
"policyId": "3f2e1d0c-9b8a-4c7d-8e6f-5a4b3c2d1e0f",
"status": "REQUESTED",
"executionStatus": "WAITING",
"approvalDeadline": "2026-11-07T00:00:00.000Z",
"approvalHierarchy": false,
"approvals": [
{
"type": "USER",
"id": "0b6f2c1e-8d4a-4f3b-9a7e-5c2d1e0f9a8b",
"name": "Rafael Lima",
"status": "REQUESTED",
"users": [
{
"userId": "0b6f2c1e-8d4a-4f3b-9a7e-5c2d1e0f9a8b",
"userName": "Rafael Lima",
"userEmail": "rafael.lima@example.com",
"status": "REQUESTED"
}
],
"createdAt": "2026-11-06T13:42:10.512Z",
"requestedAt": "2026-11-06T13:42:10.512Z",
"decisionAt": "2026-11-06T15:03:44.207Z",
"decisionReason": "Fora do orçamento do trimestre"
}
],
"createdAt": "2026-11-06T13:42:10.512Z",
"updatedAt": "2026-11-06T13:42:10.512Z",
"walletName": "Marketing",
"cardName": "Cartão Marketing",
"denialReason": "Fora do orçamento do trimestre",
"resolution": "AUTO",
"executionMode": "MOVE_BALANCE_ONLY",
"executionFailReason": "MOVE_BALANCE_SOURCE_MISSING",
"executionMoveBalance": {
"addBalance": true,
"fromAccountId": "66f2a1c7b4d3e80012c9a0b4",
"fromWalletId": "66f2a1c7b4d3e80012c9a0b9"
},
"fundingClaimedAt": "2026-11-06T15:03:45.031Z",
"fundedAt": "2026-11-06T15:03:46.418Z",
"fundingClaim": true,
"executionAttempts": 1
}
],
"next": "MjAyNi0xMS0wN1QwMDowMDowMC4wMDBa"
}{
"traceId": "1-68ee2a1b-3c4d5e6f7a8b9c0d1e2f3a4b",
"code": "POLICY_REQUEST_FORBIDDEN",
"origin": "RULE_ENGINE",
"message": "You do not have permission to perform this action"
}{
"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": "query",
"message": "Too big: expected string to have <=120 characters",
"code": "QUERY_MAX"
}
]
}userId. Any other member sees only the requests they created or take part in approving: without userId the list is theirs, and naming another user is refused with 403.
Filter by requestStatus, executionStatus, subjectType or subjectId, or search with query. approvalStatus narrows to the requests with an approval step in that status that names the userId user — ?userId=<id>&approvalStatus=REQUESTED lists the requests waiting for that user’s decision — and is refused without userId. It looks at the step, not at the user’s own decision: a group step another member approved is APPROVED for every member. The list is sorted by approvalDeadline, soonest first, unless you choose another sort; page with limit + next. Each parameter takes one value.Path Parameters
ID of your realm.
Format: UUID
ID of the organization whose policy requests you want to list.
Format: UUID
Query Parameters
Only requests whose wallet name, requester name or e-mail, or recipient name contains this text (case-insensitive).
1 - 120Only requests this user created or takes part in approving. Organization admins can name any user, or omit it to list the whole organization; any other member only sees their own requests — omitted means themselves, and naming someone else is refused.
1Only requests in this status.
REQUESTED, APPROVED, DENIED, CANCELED, EXPIRED Only requests whose execution — what happens after the approval — is in this status.
WAITING, PROCESSING, EXECUTED, FAILED Only requests with an approval step in this status that names the user in userId — REQUESTED lists the ones waiting for their decision. It is the step's status, not the user's own decision. Requires userId.
WAITING, REQUESTED, APPROVED, DENIED, CANCELED Only requests for this kind of subject: PIX, BOLETO, WALLET_TRANSFER_REQUEST or TRANSACTION (a spend review).
1Only requests for this subject — the ID of the payment, transfer request or transaction.
1Field to sort by. Defaults to approvalDeadline, soonest first.
approvalDeadline, createdAt, requester.name Sort direction. Defaults to asc for approvalDeadline and requester.name, and to desc (newest first) for createdAt.
asc, desc Cursor returned as next by the previous page. Omit for the first page.
1Page size. Defaults to 20.
0 < x <= 100