curl --request POST \
--url https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/deny \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>"
}
'import requests
url = "https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/deny"
payload = { "reason": "<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({reason: '<string>'})
};
fetch('https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/deny', 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/{policyRequestId}/deny",
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([
'reason' => '<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-requests/{policyRequestId}/deny"
payload := strings.NewReader("{\n \"reason\": \"<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-requests/{policyRequestId}/deny")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/deny")
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 \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"realmId": "<string>",
"organizationId": "<string>",
"accountId": "<string>",
"walletId": "<string>",
"context": "PAYMENT",
"subjectType": "<string>",
"subjectId": "<string>",
"requester": {
"userId": "<string>",
"name": "<string>",
"email": "<string>"
},
"body": {},
"policyId": "<string>",
"status": "REQUESTED",
"executionStatus": "WAITING",
"approvalDeadline": "<string>",
"approvalHierarchy": true,
"approvals": [
{
"type": "USER",
"id": "<string>",
"name": "<string>",
"status": "WAITING",
"users": [
{
"userId": "<string>",
"userName": "<string>",
"userEmail": "<string>",
"status": "WAITING"
}
],
"createdAt": "<string>",
"requestedAt": "<string>",
"decisionAt": "<string>",
"decisionReason": "<string>"
}
],
"walletName": "<string>",
"denialReason": "<string>",
"resolution": "AUTO",
"executionMode": "MOVE_BALANCE_ONLY",
"executionFailReason": "<string>",
"executionMoveBalance": {
"addBalance": true,
"fromAccountId": "<string>",
"fromWalletId": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/deny
curl --request POST \
--url https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/deny \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reason": "<string>"
}
'import requests
url = "https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/deny"
payload = { "reason": "<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({reason: '<string>'})
};
fetch('https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/deny', 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/{policyRequestId}/deny",
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([
'reason' => '<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-requests/{policyRequestId}/deny"
payload := strings.NewReader("{\n \"reason\": \"<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-requests/{policyRequestId}/deny")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ruleengine.v2.portao3.com.br/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/deny")
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 \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"realmId": "<string>",
"organizationId": "<string>",
"accountId": "<string>",
"walletId": "<string>",
"context": "PAYMENT",
"subjectType": "<string>",
"subjectId": "<string>",
"requester": {
"userId": "<string>",
"name": "<string>",
"email": "<string>"
},
"body": {},
"policyId": "<string>",
"status": "REQUESTED",
"executionStatus": "WAITING",
"approvalDeadline": "<string>",
"approvalHierarchy": true,
"approvals": [
{
"type": "USER",
"id": "<string>",
"name": "<string>",
"status": "WAITING",
"users": [
{
"userId": "<string>",
"userName": "<string>",
"userEmail": "<string>",
"status": "WAITING"
}
],
"createdAt": "<string>",
"requestedAt": "<string>",
"decisionAt": "<string>",
"decisionReason": "<string>"
}
],
"walletName": "<string>",
"denialReason": "<string>",
"resolution": "AUTO",
"executionMode": "MOVE_BALANCE_ONLY",
"executionFailReason": "<string>",
"executionMoveBalance": {
"addBalance": true,
"fromAccountId": "<string>",
"fromWalletId": "<string>"
},
"createdAt": "<string>",
"updatedAt": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
1 - 500Response
Successful response
Kept from the request payload so the subject can be fulfilled later.
The business surface a policy governs.
PAYMENT, SPEND_REVIEW, TRAVEL Show child attributes
Show child attributes
Full subject entity snapshot.
Show child attributes
Show child attributes
The matched business policy.
Root lifecycle: REQUESTED → APPROVED | DENIED | CANCELED | EXPIRED (terminal).
REQUESTED, APPROVED, DENIED, CANCELED, EXPIRED Runs only after the root reaches APPROVED.
WAITING, PROCESSING, EXECUTED, FAILED CALLER-supplied at creation (#4971 Q1) and copied verbatim — ruleengine only validates that it is in the future. The business policy no longer carries a deadline: the caller owns the semantics (banking derives it from the payment date), so the same policy can govern subjects with very different natural deadlines.
Copied from policy.actions.hierarchy.
Show child attributes
Show child attributes
Caller-supplied display name of walletId, snapshotted at creation like requester.name (a later wallet rename does not propagate). Absent on requests created before the field existed and on wallet-less subjects.
Why the request was DENIED, as supplied by whoever denied it via .../deny or .../force-deny. Absent when the denier gave no reason, and on every non-DENIED request.
AUTO when the matched policy approved automatically and the request was created already APPROVED (no approvers). Absent on a request that went through an approval flow.
AUTO MOVE_BALANCE_ONLY when only the policy's balance top-up ran and the subject was finalized by its own module. Absent on a full execution.
MOVE_BALANCE_ONLY Copied from the matched policy at creation.
Show child attributes
Show child attributes