{
  "openapi": "3.0.3",
  "info": {
    "title": "Ruleengine",
    "version": "1.0.0",
    "description": "Portão 3 ruleengine API. Every endpoint requires a bearer token in the Authorization header (Authorization: Bearer <token>) unless its page states otherwise; see the Authentication guide. That requirement is not repeated per endpoint. Generated by tools/openapi from code (routes + security) and the hand-written spec (request/response bodies). Confidence tiers: generated:typed=27 copied:manual=0 unknown=0."
  },
  "servers": [
    {
      "url": "https://api.ruleengine.v2.portao3.com.br/",
      "description": "production"
    },
    {
      "url": "https://api.ruleengine.dev.3pers.com.br/",
      "description": "development"
    }
  ],
  "x-p3-surface": "public",
  "tags": [
    {
      "name": "Business Policies"
    },
    {
      "name": "Policy Evaluations"
    },
    {
      "name": "Policy Requests"
    }
  ],
  "components": {},
  "paths": {
    "/realms/{realmId}/organizations/{organizationId}/business-policies": {
      "get": {
        "operationId": "getRealmsByRealmIdOrganizationsByOrganizationIdBusinessPolicies",
        "summary": "/realms/{realmId}/organizations/{organizationId}/business-policies",
        "tags": [
          "Business Policies"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "context",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "PAYMENT",
                "SPEND_REVIEW",
                "TRAVEL"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "DISABLED",
                "ARCHIVED"
              ]
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          {
            "name": "autoAction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "APPROVE",
                "DENY",
                "NONE"
              ]
            }
          },
          {
            "name": "moveBalance",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                }
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "order",
                "name",
                "createdAt"
              ]
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "exclusiveMinimum": true,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "realmId": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "context": {
                            "type": "string",
                            "enum": [
                              "PAYMENT",
                              "SPEND_REVIEW",
                              "TRAVEL"
                            ],
                            "description": "The business surface a policy governs."
                          },
                          "name": {
                            "type": "string"
                          },
                          "description": {
                            "type": "string"
                          },
                          "order": {
                            "type": "number",
                            "description": "Evaluation sorts ascending; first match wins."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "ACTIVE",
                              "DISABLED",
                              "ARCHIVED"
                            ],
                            "description": "`ARCHIVED` is a soft delete: terminal, set only through the archive endpoint, and never evaluated against a transaction."
                          },
                          "conditions": {
                            "type": "object",
                            "properties": {
                              "logic": {
                                "type": "string",
                                "enum": [
                                  "AND",
                                  "OR"
                                ]
                              },
                              "groups": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "logic": {
                                      "type": "string",
                                      "enum": [
                                        "AND",
                                        "OR"
                                      ]
                                    },
                                    "dependsOn": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "items": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "operator": {
                                            "type": "string",
                                            "description": "Same ConditionOperator union the security rules use (incl. LLM_EVALUATE)."
                                          },
                                          "field": {
                                            "type": "string"
                                          },
                                          "maskType": {
                                            "type": "string"
                                          },
                                          "dynamicFieldValue": {
                                            "type": "string"
                                          },
                                          "value": {}
                                        },
                                        "required": [
                                          "operator",
                                          "field"
                                        ]
                                      }
                                    }
                                  },
                                  "required": [
                                    "logic",
                                    "items"
                                  ]
                                },
                                "description": "An EMPTY array matches unconditionally — the catch-all/default policy."
                              }
                            },
                            "required": [
                              "logic",
                              "groups"
                            ]
                          },
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "updatedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "actions": {
                            "type": "object",
                            "properties": {
                              "hierarchy": {
                                "type": "boolean",
                                "description": "true = approvals resolve one-by-one in array order."
                              },
                              "autoAction": {
                                "type": "string",
                                "enum": [
                                  "APPROVE",
                                  "DENY",
                                  "NONE"
                                ],
                                "description": "What happens when a policy matches:\n- `APPROVE` — allowed outright, no policy-request\n- `DENY` — refused outright\n- `NONE` — an approval flow is required (`approvals` must be non-empty)"
                              },
                              "moveBalance": {
                                "type": "object",
                                "properties": {
                                  "addBalance": {
                                    "type": "boolean"
                                  },
                                  "fromAccountId": {
                                    "type": "string",
                                    "description": "Required when `addBalance` is true."
                                  },
                                  "fromWalletId": {
                                    "type": "string",
                                    "description": "Required when `addBalance` is true."
                                  }
                                },
                                "required": [
                                  "addBalance"
                                ]
                              },
                              "approvals": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "USER",
                                        "GROUP"
                                      ]
                                    },
                                    "id": {
                                      "type": "string",
                                      "description": "userId when type=USER, identity groupId when type=GROUP."
                                    },
                                    "name": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "id",
                                    "type"
                                  ],
                                  "description": "A participant as RENDERED on a read: the persisted spec plus the display name resolved at read time.\n\n`name` is never accepted on input and never persisted — a request body carrying it is rejected. It is optional on the way out: a participant whose name cannot be resolved is returned without one."
                                },
                                "description": "Non-empty when autoAction=NONE; empty/absent otherwise."
                              }
                            },
                            "required": [
                              "autoAction",
                              "hierarchy"
                            ],
                            "description": "`BusinessPolicyActions` as rendered — approvals carry their live name."
                          }
                        },
                        "required": [
                          "actions",
                          "conditions",
                          "context",
                          "id",
                          "name",
                          "order",
                          "organizationId",
                          "realmId",
                          "status"
                        ],
                        "description": "What the business-policy CRUD routes (`POST`/`GET`/`PUT .../business-policies`) answer: the stored policy, with each approval participant's display name resolved at read time."
                      }
                    }
                  },
                  "required": [
                    "next",
                    "items"
                  ]
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed",
          "parameters": "generated:typed"
        }
      },
      "post": {
        "operationId": "postRealmsByRealmIdOrganizationsByOrganizationIdBusinessPolicies",
        "summary": "/realms/{realmId}/organizations/{organizationId}/business-policies",
        "tags": [
          "Business Policies"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "realmId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "context": {
                      "type": "string",
                      "enum": [
                        "PAYMENT",
                        "SPEND_REVIEW",
                        "TRAVEL"
                      ],
                      "description": "The business surface a policy governs."
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "order": {
                      "type": "number",
                      "description": "Evaluation sorts ascending; first match wins."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "DISABLED",
                        "ARCHIVED"
                      ],
                      "description": "`ARCHIVED` is a soft delete: terminal, set only through the archive endpoint, and never evaluated against a transaction."
                    },
                    "conditions": {
                      "type": "object",
                      "properties": {
                        "logic": {
                          "type": "string",
                          "enum": [
                            "AND",
                            "OR"
                          ]
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "logic": {
                                "type": "string",
                                "enum": [
                                  "AND",
                                  "OR"
                                ]
                              },
                              "dependsOn": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "operator": {
                                      "type": "string",
                                      "description": "Same ConditionOperator union the security rules use (incl. LLM_EVALUATE)."
                                    },
                                    "field": {
                                      "type": "string"
                                    },
                                    "maskType": {
                                      "type": "string"
                                    },
                                    "dynamicFieldValue": {
                                      "type": "string"
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "operator",
                                    "field"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "logic",
                              "items"
                            ]
                          },
                          "description": "An EMPTY array matches unconditionally — the catch-all/default policy."
                        }
                      },
                      "required": [
                        "logic",
                        "groups"
                      ]
                    },
                    "createdAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "updatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "actions": {
                      "type": "object",
                      "properties": {
                        "hierarchy": {
                          "type": "boolean",
                          "description": "true = approvals resolve one-by-one in array order."
                        },
                        "autoAction": {
                          "type": "string",
                          "enum": [
                            "APPROVE",
                            "DENY",
                            "NONE"
                          ],
                          "description": "What happens when a policy matches:\n- `APPROVE` — allowed outright, no policy-request\n- `DENY` — refused outright\n- `NONE` — an approval flow is required (`approvals` must be non-empty)"
                        },
                        "moveBalance": {
                          "type": "object",
                          "properties": {
                            "addBalance": {
                              "type": "boolean"
                            },
                            "fromAccountId": {
                              "type": "string",
                              "description": "Required when `addBalance` is true."
                            },
                            "fromWalletId": {
                              "type": "string",
                              "description": "Required when `addBalance` is true."
                            }
                          },
                          "required": [
                            "addBalance"
                          ]
                        },
                        "approvals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "USER",
                                  "GROUP"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "description": "userId when type=USER, identity groupId when type=GROUP."
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "type"
                            ],
                            "description": "A participant as RENDERED on a read: the persisted spec plus the display name resolved at read time.\n\n`name` is never accepted on input and never persisted — a request body carrying it is rejected. It is optional on the way out: a participant whose name cannot be resolved is returned without one."
                          },
                          "description": "Non-empty when autoAction=NONE; empty/absent otherwise."
                        }
                      },
                      "required": [
                        "autoAction",
                        "hierarchy"
                      ],
                      "description": "`BusinessPolicyActions` as rendered — approvals carry their live name."
                    }
                  },
                  "required": [
                    "actions",
                    "conditions",
                    "context",
                    "id",
                    "name",
                    "order",
                    "organizationId",
                    "realmId",
                    "status"
                  ],
                  "description": "What the business-policy CRUD routes (`POST`/`GET`/`PUT .../business-policies`) answer: the stored policy, with each approval participant's display name resolved at read time."
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/business-policies/{businessPolicyId}": {
      "get": {
        "operationId": "getRealmsByRealmIdOrganizationsByOrganizationIdBusinessPoliciesByBusinessPolicyId",
        "summary": "/realms/{realmId}/organizations/{organizationId}/business-policies/{businessPolicyId}",
        "tags": [
          "Business Policies"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "businessPolicyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "realmId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "context": {
                      "type": "string",
                      "enum": [
                        "PAYMENT",
                        "SPEND_REVIEW",
                        "TRAVEL"
                      ],
                      "description": "The business surface a policy governs."
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "order": {
                      "type": "number",
                      "description": "Evaluation sorts ascending; first match wins."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "DISABLED",
                        "ARCHIVED"
                      ],
                      "description": "`ARCHIVED` is a soft delete: terminal, set only through the archive endpoint, and never evaluated against a transaction."
                    },
                    "conditions": {
                      "type": "object",
                      "properties": {
                        "logic": {
                          "type": "string",
                          "enum": [
                            "AND",
                            "OR"
                          ]
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "logic": {
                                "type": "string",
                                "enum": [
                                  "AND",
                                  "OR"
                                ]
                              },
                              "dependsOn": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "operator": {
                                      "type": "string",
                                      "description": "Same ConditionOperator union the security rules use (incl. LLM_EVALUATE)."
                                    },
                                    "field": {
                                      "type": "string"
                                    },
                                    "maskType": {
                                      "type": "string"
                                    },
                                    "dynamicFieldValue": {
                                      "type": "string"
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "operator",
                                    "field"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "logic",
                              "items"
                            ]
                          },
                          "description": "An EMPTY array matches unconditionally — the catch-all/default policy."
                        }
                      },
                      "required": [
                        "logic",
                        "groups"
                      ]
                    },
                    "createdAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "updatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "actions": {
                      "type": "object",
                      "properties": {
                        "hierarchy": {
                          "type": "boolean",
                          "description": "true = approvals resolve one-by-one in array order."
                        },
                        "autoAction": {
                          "type": "string",
                          "enum": [
                            "APPROVE",
                            "DENY",
                            "NONE"
                          ],
                          "description": "What happens when a policy matches:\n- `APPROVE` — allowed outright, no policy-request\n- `DENY` — refused outright\n- `NONE` — an approval flow is required (`approvals` must be non-empty)"
                        },
                        "moveBalance": {
                          "type": "object",
                          "properties": {
                            "addBalance": {
                              "type": "boolean"
                            },
                            "fromAccountId": {
                              "type": "string",
                              "description": "Required when `addBalance` is true."
                            },
                            "fromWalletId": {
                              "type": "string",
                              "description": "Required when `addBalance` is true."
                            }
                          },
                          "required": [
                            "addBalance"
                          ]
                        },
                        "approvals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "USER",
                                  "GROUP"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "description": "userId when type=USER, identity groupId when type=GROUP."
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "type"
                            ],
                            "description": "A participant as RENDERED on a read: the persisted spec plus the display name resolved at read time.\n\n`name` is never accepted on input and never persisted — a request body carrying it is rejected. It is optional on the way out: a participant whose name cannot be resolved is returned without one."
                          },
                          "description": "Non-empty when autoAction=NONE; empty/absent otherwise."
                        }
                      },
                      "required": [
                        "autoAction",
                        "hierarchy"
                      ],
                      "description": "`BusinessPolicyActions` as rendered — approvals carry their live name."
                    }
                  },
                  "required": [
                    "actions",
                    "conditions",
                    "context",
                    "id",
                    "name",
                    "order",
                    "organizationId",
                    "realmId",
                    "status"
                  ],
                  "description": "What the business-policy CRUD routes (`POST`/`GET`/`PUT .../business-policies`) answer: the stored policy, with each approval participant's display name resolved at read time."
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed"
        }
      },
      "put": {
        "operationId": "putRealmsByRealmIdOrganizationsByOrganizationIdBusinessPoliciesByBusinessPolicyId",
        "summary": "/realms/{realmId}/organizations/{organizationId}/business-policies/{businessPolicyId}",
        "tags": [
          "Business Policies"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "businessPolicyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "realmId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "context": {
                      "type": "string",
                      "enum": [
                        "PAYMENT",
                        "SPEND_REVIEW",
                        "TRAVEL"
                      ],
                      "description": "The business surface a policy governs."
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "order": {
                      "type": "number",
                      "description": "Evaluation sorts ascending; first match wins."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "DISABLED",
                        "ARCHIVED"
                      ],
                      "description": "`ARCHIVED` is a soft delete: terminal, set only through the archive endpoint, and never evaluated against a transaction."
                    },
                    "conditions": {
                      "type": "object",
                      "properties": {
                        "logic": {
                          "type": "string",
                          "enum": [
                            "AND",
                            "OR"
                          ]
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "logic": {
                                "type": "string",
                                "enum": [
                                  "AND",
                                  "OR"
                                ]
                              },
                              "dependsOn": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "operator": {
                                      "type": "string",
                                      "description": "Same ConditionOperator union the security rules use (incl. LLM_EVALUATE)."
                                    },
                                    "field": {
                                      "type": "string"
                                    },
                                    "maskType": {
                                      "type": "string"
                                    },
                                    "dynamicFieldValue": {
                                      "type": "string"
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "operator",
                                    "field"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "logic",
                              "items"
                            ]
                          },
                          "description": "An EMPTY array matches unconditionally — the catch-all/default policy."
                        }
                      },
                      "required": [
                        "logic",
                        "groups"
                      ]
                    },
                    "createdAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "updatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "actions": {
                      "type": "object",
                      "properties": {
                        "hierarchy": {
                          "type": "boolean",
                          "description": "true = approvals resolve one-by-one in array order."
                        },
                        "autoAction": {
                          "type": "string",
                          "enum": [
                            "APPROVE",
                            "DENY",
                            "NONE"
                          ],
                          "description": "What happens when a policy matches:\n- `APPROVE` — allowed outright, no policy-request\n- `DENY` — refused outright\n- `NONE` — an approval flow is required (`approvals` must be non-empty)"
                        },
                        "moveBalance": {
                          "type": "object",
                          "properties": {
                            "addBalance": {
                              "type": "boolean"
                            },
                            "fromAccountId": {
                              "type": "string",
                              "description": "Required when `addBalance` is true."
                            },
                            "fromWalletId": {
                              "type": "string",
                              "description": "Required when `addBalance` is true."
                            }
                          },
                          "required": [
                            "addBalance"
                          ]
                        },
                        "approvals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "USER",
                                  "GROUP"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "description": "userId when type=USER, identity groupId when type=GROUP."
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "type"
                            ],
                            "description": "A participant as RENDERED on a read: the persisted spec plus the display name resolved at read time.\n\n`name` is never accepted on input and never persisted — a request body carrying it is rejected. It is optional on the way out: a participant whose name cannot be resolved is returned without one."
                          },
                          "description": "Non-empty when autoAction=NONE; empty/absent otherwise."
                        }
                      },
                      "required": [
                        "autoAction",
                        "hierarchy"
                      ],
                      "description": "`BusinessPolicyActions` as rendered — approvals carry their live name."
                    }
                  },
                  "required": [
                    "actions",
                    "conditions",
                    "context",
                    "id",
                    "name",
                    "order",
                    "organizationId",
                    "realmId",
                    "status"
                  ],
                  "description": "What the business-policy CRUD routes (`POST`/`GET`/`PUT .../business-policies`) answer: the stored policy, with each approval participant's display name resolved at read time."
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/business-policies/{businessPolicyId}/archive": {
      "post": {
        "operationId": "postRealmsByRealmIdOrganizationsByOrganizationIdBusinessPoliciesByBusinessPolicyIdArchive",
        "summary": "/realms/{realmId}/organizations/{organizationId}/business-policies/{businessPolicyId}/archive",
        "tags": [
          "Business Policies"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "businessPolicyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "realmId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "context": {
                      "type": "string",
                      "enum": [
                        "PAYMENT",
                        "SPEND_REVIEW",
                        "TRAVEL"
                      ],
                      "description": "The business surface a policy governs."
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "order": {
                      "type": "number",
                      "description": "Evaluation sorts ascending; first match wins."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "DISABLED",
                        "ARCHIVED"
                      ],
                      "description": "`ARCHIVED` is a soft delete: terminal, set only through the archive endpoint, and never evaluated against a transaction."
                    },
                    "conditions": {
                      "type": "object",
                      "properties": {
                        "logic": {
                          "type": "string",
                          "enum": [
                            "AND",
                            "OR"
                          ]
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "logic": {
                                "type": "string",
                                "enum": [
                                  "AND",
                                  "OR"
                                ]
                              },
                              "dependsOn": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "operator": {
                                      "type": "string",
                                      "description": "Same ConditionOperator union the security rules use (incl. LLM_EVALUATE)."
                                    },
                                    "field": {
                                      "type": "string"
                                    },
                                    "maskType": {
                                      "type": "string"
                                    },
                                    "dynamicFieldValue": {
                                      "type": "string"
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "operator",
                                    "field"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "logic",
                              "items"
                            ]
                          },
                          "description": "An EMPTY array matches unconditionally — the catch-all/default policy."
                        }
                      },
                      "required": [
                        "logic",
                        "groups"
                      ]
                    },
                    "createdAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "updatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "actions": {
                      "type": "object",
                      "properties": {
                        "hierarchy": {
                          "type": "boolean",
                          "description": "true = approvals resolve one-by-one in array order."
                        },
                        "autoAction": {
                          "type": "string",
                          "enum": [
                            "APPROVE",
                            "DENY",
                            "NONE"
                          ],
                          "description": "What happens when a policy matches:\n- `APPROVE` — allowed outright, no policy-request\n- `DENY` — refused outright\n- `NONE` — an approval flow is required (`approvals` must be non-empty)"
                        },
                        "moveBalance": {
                          "type": "object",
                          "properties": {
                            "addBalance": {
                              "type": "boolean"
                            },
                            "fromAccountId": {
                              "type": "string",
                              "description": "Required when `addBalance` is true."
                            },
                            "fromWalletId": {
                              "type": "string",
                              "description": "Required when `addBalance` is true."
                            }
                          },
                          "required": [
                            "addBalance"
                          ]
                        },
                        "approvals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "USER",
                                  "GROUP"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "description": "userId when type=USER, identity groupId when type=GROUP."
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "type"
                            ],
                            "description": "A participant as RENDERED on a read: the persisted spec plus the display name resolved at read time.\n\n`name` is never accepted on input and never persisted — a request body carrying it is rejected. It is optional on the way out: a participant whose name cannot be resolved is returned without one."
                          },
                          "description": "Non-empty when autoAction=NONE; empty/absent otherwise."
                        }
                      },
                      "required": [
                        "autoAction",
                        "hierarchy"
                      ],
                      "description": "`BusinessPolicyActions` as rendered — approvals carry their live name."
                    }
                  },
                  "required": [
                    "actions",
                    "conditions",
                    "context",
                    "id",
                    "name",
                    "order",
                    "organizationId",
                    "realmId",
                    "status"
                  ],
                  "description": "What the business-policy CRUD routes (`POST`/`GET`/`PUT .../business-policies`) answer: the stored policy, with each approval participant's display name resolved at read time."
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/business-policies/generate-description": {
      "post": {
        "operationId": "postRealmsByRealmIdOrganizationsByOrganizationIdBusinessPoliciesGenerateDescription",
        "summary": "/realms/{realmId}/organizations/{organizationId}/business-policies/generate-description",
        "tags": [
          "Business Policies"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "context": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "order": {
                    "type": "number"
                  },
                  "status": {
                    "type": "string"
                  },
                  "actions": {
                    "type": "object",
                    "properties": {
                      "hierarchy": {
                        "type": "boolean"
                      },
                      "autoAction": {
                        "type": "string"
                      },
                      "moveBalance": {
                        "type": "object",
                        "additionalProperties": {}
                      },
                      "approvals": {
                        "maxItems": 50,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string"
                            },
                            "id": {
                              "type": "string"
                            },
                            "name": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    }
                  },
                  "conditions": {}
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "description": {
                      "type": "string",
                      "description": "A short pt-BR description of the policy, at most 160 characters."
                    }
                  },
                  "required": [
                    "description"
                  ],
                  "description": "`POST .../business-policies/generate-description` response."
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed",
          "request": "generated:typed",
          "note": "`.superRefine(…)` constraint not represented (runtime-dependent value)"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/business-policies/generate-policy": {
      "post": {
        "operationId": "postRealmsByRealmIdOrganizationsByOrganizationIdBusinessPoliciesGeneratePolicy",
        "summary": "/realms/{realmId}/organizations/{organizationId}/business-policies/generate-policy",
        "tags": [
          "Business Policies"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "context": {
                    "type": "string",
                    "enum": [
                      "PAYMENT",
                      "SPEND_REVIEW",
                      "TRAVEL"
                    ]
                  },
                  "prompt": {
                    "type": "string",
                    "minLength": 3,
                    "maxLength": 2000
                  },
                  "includeWallets": {
                    "type": "boolean"
                  }
                },
                "required": [
                  "context",
                  "prompt"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "policy": {
                      "type": "object",
                      "properties": {
                        "realmId": {
                          "type": "string"
                        },
                        "organizationId": {
                          "type": "string"
                        },
                        "context": {
                          "type": "string",
                          "enum": [
                            "PAYMENT",
                            "SPEND_REVIEW",
                            "TRAVEL"
                          ],
                          "description": "The business surface a policy governs."
                        },
                        "name": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "order": {
                          "type": "number",
                          "description": "Evaluation sorts ascending; first match wins."
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "ACTIVE",
                            "DISABLED",
                            "ARCHIVED"
                          ],
                          "description": "`ARCHIVED` is a soft delete: terminal, set only through the archive endpoint, and never evaluated against a transaction."
                        },
                        "actions": {
                          "type": "object",
                          "properties": {
                            "hierarchy": {
                              "type": "boolean",
                              "description": "true = approvals resolve one-by-one in array order."
                            },
                            "autoAction": {
                              "type": "string",
                              "enum": [
                                "APPROVE",
                                "DENY",
                                "NONE"
                              ],
                              "description": "What happens when a policy matches:\n- `APPROVE` — allowed outright, no policy-request\n- `DENY` — refused outright\n- `NONE` — an approval flow is required (`approvals` must be non-empty)"
                            },
                            "moveBalance": {
                              "type": "object",
                              "properties": {
                                "addBalance": {
                                  "type": "boolean"
                                },
                                "fromAccountId": {
                                  "type": "string",
                                  "description": "Required when `addBalance` is true."
                                },
                                "fromWalletId": {
                                  "type": "string",
                                  "description": "Required when `addBalance` is true."
                                }
                              },
                              "required": [
                                "addBalance"
                              ]
                            },
                            "approvals": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "USER",
                                      "GROUP"
                                    ]
                                  },
                                  "id": {
                                    "type": "string",
                                    "description": "userId when type=USER, identity groupId when type=GROUP."
                                  },
                                  "name": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "id",
                                  "type"
                                ],
                                "description": "A participant as RENDERED on a read: the persisted spec plus the display name resolved at read time.\n\n`name` is never accepted on input and never persisted — a request body carrying it is rejected. It is optional on the way out: a participant whose name cannot be resolved is returned without one."
                              },
                              "description": "Non-empty when autoAction=NONE; empty/absent otherwise."
                            }
                          },
                          "required": [
                            "autoAction",
                            "hierarchy"
                          ],
                          "description": "`BusinessPolicyActions` as rendered — approvals carry their live name."
                        },
                        "conditions": {
                          "type": "object",
                          "properties": {
                            "logic": {
                              "type": "string",
                              "enum": [
                                "AND",
                                "OR"
                              ]
                            },
                            "groups": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "logic": {
                                    "type": "string",
                                    "enum": [
                                      "AND",
                                      "OR"
                                    ]
                                  },
                                  "dependsOn": {
                                    "type": "array",
                                    "items": {
                                      "type": "string"
                                    }
                                  },
                                  "items": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "operator": {
                                          "type": "string",
                                          "description": "Same ConditionOperator union the security rules use (incl. LLM_EVALUATE)."
                                        },
                                        "field": {
                                          "type": "string"
                                        },
                                        "maskType": {
                                          "type": "string"
                                        },
                                        "dynamicFieldValue": {
                                          "type": "string"
                                        },
                                        "value": {}
                                      },
                                      "required": [
                                        "operator",
                                        "field"
                                      ]
                                    }
                                  }
                                },
                                "required": [
                                  "logic",
                                  "items"
                                ]
                              },
                              "description": "An EMPTY array matches unconditionally — the catch-all/default policy."
                            }
                          },
                          "required": [
                            "logic",
                            "groups"
                          ]
                        }
                      },
                      "required": [
                        "realmId",
                        "organizationId",
                        "context",
                        "name",
                        "order",
                        "status",
                        "actions",
                        "conditions"
                      ],
                      "description": "`POST .../business-policies/generate-policy` response — a DRAFT policy. It is NOT persisted and has no `id`: submit it through the create route to save it (stripping `actions.approvals[].name`, which the create route rejects, exactly as the edit flow already does)."
                    },
                    "unsupported": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "Restrictions the request asked for that this policy does NOT express — for example a wallet whose id was not supplied. Empty when everything was captured.\n\nAlways show these before the draft is saved: the policy is otherwise valid and will govern MORE payments than the request described."
                    }
                  },
                  "required": [
                    "policy",
                    "unsupported"
                  ],
                  "description": "`POST .../business-policies/generate-policy` response.\n\n`policy` is create-compatible: submit it to `POST .../business-policies` as it stands, minus `actions.approvals[].name` (the create route rejects that, exactly as it does on edit)."
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed",
          "request": "generated:typed"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/business-policies/payment-conditions": {
      "get": {
        "operationId": "getRealmsByRealmIdOrganizationsByOrganizationIdBusinessPoliciesPaymentConditions",
        "summary": "/realms/{realmId}/organizations/{organizationId}/business-policies/payment-conditions",
        "tags": [
          "Business Policies"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "context": {
                      "type": "string",
                      "enum": [
                        "PAYMENT"
                      ]
                    },
                    "subjects": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The payment subjects a PAYMENT policy can govern."
                    },
                    "logic": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The boolean operators available for `conditions.logic` and each group."
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "operator": {
                            "type": "string"
                          },
                          "valueKind": {
                            "type": "string",
                            "enum": [
                              "single",
                              "array",
                              "none",
                              "criteria-string"
                            ],
                            "description": "`single` — one scalar value; `array` — a non-empty array of values; `none` — no value at all (the parameter is baked into the operator); `criteria-string` — a natural-language sentence."
                          },
                          "label": {
                            "type": "string",
                            "description": "pt-BR display label."
                          },
                          "description": {
                            "type": "string",
                            "description": "pt-BR description, including the operator's pitfalls."
                          }
                        },
                        "required": [
                          "operator",
                          "valueKind",
                          "label",
                          "description"
                        ],
                        "description": "One operator, and what kind of value it takes."
                      }
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string",
                            "description": "Dot path into the evaluated payment body."
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "integer",
                              "number",
                              "string",
                              "boolean",
                              "enum",
                              "date"
                            ],
                            "description": "How a field's condition value is typed on the wire."
                          },
                          "unit": {
                            "type": "string",
                            "enum": [
                              "centavos"
                            ],
                            "description": "Present on integer money fields: the amount is in centavos."
                          },
                          "enumValues": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The allowed values, for `type: \"enum\"`."
                          },
                          "operators": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Every operator this field accepts. A superset of `viewOperator`: date fields also accept the `DATE_WITHIN(n)` window form, and some text fields accept `LLM_EVALUATE`, neither of which a filter builder renders as a plain operator."
                          },
                          "viewOperator": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The operators a filter builder should offer. A subset of `operators`."
                          },
                          "viewType": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "MONEY"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "NUMBER"
                                    ]
                                  },
                                  "prefix": {
                                    "type": "string"
                                  },
                                  "suffix": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "TEXT"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "BOOLEAN"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "DATE"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "MULTI_SELECT"
                                    ]
                                  },
                                  "options": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "label": {
                                          "type": "string",
                                          "description": "pt-BR display label."
                                        },
                                        "icon": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "label"
                                      ],
                                      "description": "One selectable value of a multi-select field."
                                    },
                                    "description": "Static options, for enum-backed fields."
                                  },
                                  "dynamicOptions": {
                                    "type": "string",
                                    "enum": [
                                      "WALLETS",
                                      "CURRENCIES",
                                      "USERS"
                                    ],
                                    "description": "Option source the client resolves itself."
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              }
                            ],
                            "description": "How to render the value input."
                          },
                          "label": {
                            "type": "string",
                            "description": "pt-BR display label."
                          },
                          "description": {
                            "type": "string",
                            "description": "pt-BR description — a tooltip for the field, including its pitfalls."
                          },
                          "availability": {
                            "type": "object",
                            "properties": {
                              "PIX": {
                                "type": "string",
                                "enum": [
                                  "always",
                                  "conditional",
                                  "never"
                                ],
                                "description": "Whether a field is present on a given payment subject."
                              },
                              "BOLETO": {
                                "type": "string",
                                "enum": [
                                  "always",
                                  "conditional",
                                  "never"
                                ],
                                "description": "Whether a field is present on a given payment subject."
                              },
                              "WALLET_TRANSFER_REQUEST": {
                                "type": "string",
                                "enum": [
                                  "always",
                                  "conditional",
                                  "never"
                                ],
                                "description": "Whether a field is present on a given payment subject."
                              }
                            },
                            "required": [
                              "PIX",
                              "BOLETO",
                              "WALLET_TRANSFER_REQUEST"
                            ]
                          },
                          "availabilityNote": {
                            "type": "string",
                            "description": "pt-BR — when the field is `conditional`, says under what conditions."
                          },
                          "dateKind": {
                            "type": "object",
                            "properties": {
                              "PIX": {
                                "type": "string",
                                "enum": [
                                  "CALENDAR_DATE",
                                  "INSTANT",
                                  "CLIENT_DAY"
                                ],
                                "description": "What day a date field's stored value NAMES.\n\n- `CALENDAR_DATE` — a day on a calendar with no meaningful time of day (a   boleto's due date, a PIX cobv's due date). It is stored at midnight UTC, so   the day it names is its **UTC** day.\n- `INSTANT` — a real moment in time (a PIX QR code's expiry). The day it falls   on is its **America/Sao_Paulo** day.\n- `CLIENT_DAY` — a custom-field DATE value: the day the payer named, read as   the leading `YYYY-MM-DD` of the stored string with no timezone conversion."
                              },
                              "BOLETO": {
                                "type": "string",
                                "enum": [
                                  "CALENDAR_DATE",
                                  "INSTANT",
                                  "CLIENT_DAY"
                                ],
                                "description": "What day a date field's stored value NAMES.\n\n- `CALENDAR_DATE` — a day on a calendar with no meaningful time of day (a   boleto's due date, a PIX cobv's due date). It is stored at midnight UTC, so   the day it names is its **UTC** day.\n- `INSTANT` — a real moment in time (a PIX QR code's expiry). The day it falls   on is its **America/Sao_Paulo** day.\n- `CLIENT_DAY` — a custom-field DATE value: the day the payer named, read as   the leading `YYYY-MM-DD` of the stored string with no timezone conversion."
                              },
                              "WALLET_TRANSFER_REQUEST": {
                                "type": "string",
                                "enum": [
                                  "CALENDAR_DATE",
                                  "INSTANT",
                                  "CLIENT_DAY"
                                ],
                                "description": "What day a date field's stored value NAMES.\n\n- `CALENDAR_DATE` — a day on a calendar with no meaningful time of day (a   boleto's due date, a PIX cobv's due date). It is stored at midnight UTC, so   the day it names is its **UTC** day.\n- `INSTANT` — a real moment in time (a PIX QR code's expiry). The day it falls   on is its **America/Sao_Paulo** day.\n- `CLIENT_DAY` — a custom-field DATE value: the day the payer named, read as   the leading `YYYY-MM-DD` of the stored string with no timezone conversion."
                              }
                            },
                            "required": [
                              "PIX",
                              "BOLETO",
                              "WALLET_TRANSFER_REQUEST"
                            ],
                            "description": "Only for `type: \"date\"` — which day the stored value names, per subject."
                          },
                          "customField": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string",
                                "description": "The stable client-facing key `field` is `<entity prefix><slug>` of."
                              },
                              "type": {
                                "type": "string",
                                "description": "The identity `CustomFieldType` this row was built from."
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "mask": {
                                "type": "string"
                              },
                              "entity": {
                                "type": "string",
                                "description": "Which related entity's map the value is read from — \"transaction\" is the payment's own root map."
                              },
                              "location": {
                                "type": "string",
                                "description": "The identity custom-field location this row was grounded against."
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "type",
                              "required",
                              "entity",
                              "location"
                            ],
                            "description": "Present ONLY on a row generated per organization from an identity custom-field definition (`customFieldConditionSpec.ts`) — never on a static catalog row. The discriminator a filter builder groups on (`customField !== undefined`). `field` is `<entity prefix><slug>`; `entity` names which related entity's map the value is read from."
                          }
                        },
                        "required": [
                          "field",
                          "type",
                          "operators",
                          "viewOperator",
                          "viewType",
                          "label",
                          "description",
                          "availability"
                        ],
                        "description": "One authorable condition field."
                      }
                    }
                  },
                  "required": [
                    "context",
                    "subjects",
                    "logic",
                    "operators",
                    "fields"
                  ],
                  "description": "`GET .../business-policies/payment-conditions` response."
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/business-policies/spend-review-conditions": {
      "get": {
        "operationId": "getRealmsByRealmIdOrganizationsByOrganizationIdBusinessPoliciesSpendReviewConditions",
        "summary": "/realms/{realmId}/organizations/{organizationId}/business-policies/spend-review-conditions",
        "tags": [
          "Business Policies"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "context": {
                      "type": "string",
                      "enum": [
                        "SPEND_REVIEW"
                      ]
                    },
                    "subjects": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The subject types a SPEND_REVIEW policy can govern."
                    },
                    "logic": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "description": "The boolean operators available for `conditions.logic` and each group."
                    },
                    "operators": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "operator": {
                            "type": "string"
                          },
                          "valueKind": {
                            "type": "string",
                            "enum": [
                              "single",
                              "array",
                              "none",
                              "criteria-string"
                            ],
                            "description": "`single` — one scalar value; `array` — a non-empty array of values; `none` — no value at all (the parameter is baked into the operator); `criteria-string` — a natural-language sentence."
                          },
                          "label": {
                            "type": "string",
                            "description": "pt-BR display label."
                          },
                          "description": {
                            "type": "string",
                            "description": "pt-BR description, including the operator's pitfalls."
                          }
                        },
                        "required": [
                          "operator",
                          "valueKind",
                          "label",
                          "description"
                        ],
                        "description": "One operator, and what kind of value it takes."
                      }
                    },
                    "fields": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "field": {
                            "type": "string",
                            "description": "Dot path into the evaluated transaction body."
                          },
                          "type": {
                            "type": "string",
                            "enum": [
                              "integer",
                              "number",
                              "string",
                              "boolean",
                              "enum",
                              "date"
                            ],
                            "description": "How a field's condition value is typed on the wire."
                          },
                          "unit": {
                            "type": "string",
                            "enum": [
                              "centavos"
                            ],
                            "description": "Present on integer money fields: the amount is in centavos."
                          },
                          "enumValues": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The allowed values, for `type: \"enum\"`."
                          },
                          "operators": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "Every operator this field accepts — a superset of `viewOperator`."
                          },
                          "viewOperator": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            },
                            "description": "The operators a filter builder should offer."
                          },
                          "viewType": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "MONEY"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "NUMBER"
                                    ]
                                  },
                                  "prefix": {
                                    "type": "string"
                                  },
                                  "suffix": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "TEXT"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "BOOLEAN"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "DATE"
                                    ]
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              },
                              {
                                "type": "object",
                                "properties": {
                                  "type": {
                                    "type": "string",
                                    "enum": [
                                      "MULTI_SELECT"
                                    ]
                                  },
                                  "options": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "label": {
                                          "type": "string",
                                          "description": "pt-BR display label."
                                        },
                                        "icon": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "label"
                                      ],
                                      "description": "One selectable value of a multi-select field."
                                    },
                                    "description": "Static options, for enum-backed fields."
                                  },
                                  "dynamicOptions": {
                                    "type": "string",
                                    "enum": [
                                      "WALLETS",
                                      "CURRENCIES",
                                      "USERS"
                                    ],
                                    "description": "Option source the client resolves itself."
                                  }
                                },
                                "required": [
                                  "type"
                                ]
                              }
                            ],
                            "description": "How to render the value input."
                          },
                          "label": {
                            "type": "string",
                            "description": "pt-BR display label."
                          },
                          "description": {
                            "type": "string",
                            "description": "pt-BR description — a tooltip for the field, including its pitfalls."
                          },
                          "availability": {
                            "type": "string",
                            "enum": [
                              "always",
                              "conditional"
                            ],
                            "description": "`always` — every transaction carries it; `conditional` — see `availabilityNote`."
                          },
                          "availabilityNote": {
                            "type": "string",
                            "description": "pt-BR — when the field is `conditional`, says under what conditions it exists."
                          },
                          "dateKind": {
                            "type": "string",
                            "enum": [
                              "CALENDAR_DATE",
                              "INSTANT",
                              "CLIENT_DAY"
                            ],
                            "description": "Only for `type: \"date\"` — which day the stored value names."
                          },
                          "customField": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string"
                              },
                              "slug": {
                                "type": "string",
                                "description": "The stable client-facing key `field` is `<entity prefix><slug>` of."
                              },
                              "type": {
                                "type": "string",
                                "description": "The identity `CustomFieldType` this row was built from."
                              },
                              "required": {
                                "type": "boolean"
                              },
                              "mask": {
                                "type": "string"
                              },
                              "entity": {
                                "type": "string",
                                "description": "Which related entity's map the value is read from — \"transaction\" is the payment's own root map."
                              },
                              "location": {
                                "type": "string",
                                "description": "The identity custom-field location this row was grounded against."
                              }
                            },
                            "required": [
                              "id",
                              "slug",
                              "type",
                              "required",
                              "entity",
                              "location"
                            ],
                            "description": "Present ONLY on a row generated per organization from a custom-field definition — never on a static catalog row. `field` is `<entity prefix><slug>`."
                          }
                        },
                        "required": [
                          "field",
                          "type",
                          "operators",
                          "viewOperator",
                          "viewType",
                          "label",
                          "description",
                          "availability"
                        ],
                        "description": "One field a SPEND_REVIEW business policy may condition on."
                      }
                    }
                  },
                  "required": [
                    "context",
                    "subjects",
                    "logic",
                    "operators",
                    "fields"
                  ],
                  "description": "`GET .../business-policies/spend-review-conditions` response."
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/policy-evaluations": {
      "post": {
        "operationId": "postRealmsByRealmIdOrganizationsByOrganizationIdPolicyEvaluations",
        "summary": "/realms/{realmId}/organizations/{organizationId}/policy-evaluations",
        "tags": [
          "Policy Evaluations"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "context": {
                    "type": "string",
                    "enum": [
                      "PAYMENT",
                      "SPEND_REVIEW",
                      "TRAVEL"
                    ]
                  },
                  "accountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "walletId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "walletName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "cardName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "subjectType": {
                    "type": "string",
                    "minLength": 1
                  },
                  "subjectId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "requester": {
                    "type": "object",
                    "properties": {
                      "userId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "email": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "userId",
                      "name",
                      "email"
                    ],
                    "additionalProperties": false
                  },
                  "body": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "context",
                  "accountId",
                  "walletId",
                  "subjectType",
                  "subjectId",
                  "requester",
                  "body"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "realmId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "context": {
                      "type": "string",
                      "enum": [
                        "PAYMENT",
                        "SPEND_REVIEW",
                        "TRAVEL"
                      ],
                      "description": "The business surface a policy governs."
                    },
                    "name": {
                      "type": "string"
                    },
                    "description": {
                      "type": "string"
                    },
                    "order": {
                      "type": "number",
                      "description": "Evaluation sorts ascending; first match wins."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "ACTIVE",
                        "DISABLED",
                        "ARCHIVED"
                      ],
                      "description": "`ARCHIVED` is a soft delete: terminal, set only through the archive endpoint, and never evaluated against a transaction."
                    },
                    "conditions": {
                      "type": "object",
                      "properties": {
                        "logic": {
                          "type": "string",
                          "enum": [
                            "AND",
                            "OR"
                          ]
                        },
                        "groups": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "logic": {
                                "type": "string",
                                "enum": [
                                  "AND",
                                  "OR"
                                ]
                              },
                              "dependsOn": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                }
                              },
                              "items": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "operator": {
                                      "type": "string",
                                      "description": "Same ConditionOperator union the security rules use (incl. LLM_EVALUATE)."
                                    },
                                    "field": {
                                      "type": "string"
                                    },
                                    "maskType": {
                                      "type": "string"
                                    },
                                    "dynamicFieldValue": {
                                      "type": "string"
                                    },
                                    "value": {}
                                  },
                                  "required": [
                                    "operator",
                                    "field"
                                  ]
                                }
                              }
                            },
                            "required": [
                              "logic",
                              "items"
                            ]
                          },
                          "description": "An EMPTY array matches unconditionally — the catch-all/default policy."
                        }
                      },
                      "required": [
                        "logic",
                        "groups"
                      ]
                    },
                    "createdAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "updatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "actions": {
                      "type": "object",
                      "properties": {
                        "hierarchy": {
                          "type": "boolean",
                          "description": "true = approvals resolve one-by-one in array order."
                        },
                        "autoAction": {
                          "type": "string",
                          "enum": [
                            "APPROVE",
                            "DENY",
                            "NONE"
                          ],
                          "description": "What happens when a policy matches:\n- `APPROVE` — allowed outright, no policy-request\n- `DENY` — refused outright\n- `NONE` — an approval flow is required (`approvals` must be non-empty)"
                        },
                        "moveBalance": {
                          "type": "object",
                          "properties": {
                            "addBalance": {
                              "type": "boolean"
                            },
                            "fromAccountId": {
                              "type": "string",
                              "description": "Required when `addBalance` is true."
                            },
                            "fromWalletId": {
                              "type": "string",
                              "description": "Required when `addBalance` is true."
                            }
                          },
                          "required": [
                            "addBalance"
                          ]
                        },
                        "approvals": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "type": {
                                "type": "string",
                                "enum": [
                                  "USER",
                                  "GROUP"
                                ]
                              },
                              "id": {
                                "type": "string",
                                "description": "userId when type=USER, identity groupId when type=GROUP."
                              },
                              "name": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "id",
                              "type"
                            ],
                            "description": "A participant as RENDERED on a read: the persisted spec plus the display name resolved at read time.\n\n`name` is never accepted on input and never persisted — a request body carrying it is rejected. It is optional on the way out: a participant whose name cannot be resolved is returned without one."
                          },
                          "description": "Non-empty when autoAction=NONE; empty/absent otherwise."
                        }
                      },
                      "required": [
                        "autoAction"
                      ],
                      "description": "Evaluation response — a **pure read**.\n\nA 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.\n\n`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`."
                    }
                  },
                  "required": [
                    "actions"
                  ]
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed",
          "request": "generated:typed",
          "note": "`.superRefine(…)` constraint not represented (runtime-dependent value)"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/policy-requests": {
      "get": {
        "operationId": "getRealmsByRealmIdOrganizationsByOrganizationIdPolicyRequests",
        "summary": "/realms/{realmId}/organizations/{organizationId}/policy-requests",
        "tags": [
          "Policy Requests"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120
            }
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "requestStatus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "REQUESTED",
                "APPROVED",
                "DENIED",
                "CANCELED",
                "EXPIRED"
              ]
            }
          },
          {
            "name": "executionStatus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "WAITING",
                "PROCESSING",
                "EXECUTED",
                "FAILED"
              ]
            }
          },
          {
            "name": "approvalStatus",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "WAITING",
                "REQUESTED",
                "APPROVED",
                "DENIED",
                "CANCELED"
              ]
            }
          },
          {
            "name": "subjectType",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "subjectId",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "approvalDeadline",
                "createdAt",
                "requester.name"
              ]
            }
          },
          {
            "name": "direction",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            }
          },
          {
            "name": "next",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "exclusiveMinimum": true,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "next": {
                      "type": "string",
                      "nullable": true
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "realmId": {
                            "type": "string"
                          },
                          "organizationId": {
                            "type": "string"
                          },
                          "accountId": {
                            "type": "string",
                            "description": "Kept from the request payload so the subject can be fulfilled later."
                          },
                          "walletId": {
                            "type": "string"
                          },
                          "walletName": {
                            "type": "string",
                            "description": "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."
                          },
                          "cardName": {
                            "type": "string",
                            "description": "Caller-supplied display name of the subject's card, snapshotted at creation like `walletName`. Present only when the subject carries a `cardId` (a SPEND_REVIEW card transaction); absent on every other subject and on requests created before the field existed."
                          },
                          "context": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "PAYMENT",
                                  "SPEND_REVIEW",
                                  "TRAVEL"
                                ],
                                "description": "The business surface a policy governs."
                              },
                              {
                                "type": "string"
                              }
                            ]
                          },
                          "subjectType": {
                            "type": "string"
                          },
                          "subjectId": {
                            "type": "string"
                          },
                          "requester": {
                            "type": "object",
                            "properties": {
                              "userId": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "email": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "userId",
                              "name",
                              "email"
                            ]
                          },
                          "body": {
                            "type": "object",
                            "additionalProperties": {},
                            "description": "Full subject entity snapshot."
                          },
                          "policyId": {
                            "type": "string",
                            "description": "The matched business policy."
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "REQUESTED",
                              "APPROVED",
                              "DENIED",
                              "CANCELED",
                              "EXPIRED"
                            ],
                            "description": "Root lifecycle: REQUESTED → APPROVED | DENIED | CANCELED | EXPIRED (terminal)."
                          },
                          "denialReason": {
                            "type": "string",
                            "description": "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."
                          },
                          "resolution": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "AUTO"
                                ],
                                "description": "How the request was resolved. `AUTO` — the matched policy approved automatically (`autoAction: \"APPROVE\"`): the request was created already APPROVED, with no approvers, and its actions were executed on creation. Absent on a request that went through an approval flow."
                              },
                              {
                                "type": "string"
                              }
                            ],
                            "description": "`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."
                          },
                          "executionMode": {
                            "anyOf": [
                              {
                                "type": "string",
                                "enum": [
                                  "MOVE_BALANCE_ONLY"
                                ],
                                "description": "Which part of the execution runs after approval. `MOVE_BALANCE_ONLY` — the policy's balance top-up runs, but the subject itself is not confirmed by the policy engine: the module that asked for the execution finalizes its own subject. Absent = the full execution (top-up, then the subject's confirm)."
                              },
                              {
                                "type": "string"
                              }
                            ],
                            "description": "`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."
                          },
                          "executionStatus": {
                            "type": "string",
                            "enum": [
                              "WAITING",
                              "PROCESSING",
                              "EXECUTED",
                              "FAILED"
                            ],
                            "description": "Runs only after the root reaches APPROVED."
                          },
                          "executionFailReason": {
                            "type": "string"
                          },
                          "approvalDeadline": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ],
                            "description": "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."
                          },
                          "executionMoveBalance": {
                            "type": "object",
                            "properties": {
                              "addBalance": {
                                "type": "boolean"
                              },
                              "fromAccountId": {
                                "type": "string",
                                "description": "Required when `addBalance` is true."
                              },
                              "fromWalletId": {
                                "type": "string",
                                "description": "Required when `addBalance` is true."
                              }
                            },
                            "required": [
                              "addBalance"
                            ],
                            "description": "Copied from the matched policy at creation."
                          },
                          "approvalHierarchy": {
                            "type": "boolean",
                            "description": "Copied from policy.actions.hierarchy."
                          },
                          "approvals": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "USER",
                                    "GROUP"
                                  ]
                                },
                                "id": {
                                  "type": "string",
                                  "description": "userId when type=USER, groupId when type=GROUP."
                                },
                                "name": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "WAITING",
                                    "REQUESTED",
                                    "APPROVED",
                                    "DENIED",
                                    "CANCELED"
                                  ],
                                  "description": "Per-approval / per-approver lifecycle."
                                },
                                "users": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "userId": {
                                        "type": "string"
                                      },
                                      "userName": {
                                        "type": "string"
                                      },
                                      "userEmail": {
                                        "type": "string"
                                      },
                                      "status": {
                                        "type": "string",
                                        "enum": [
                                          "WAITING",
                                          "REQUESTED",
                                          "APPROVED",
                                          "DENIED",
                                          "CANCELED"
                                        ],
                                        "description": "Per-approval / per-approver lifecycle."
                                      }
                                    },
                                    "required": [
                                      "userId",
                                      "userName",
                                      "userEmail",
                                      "status"
                                    ]
                                  },
                                  "description": "1 entry for USER, N for GROUP — resolved from identity at creation."
                                },
                                "createdAt": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  ]
                                },
                                "requestedAt": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  ]
                                },
                                "decisionAt": {
                                  "anyOf": [
                                    {
                                      "type": "string"
                                    },
                                    {
                                      "type": "string",
                                      "format": "date-time"
                                    }
                                  ]
                                },
                                "decisionReason": {
                                  "type": "string",
                                  "description": "Free-text justification the decision-maker supplied with their vote, alongside `decisionAt`. Optional — a caller may still decide without one."
                                }
                              },
                              "required": [
                                "type",
                                "id",
                                "name",
                                "status",
                                "users"
                              ]
                            }
                          },
                          "fundingClaimedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ],
                            "description": "When this request took responsibility for funding its subject's balance top-up. Present only on the one request per subject that holds that responsibility."
                          },
                          "fundedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ],
                            "description": "When the balance top-up for this subject actually completed. Absent while it has not completed, or when this request never moved money."
                          },
                          "fundingClaim": {
                            "type": "boolean",
                            "description": "`true` on the one request per subject responsible for funding its balance top-up. Absent otherwise."
                          },
                          "executionAttempts": {
                            "type": "number",
                            "description": "How many times the execution was retried after a transient failure that happened before any money moved. Absent when it was never retried."
                          },
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "updatedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "realmId",
                          "organizationId",
                          "accountId",
                          "walletId",
                          "context",
                          "subjectType",
                          "subjectId",
                          "requester",
                          "body",
                          "policyId",
                          "status",
                          "executionStatus",
                          "approvalDeadline",
                          "approvalHierarchy",
                          "approvals"
                        ]
                      }
                    }
                  },
                  "required": [
                    "next",
                    "items"
                  ]
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed",
          "parameters": "generated:typed",
          "note": "`.superRefine(…)` constraint not represented (runtime-dependent value)"
        }
      },
      "post": {
        "operationId": "postRealmsByRealmIdOrganizationsByOrganizationIdPolicyRequests",
        "summary": "/realms/{realmId}/organizations/{organizationId}/policy-requests",
        "tags": [
          "Policy Requests"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "context": {
                    "type": "string",
                    "enum": [
                      "PAYMENT",
                      "SPEND_REVIEW",
                      "TRAVEL"
                    ]
                  },
                  "accountId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "walletId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "walletName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "cardName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "subjectType": {
                    "type": "string",
                    "minLength": 1
                  },
                  "subjectId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "requester": {
                    "type": "object",
                    "properties": {
                      "userId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "email": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "userId",
                      "name",
                      "email"
                    ],
                    "additionalProperties": false
                  },
                  "body": {
                    "type": "object",
                    "additionalProperties": {}
                  },
                  "approvalDeadline": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "context",
                  "accountId",
                  "walletId",
                  "subjectType",
                  "subjectId",
                  "requester",
                  "body",
                  "approvalDeadline"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "realmId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "accountId": {
                      "type": "string",
                      "description": "Kept from the request payload so the subject can be fulfilled later."
                    },
                    "walletId": {
                      "type": "string"
                    },
                    "walletName": {
                      "type": "string",
                      "description": "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."
                    },
                    "cardName": {
                      "type": "string",
                      "description": "Caller-supplied display name of the subject's card, snapshotted at creation like `walletName`. Present only when the subject carries a `cardId` (a SPEND_REVIEW card transaction); absent on every other subject and on requests created before the field existed."
                    },
                    "context": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "PAYMENT",
                            "SPEND_REVIEW",
                            "TRAVEL"
                          ],
                          "description": "The business surface a policy governs."
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "subjectType": {
                      "type": "string"
                    },
                    "subjectId": {
                      "type": "string"
                    },
                    "requester": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "userId",
                        "name",
                        "email"
                      ]
                    },
                    "body": {
                      "type": "object",
                      "additionalProperties": {},
                      "description": "Full subject entity snapshot."
                    },
                    "policyId": {
                      "type": "string",
                      "description": "The matched business policy."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "REQUESTED",
                        "APPROVED",
                        "DENIED",
                        "CANCELED",
                        "EXPIRED"
                      ],
                      "description": "Root lifecycle: REQUESTED → APPROVED | DENIED | CANCELED | EXPIRED (terminal)."
                    },
                    "denialReason": {
                      "type": "string",
                      "description": "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."
                    },
                    "resolution": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "AUTO"
                          ],
                          "description": "How the request was resolved. `AUTO` — the matched policy approved automatically (`autoAction: \"APPROVE\"`): the request was created already APPROVED, with no approvers, and its actions were executed on creation. Absent on a request that went through an approval flow."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionMode": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "MOVE_BALANCE_ONLY"
                          ],
                          "description": "Which part of the execution runs after approval. `MOVE_BALANCE_ONLY` — the policy's balance top-up runs, but the subject itself is not confirmed by the policy engine: the module that asked for the execution finalizes its own subject. Absent = the full execution (top-up, then the subject's confirm)."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionStatus": {
                      "type": "string",
                      "enum": [
                        "WAITING",
                        "PROCESSING",
                        "EXECUTED",
                        "FAILED"
                      ],
                      "description": "Runs only after the root reaches APPROVED."
                    },
                    "executionFailReason": {
                      "type": "string"
                    },
                    "approvalDeadline": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "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."
                    },
                    "executionMoveBalance": {
                      "type": "object",
                      "properties": {
                        "addBalance": {
                          "type": "boolean"
                        },
                        "fromAccountId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        },
                        "fromWalletId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        }
                      },
                      "required": [
                        "addBalance"
                      ],
                      "description": "Copied from the matched policy at creation."
                    },
                    "approvalHierarchy": {
                      "type": "boolean",
                      "description": "Copied from policy.actions.hierarchy."
                    },
                    "approvals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "USER",
                              "GROUP"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "description": "userId when type=USER, groupId when type=GROUP."
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "WAITING",
                              "REQUESTED",
                              "APPROVED",
                              "DENIED",
                              "CANCELED"
                            ],
                            "description": "Per-approval / per-approver lifecycle."
                          },
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string"
                                },
                                "userName": {
                                  "type": "string"
                                },
                                "userEmail": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "WAITING",
                                    "REQUESTED",
                                    "APPROVED",
                                    "DENIED",
                                    "CANCELED"
                                  ],
                                  "description": "Per-approval / per-approver lifecycle."
                                }
                              },
                              "required": [
                                "userId",
                                "userName",
                                "userEmail",
                                "status"
                              ]
                            },
                            "description": "1 entry for USER, N for GROUP — resolved from identity at creation."
                          },
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "requestedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionReason": {
                            "type": "string",
                            "description": "Free-text justification the decision-maker supplied with their vote, alongside `decisionAt`. Optional — a caller may still decide without one."
                          }
                        },
                        "required": [
                          "type",
                          "id",
                          "name",
                          "status",
                          "users"
                        ]
                      }
                    },
                    "fundingClaimedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When this request took responsibility for funding its subject's balance top-up. Present only on the one request per subject that holds that responsibility."
                    },
                    "fundedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When the balance top-up for this subject actually completed. Absent while it has not completed, or when this request never moved money."
                    },
                    "fundingClaim": {
                      "type": "boolean",
                      "description": "`true` on the one request per subject responsible for funding its balance top-up. Absent otherwise."
                    },
                    "executionAttempts": {
                      "type": "number",
                      "description": "How many times the execution was retried after a transient failure that happened before any money moved. Absent when it was never retried."
                    },
                    "createdAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "updatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "realmId",
                    "organizationId",
                    "accountId",
                    "walletId",
                    "context",
                    "subjectType",
                    "subjectId",
                    "requester",
                    "body",
                    "policyId",
                    "status",
                    "executionStatus",
                    "approvalDeadline",
                    "approvalHierarchy",
                    "approvals"
                  ]
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed",
          "request": "generated:typed",
          "note": "`.superRefine(…)` constraint not represented (runtime-dependent value)"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}": {
      "get": {
        "operationId": "getRealmsByRealmIdOrganizationsByOrganizationIdPolicyRequestsByPolicyRequestId",
        "summary": "/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}",
        "tags": [
          "Policy Requests"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policyRequestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "realmId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "accountId": {
                      "type": "string",
                      "description": "Kept from the request payload so the subject can be fulfilled later."
                    },
                    "walletId": {
                      "type": "string"
                    },
                    "walletName": {
                      "type": "string",
                      "description": "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."
                    },
                    "cardName": {
                      "type": "string",
                      "description": "Caller-supplied display name of the subject's card, snapshotted at creation like `walletName`. Present only when the subject carries a `cardId` (a SPEND_REVIEW card transaction); absent on every other subject and on requests created before the field existed."
                    },
                    "context": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "PAYMENT",
                            "SPEND_REVIEW",
                            "TRAVEL"
                          ],
                          "description": "The business surface a policy governs."
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "subjectType": {
                      "type": "string"
                    },
                    "subjectId": {
                      "type": "string"
                    },
                    "requester": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "userId",
                        "name",
                        "email"
                      ]
                    },
                    "body": {
                      "type": "object",
                      "additionalProperties": {},
                      "description": "Full subject entity snapshot."
                    },
                    "policyId": {
                      "type": "string",
                      "description": "The matched business policy."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "REQUESTED",
                        "APPROVED",
                        "DENIED",
                        "CANCELED",
                        "EXPIRED"
                      ],
                      "description": "Root lifecycle: REQUESTED → APPROVED | DENIED | CANCELED | EXPIRED (terminal)."
                    },
                    "denialReason": {
                      "type": "string",
                      "description": "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."
                    },
                    "resolution": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "AUTO"
                          ],
                          "description": "How the request was resolved. `AUTO` — the matched policy approved automatically (`autoAction: \"APPROVE\"`): the request was created already APPROVED, with no approvers, and its actions were executed on creation. Absent on a request that went through an approval flow."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionMode": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "MOVE_BALANCE_ONLY"
                          ],
                          "description": "Which part of the execution runs after approval. `MOVE_BALANCE_ONLY` — the policy's balance top-up runs, but the subject itself is not confirmed by the policy engine: the module that asked for the execution finalizes its own subject. Absent = the full execution (top-up, then the subject's confirm)."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionStatus": {
                      "type": "string",
                      "enum": [
                        "WAITING",
                        "PROCESSING",
                        "EXECUTED",
                        "FAILED"
                      ],
                      "description": "Runs only after the root reaches APPROVED."
                    },
                    "executionFailReason": {
                      "type": "string"
                    },
                    "approvalDeadline": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "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."
                    },
                    "executionMoveBalance": {
                      "type": "object",
                      "properties": {
                        "addBalance": {
                          "type": "boolean"
                        },
                        "fromAccountId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        },
                        "fromWalletId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        }
                      },
                      "required": [
                        "addBalance"
                      ],
                      "description": "Copied from the matched policy at creation."
                    },
                    "approvalHierarchy": {
                      "type": "boolean",
                      "description": "Copied from policy.actions.hierarchy."
                    },
                    "approvals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "USER",
                              "GROUP"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "description": "userId when type=USER, groupId when type=GROUP."
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "WAITING",
                              "REQUESTED",
                              "APPROVED",
                              "DENIED",
                              "CANCELED"
                            ],
                            "description": "Per-approval / per-approver lifecycle."
                          },
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string"
                                },
                                "userName": {
                                  "type": "string"
                                },
                                "userEmail": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "WAITING",
                                    "REQUESTED",
                                    "APPROVED",
                                    "DENIED",
                                    "CANCELED"
                                  ],
                                  "description": "Per-approval / per-approver lifecycle."
                                }
                              },
                              "required": [
                                "userId",
                                "userName",
                                "userEmail",
                                "status"
                              ]
                            },
                            "description": "1 entry for USER, N for GROUP — resolved from identity at creation."
                          },
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "requestedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionReason": {
                            "type": "string",
                            "description": "Free-text justification the decision-maker supplied with their vote, alongside `decisionAt`. Optional — a caller may still decide without one."
                          }
                        },
                        "required": [
                          "type",
                          "id",
                          "name",
                          "status",
                          "users"
                        ]
                      }
                    },
                    "fundingClaimedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When this request took responsibility for funding its subject's balance top-up. Present only on the one request per subject that holds that responsibility."
                    },
                    "fundedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When the balance top-up for this subject actually completed. Absent while it has not completed, or when this request never moved money."
                    },
                    "fundingClaim": {
                      "type": "boolean",
                      "description": "`true` on the one request per subject responsible for funding its balance top-up. Absent otherwise."
                    },
                    "executionAttempts": {
                      "type": "number",
                      "description": "How many times the execution was retried after a transient failure that happened before any money moved. Absent when it was never retried."
                    },
                    "createdAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "updatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "realmId",
                    "organizationId",
                    "accountId",
                    "walletId",
                    "context",
                    "subjectType",
                    "subjectId",
                    "requester",
                    "body",
                    "policyId",
                    "status",
                    "executionStatus",
                    "approvalDeadline",
                    "approvalHierarchy",
                    "approvals"
                  ]
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/approve": {
      "post": {
        "operationId": "postRealmsByRealmIdOrganizationsByOrganizationIdPolicyRequestsByPolicyRequestIdApprove",
        "summary": "/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/approve",
        "tags": [
          "Policy Requests"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policyRequestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "realmId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "accountId": {
                      "type": "string",
                      "description": "Kept from the request payload so the subject can be fulfilled later."
                    },
                    "walletId": {
                      "type": "string"
                    },
                    "walletName": {
                      "type": "string",
                      "description": "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."
                    },
                    "cardName": {
                      "type": "string",
                      "description": "Caller-supplied display name of the subject's card, snapshotted at creation like `walletName`. Present only when the subject carries a `cardId` (a SPEND_REVIEW card transaction); absent on every other subject and on requests created before the field existed."
                    },
                    "context": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "PAYMENT",
                            "SPEND_REVIEW",
                            "TRAVEL"
                          ],
                          "description": "The business surface a policy governs."
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "subjectType": {
                      "type": "string"
                    },
                    "subjectId": {
                      "type": "string"
                    },
                    "requester": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "userId",
                        "name",
                        "email"
                      ]
                    },
                    "body": {
                      "type": "object",
                      "additionalProperties": {},
                      "description": "Full subject entity snapshot."
                    },
                    "policyId": {
                      "type": "string",
                      "description": "The matched business policy."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "REQUESTED",
                        "APPROVED",
                        "DENIED",
                        "CANCELED",
                        "EXPIRED"
                      ],
                      "description": "Root lifecycle: REQUESTED → APPROVED | DENIED | CANCELED | EXPIRED (terminal)."
                    },
                    "denialReason": {
                      "type": "string",
                      "description": "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."
                    },
                    "resolution": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "AUTO"
                          ],
                          "description": "How the request was resolved. `AUTO` — the matched policy approved automatically (`autoAction: \"APPROVE\"`): the request was created already APPROVED, with no approvers, and its actions were executed on creation. Absent on a request that went through an approval flow."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionMode": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "MOVE_BALANCE_ONLY"
                          ],
                          "description": "Which part of the execution runs after approval. `MOVE_BALANCE_ONLY` — the policy's balance top-up runs, but the subject itself is not confirmed by the policy engine: the module that asked for the execution finalizes its own subject. Absent = the full execution (top-up, then the subject's confirm)."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionStatus": {
                      "type": "string",
                      "enum": [
                        "WAITING",
                        "PROCESSING",
                        "EXECUTED",
                        "FAILED"
                      ],
                      "description": "Runs only after the root reaches APPROVED."
                    },
                    "executionFailReason": {
                      "type": "string"
                    },
                    "approvalDeadline": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "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."
                    },
                    "executionMoveBalance": {
                      "type": "object",
                      "properties": {
                        "addBalance": {
                          "type": "boolean"
                        },
                        "fromAccountId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        },
                        "fromWalletId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        }
                      },
                      "required": [
                        "addBalance"
                      ],
                      "description": "Copied from the matched policy at creation."
                    },
                    "approvalHierarchy": {
                      "type": "boolean",
                      "description": "Copied from policy.actions.hierarchy."
                    },
                    "approvals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "USER",
                              "GROUP"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "description": "userId when type=USER, groupId when type=GROUP."
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "WAITING",
                              "REQUESTED",
                              "APPROVED",
                              "DENIED",
                              "CANCELED"
                            ],
                            "description": "Per-approval / per-approver lifecycle."
                          },
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string"
                                },
                                "userName": {
                                  "type": "string"
                                },
                                "userEmail": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "WAITING",
                                    "REQUESTED",
                                    "APPROVED",
                                    "DENIED",
                                    "CANCELED"
                                  ],
                                  "description": "Per-approval / per-approver lifecycle."
                                }
                              },
                              "required": [
                                "userId",
                                "userName",
                                "userEmail",
                                "status"
                              ]
                            },
                            "description": "1 entry for USER, N for GROUP — resolved from identity at creation."
                          },
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "requestedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionReason": {
                            "type": "string",
                            "description": "Free-text justification the decision-maker supplied with their vote, alongside `decisionAt`. Optional — a caller may still decide without one."
                          }
                        },
                        "required": [
                          "type",
                          "id",
                          "name",
                          "status",
                          "users"
                        ]
                      }
                    },
                    "fundingClaimedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When this request took responsibility for funding its subject's balance top-up. Present only on the one request per subject that holds that responsibility."
                    },
                    "fundedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When the balance top-up for this subject actually completed. Absent while it has not completed, or when this request never moved money."
                    },
                    "fundingClaim": {
                      "type": "boolean",
                      "description": "`true` on the one request per subject responsible for funding its balance top-up. Absent otherwise."
                    },
                    "executionAttempts": {
                      "type": "number",
                      "description": "How many times the execution was retried after a transient failure that happened before any money moved. Absent when it was never retried."
                    },
                    "createdAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "updatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "realmId",
                    "organizationId",
                    "accountId",
                    "walletId",
                    "context",
                    "subjectType",
                    "subjectId",
                    "requester",
                    "body",
                    "policyId",
                    "status",
                    "executionStatus",
                    "approvalDeadline",
                    "approvalHierarchy",
                    "approvals"
                  ]
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/cancel": {
      "post": {
        "operationId": "postRealmsByRealmIdOrganizationsByOrganizationIdPolicyRequestsByPolicyRequestIdCancel",
        "summary": "/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/cancel",
        "tags": [
          "Policy Requests"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policyRequestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "realmId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "accountId": {
                      "type": "string",
                      "description": "Kept from the request payload so the subject can be fulfilled later."
                    },
                    "walletId": {
                      "type": "string"
                    },
                    "walletName": {
                      "type": "string",
                      "description": "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."
                    },
                    "cardName": {
                      "type": "string",
                      "description": "Caller-supplied display name of the subject's card, snapshotted at creation like `walletName`. Present only when the subject carries a `cardId` (a SPEND_REVIEW card transaction); absent on every other subject and on requests created before the field existed."
                    },
                    "context": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "PAYMENT",
                            "SPEND_REVIEW",
                            "TRAVEL"
                          ],
                          "description": "The business surface a policy governs."
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "subjectType": {
                      "type": "string"
                    },
                    "subjectId": {
                      "type": "string"
                    },
                    "requester": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "userId",
                        "name",
                        "email"
                      ]
                    },
                    "body": {
                      "type": "object",
                      "additionalProperties": {},
                      "description": "Full subject entity snapshot."
                    },
                    "policyId": {
                      "type": "string",
                      "description": "The matched business policy."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "REQUESTED",
                        "APPROVED",
                        "DENIED",
                        "CANCELED",
                        "EXPIRED"
                      ],
                      "description": "Root lifecycle: REQUESTED → APPROVED | DENIED | CANCELED | EXPIRED (terminal)."
                    },
                    "denialReason": {
                      "type": "string",
                      "description": "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."
                    },
                    "resolution": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "AUTO"
                          ],
                          "description": "How the request was resolved. `AUTO` — the matched policy approved automatically (`autoAction: \"APPROVE\"`): the request was created already APPROVED, with no approvers, and its actions were executed on creation. Absent on a request that went through an approval flow."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionMode": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "MOVE_BALANCE_ONLY"
                          ],
                          "description": "Which part of the execution runs after approval. `MOVE_BALANCE_ONLY` — the policy's balance top-up runs, but the subject itself is not confirmed by the policy engine: the module that asked for the execution finalizes its own subject. Absent = the full execution (top-up, then the subject's confirm)."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionStatus": {
                      "type": "string",
                      "enum": [
                        "WAITING",
                        "PROCESSING",
                        "EXECUTED",
                        "FAILED"
                      ],
                      "description": "Runs only after the root reaches APPROVED."
                    },
                    "executionFailReason": {
                      "type": "string"
                    },
                    "approvalDeadline": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "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."
                    },
                    "executionMoveBalance": {
                      "type": "object",
                      "properties": {
                        "addBalance": {
                          "type": "boolean"
                        },
                        "fromAccountId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        },
                        "fromWalletId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        }
                      },
                      "required": [
                        "addBalance"
                      ],
                      "description": "Copied from the matched policy at creation."
                    },
                    "approvalHierarchy": {
                      "type": "boolean",
                      "description": "Copied from policy.actions.hierarchy."
                    },
                    "approvals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "USER",
                              "GROUP"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "description": "userId when type=USER, groupId when type=GROUP."
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "WAITING",
                              "REQUESTED",
                              "APPROVED",
                              "DENIED",
                              "CANCELED"
                            ],
                            "description": "Per-approval / per-approver lifecycle."
                          },
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string"
                                },
                                "userName": {
                                  "type": "string"
                                },
                                "userEmail": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "WAITING",
                                    "REQUESTED",
                                    "APPROVED",
                                    "DENIED",
                                    "CANCELED"
                                  ],
                                  "description": "Per-approval / per-approver lifecycle."
                                }
                              },
                              "required": [
                                "userId",
                                "userName",
                                "userEmail",
                                "status"
                              ]
                            },
                            "description": "1 entry for USER, N for GROUP — resolved from identity at creation."
                          },
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "requestedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionReason": {
                            "type": "string",
                            "description": "Free-text justification the decision-maker supplied with their vote, alongside `decisionAt`. Optional — a caller may still decide without one."
                          }
                        },
                        "required": [
                          "type",
                          "id",
                          "name",
                          "status",
                          "users"
                        ]
                      }
                    },
                    "fundingClaimedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When this request took responsibility for funding its subject's balance top-up. Present only on the one request per subject that holds that responsibility."
                    },
                    "fundedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When the balance top-up for this subject actually completed. Absent while it has not completed, or when this request never moved money."
                    },
                    "fundingClaim": {
                      "type": "boolean",
                      "description": "`true` on the one request per subject responsible for funding its balance top-up. Absent otherwise."
                    },
                    "executionAttempts": {
                      "type": "number",
                      "description": "How many times the execution was retried after a transient failure that happened before any money moved. Absent when it was never retried."
                    },
                    "createdAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "updatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "realmId",
                    "organizationId",
                    "accountId",
                    "walletId",
                    "context",
                    "subjectType",
                    "subjectId",
                    "requester",
                    "body",
                    "policyId",
                    "status",
                    "executionStatus",
                    "approvalDeadline",
                    "approvalHierarchy",
                    "approvals"
                  ]
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/deny": {
      "post": {
        "operationId": "postRealmsByRealmIdOrganizationsByOrganizationIdPolicyRequestsByPolicyRequestIdDeny",
        "summary": "/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/deny",
        "tags": [
          "Policy Requests"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policyRequestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "realmId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "accountId": {
                      "type": "string",
                      "description": "Kept from the request payload so the subject can be fulfilled later."
                    },
                    "walletId": {
                      "type": "string"
                    },
                    "walletName": {
                      "type": "string",
                      "description": "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."
                    },
                    "cardName": {
                      "type": "string",
                      "description": "Caller-supplied display name of the subject's card, snapshotted at creation like `walletName`. Present only when the subject carries a `cardId` (a SPEND_REVIEW card transaction); absent on every other subject and on requests created before the field existed."
                    },
                    "context": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "PAYMENT",
                            "SPEND_REVIEW",
                            "TRAVEL"
                          ],
                          "description": "The business surface a policy governs."
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "subjectType": {
                      "type": "string"
                    },
                    "subjectId": {
                      "type": "string"
                    },
                    "requester": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "userId",
                        "name",
                        "email"
                      ]
                    },
                    "body": {
                      "type": "object",
                      "additionalProperties": {},
                      "description": "Full subject entity snapshot."
                    },
                    "policyId": {
                      "type": "string",
                      "description": "The matched business policy."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "REQUESTED",
                        "APPROVED",
                        "DENIED",
                        "CANCELED",
                        "EXPIRED"
                      ],
                      "description": "Root lifecycle: REQUESTED → APPROVED | DENIED | CANCELED | EXPIRED (terminal)."
                    },
                    "denialReason": {
                      "type": "string",
                      "description": "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."
                    },
                    "resolution": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "AUTO"
                          ],
                          "description": "How the request was resolved. `AUTO` — the matched policy approved automatically (`autoAction: \"APPROVE\"`): the request was created already APPROVED, with no approvers, and its actions were executed on creation. Absent on a request that went through an approval flow."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionMode": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "MOVE_BALANCE_ONLY"
                          ],
                          "description": "Which part of the execution runs after approval. `MOVE_BALANCE_ONLY` — the policy's balance top-up runs, but the subject itself is not confirmed by the policy engine: the module that asked for the execution finalizes its own subject. Absent = the full execution (top-up, then the subject's confirm)."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionStatus": {
                      "type": "string",
                      "enum": [
                        "WAITING",
                        "PROCESSING",
                        "EXECUTED",
                        "FAILED"
                      ],
                      "description": "Runs only after the root reaches APPROVED."
                    },
                    "executionFailReason": {
                      "type": "string"
                    },
                    "approvalDeadline": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "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."
                    },
                    "executionMoveBalance": {
                      "type": "object",
                      "properties": {
                        "addBalance": {
                          "type": "boolean"
                        },
                        "fromAccountId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        },
                        "fromWalletId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        }
                      },
                      "required": [
                        "addBalance"
                      ],
                      "description": "Copied from the matched policy at creation."
                    },
                    "approvalHierarchy": {
                      "type": "boolean",
                      "description": "Copied from policy.actions.hierarchy."
                    },
                    "approvals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "USER",
                              "GROUP"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "description": "userId when type=USER, groupId when type=GROUP."
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "WAITING",
                              "REQUESTED",
                              "APPROVED",
                              "DENIED",
                              "CANCELED"
                            ],
                            "description": "Per-approval / per-approver lifecycle."
                          },
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string"
                                },
                                "userName": {
                                  "type": "string"
                                },
                                "userEmail": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "WAITING",
                                    "REQUESTED",
                                    "APPROVED",
                                    "DENIED",
                                    "CANCELED"
                                  ],
                                  "description": "Per-approval / per-approver lifecycle."
                                }
                              },
                              "required": [
                                "userId",
                                "userName",
                                "userEmail",
                                "status"
                              ]
                            },
                            "description": "1 entry for USER, N for GROUP — resolved from identity at creation."
                          },
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "requestedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionReason": {
                            "type": "string",
                            "description": "Free-text justification the decision-maker supplied with their vote, alongside `decisionAt`. Optional — a caller may still decide without one."
                          }
                        },
                        "required": [
                          "type",
                          "id",
                          "name",
                          "status",
                          "users"
                        ]
                      }
                    },
                    "fundingClaimedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When this request took responsibility for funding its subject's balance top-up. Present only on the one request per subject that holds that responsibility."
                    },
                    "fundedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When the balance top-up for this subject actually completed. Absent while it has not completed, or when this request never moved money."
                    },
                    "fundingClaim": {
                      "type": "boolean",
                      "description": "`true` on the one request per subject responsible for funding its balance top-up. Absent otherwise."
                    },
                    "executionAttempts": {
                      "type": "number",
                      "description": "How many times the execution was retried after a transient failure that happened before any money moved. Absent when it was never retried."
                    },
                    "createdAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "updatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "realmId",
                    "organizationId",
                    "accountId",
                    "walletId",
                    "context",
                    "subjectType",
                    "subjectId",
                    "requester",
                    "body",
                    "policyId",
                    "status",
                    "executionStatus",
                    "approvalDeadline",
                    "approvalHierarchy",
                    "approvals"
                  ]
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed",
          "request": "generated:typed"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/force-approve": {
      "post": {
        "operationId": "postRealmsByRealmIdOrganizationsByOrganizationIdPolicyRequestsByPolicyRequestIdForceApprove",
        "summary": "/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/force-approve",
        "tags": [
          "Policy Requests"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policyRequestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "realmId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "accountId": {
                      "type": "string",
                      "description": "Kept from the request payload so the subject can be fulfilled later."
                    },
                    "walletId": {
                      "type": "string"
                    },
                    "walletName": {
                      "type": "string",
                      "description": "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."
                    },
                    "cardName": {
                      "type": "string",
                      "description": "Caller-supplied display name of the subject's card, snapshotted at creation like `walletName`. Present only when the subject carries a `cardId` (a SPEND_REVIEW card transaction); absent on every other subject and on requests created before the field existed."
                    },
                    "context": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "PAYMENT",
                            "SPEND_REVIEW",
                            "TRAVEL"
                          ],
                          "description": "The business surface a policy governs."
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "subjectType": {
                      "type": "string"
                    },
                    "subjectId": {
                      "type": "string"
                    },
                    "requester": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "userId",
                        "name",
                        "email"
                      ]
                    },
                    "body": {
                      "type": "object",
                      "additionalProperties": {},
                      "description": "Full subject entity snapshot."
                    },
                    "policyId": {
                      "type": "string",
                      "description": "The matched business policy."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "REQUESTED",
                        "APPROVED",
                        "DENIED",
                        "CANCELED",
                        "EXPIRED"
                      ],
                      "description": "Root lifecycle: REQUESTED → APPROVED | DENIED | CANCELED | EXPIRED (terminal)."
                    },
                    "denialReason": {
                      "type": "string",
                      "description": "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."
                    },
                    "resolution": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "AUTO"
                          ],
                          "description": "How the request was resolved. `AUTO` — the matched policy approved automatically (`autoAction: \"APPROVE\"`): the request was created already APPROVED, with no approvers, and its actions were executed on creation. Absent on a request that went through an approval flow."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionMode": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "MOVE_BALANCE_ONLY"
                          ],
                          "description": "Which part of the execution runs after approval. `MOVE_BALANCE_ONLY` — the policy's balance top-up runs, but the subject itself is not confirmed by the policy engine: the module that asked for the execution finalizes its own subject. Absent = the full execution (top-up, then the subject's confirm)."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionStatus": {
                      "type": "string",
                      "enum": [
                        "WAITING",
                        "PROCESSING",
                        "EXECUTED",
                        "FAILED"
                      ],
                      "description": "Runs only after the root reaches APPROVED."
                    },
                    "executionFailReason": {
                      "type": "string"
                    },
                    "approvalDeadline": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "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."
                    },
                    "executionMoveBalance": {
                      "type": "object",
                      "properties": {
                        "addBalance": {
                          "type": "boolean"
                        },
                        "fromAccountId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        },
                        "fromWalletId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        }
                      },
                      "required": [
                        "addBalance"
                      ],
                      "description": "Copied from the matched policy at creation."
                    },
                    "approvalHierarchy": {
                      "type": "boolean",
                      "description": "Copied from policy.actions.hierarchy."
                    },
                    "approvals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "USER",
                              "GROUP"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "description": "userId when type=USER, groupId when type=GROUP."
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "WAITING",
                              "REQUESTED",
                              "APPROVED",
                              "DENIED",
                              "CANCELED"
                            ],
                            "description": "Per-approval / per-approver lifecycle."
                          },
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string"
                                },
                                "userName": {
                                  "type": "string"
                                },
                                "userEmail": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "WAITING",
                                    "REQUESTED",
                                    "APPROVED",
                                    "DENIED",
                                    "CANCELED"
                                  ],
                                  "description": "Per-approval / per-approver lifecycle."
                                }
                              },
                              "required": [
                                "userId",
                                "userName",
                                "userEmail",
                                "status"
                              ]
                            },
                            "description": "1 entry for USER, N for GROUP — resolved from identity at creation."
                          },
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "requestedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionReason": {
                            "type": "string",
                            "description": "Free-text justification the decision-maker supplied with their vote, alongside `decisionAt`. Optional — a caller may still decide without one."
                          }
                        },
                        "required": [
                          "type",
                          "id",
                          "name",
                          "status",
                          "users"
                        ]
                      }
                    },
                    "fundingClaimedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When this request took responsibility for funding its subject's balance top-up. Present only on the one request per subject that holds that responsibility."
                    },
                    "fundedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When the balance top-up for this subject actually completed. Absent while it has not completed, or when this request never moved money."
                    },
                    "fundingClaim": {
                      "type": "boolean",
                      "description": "`true` on the one request per subject responsible for funding its balance top-up. Absent otherwise."
                    },
                    "executionAttempts": {
                      "type": "number",
                      "description": "How many times the execution was retried after a transient failure that happened before any money moved. Absent when it was never retried."
                    },
                    "createdAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "updatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "realmId",
                    "organizationId",
                    "accountId",
                    "walletId",
                    "context",
                    "subjectType",
                    "subjectId",
                    "requester",
                    "body",
                    "policyId",
                    "status",
                    "executionStatus",
                    "approvalDeadline",
                    "approvalHierarchy",
                    "approvals"
                  ]
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed",
          "request": "generated:typed"
        }
      }
    },
    "/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/force-deny": {
      "post": {
        "operationId": "postRealmsByRealmIdOrganizationsByOrganizationIdPolicyRequestsByPolicyRequestIdForceDeny",
        "summary": "/realms/{realmId}/organizations/{organizationId}/policy-requests/{policyRequestId}/force-deny",
        "tags": [
          "Policy Requests"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "organizationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "policyRequestId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 500
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "realmId": {
                      "type": "string"
                    },
                    "organizationId": {
                      "type": "string"
                    },
                    "accountId": {
                      "type": "string",
                      "description": "Kept from the request payload so the subject can be fulfilled later."
                    },
                    "walletId": {
                      "type": "string"
                    },
                    "walletName": {
                      "type": "string",
                      "description": "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."
                    },
                    "cardName": {
                      "type": "string",
                      "description": "Caller-supplied display name of the subject's card, snapshotted at creation like `walletName`. Present only when the subject carries a `cardId` (a SPEND_REVIEW card transaction); absent on every other subject and on requests created before the field existed."
                    },
                    "context": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "PAYMENT",
                            "SPEND_REVIEW",
                            "TRAVEL"
                          ],
                          "description": "The business surface a policy governs."
                        },
                        {
                          "type": "string"
                        }
                      ]
                    },
                    "subjectType": {
                      "type": "string"
                    },
                    "subjectId": {
                      "type": "string"
                    },
                    "requester": {
                      "type": "object",
                      "properties": {
                        "userId": {
                          "type": "string"
                        },
                        "name": {
                          "type": "string"
                        },
                        "email": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "userId",
                        "name",
                        "email"
                      ]
                    },
                    "body": {
                      "type": "object",
                      "additionalProperties": {},
                      "description": "Full subject entity snapshot."
                    },
                    "policyId": {
                      "type": "string",
                      "description": "The matched business policy."
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "REQUESTED",
                        "APPROVED",
                        "DENIED",
                        "CANCELED",
                        "EXPIRED"
                      ],
                      "description": "Root lifecycle: REQUESTED → APPROVED | DENIED | CANCELED | EXPIRED (terminal)."
                    },
                    "denialReason": {
                      "type": "string",
                      "description": "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."
                    },
                    "resolution": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "AUTO"
                          ],
                          "description": "How the request was resolved. `AUTO` — the matched policy approved automatically (`autoAction: \"APPROVE\"`): the request was created already APPROVED, with no approvers, and its actions were executed on creation. Absent on a request that went through an approval flow."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionMode": {
                      "anyOf": [
                        {
                          "type": "string",
                          "enum": [
                            "MOVE_BALANCE_ONLY"
                          ],
                          "description": "Which part of the execution runs after approval. `MOVE_BALANCE_ONLY` — the policy's balance top-up runs, but the subject itself is not confirmed by the policy engine: the module that asked for the execution finalizes its own subject. Absent = the full execution (top-up, then the subject's confirm)."
                        },
                        {
                          "type": "string"
                        }
                      ],
                      "description": "`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."
                    },
                    "executionStatus": {
                      "type": "string",
                      "enum": [
                        "WAITING",
                        "PROCESSING",
                        "EXECUTED",
                        "FAILED"
                      ],
                      "description": "Runs only after the root reaches APPROVED."
                    },
                    "executionFailReason": {
                      "type": "string"
                    },
                    "approvalDeadline": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "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."
                    },
                    "executionMoveBalance": {
                      "type": "object",
                      "properties": {
                        "addBalance": {
                          "type": "boolean"
                        },
                        "fromAccountId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        },
                        "fromWalletId": {
                          "type": "string",
                          "description": "Required when `addBalance` is true."
                        }
                      },
                      "required": [
                        "addBalance"
                      ],
                      "description": "Copied from the matched policy at creation."
                    },
                    "approvalHierarchy": {
                      "type": "boolean",
                      "description": "Copied from policy.actions.hierarchy."
                    },
                    "approvals": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "enum": [
                              "USER",
                              "GROUP"
                            ]
                          },
                          "id": {
                            "type": "string",
                            "description": "userId when type=USER, groupId when type=GROUP."
                          },
                          "name": {
                            "type": "string"
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "WAITING",
                              "REQUESTED",
                              "APPROVED",
                              "DENIED",
                              "CANCELED"
                            ],
                            "description": "Per-approval / per-approver lifecycle."
                          },
                          "users": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "userId": {
                                  "type": "string"
                                },
                                "userName": {
                                  "type": "string"
                                },
                                "userEmail": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "WAITING",
                                    "REQUESTED",
                                    "APPROVED",
                                    "DENIED",
                                    "CANCELED"
                                  ],
                                  "description": "Per-approval / per-approver lifecycle."
                                }
                              },
                              "required": [
                                "userId",
                                "userName",
                                "userEmail",
                                "status"
                              ]
                            },
                            "description": "1 entry for USER, N for GROUP — resolved from identity at creation."
                          },
                          "createdAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "requestedAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionAt": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "string",
                                "format": "date-time"
                              }
                            ]
                          },
                          "decisionReason": {
                            "type": "string",
                            "description": "Free-text justification the decision-maker supplied with their vote, alongside `decisionAt`. Optional — a caller may still decide without one."
                          }
                        },
                        "required": [
                          "type",
                          "id",
                          "name",
                          "status",
                          "users"
                        ]
                      }
                    },
                    "fundingClaimedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When this request took responsibility for funding its subject's balance top-up. Present only on the one request per subject that holds that responsibility."
                    },
                    "fundedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ],
                      "description": "When the balance top-up for this subject actually completed. Absent while it has not completed, or when this request never moved money."
                    },
                    "fundingClaim": {
                      "type": "boolean",
                      "description": "`true` on the one request per subject responsible for funding its balance top-up. Absent otherwise."
                    },
                    "executionAttempts": {
                      "type": "number",
                      "description": "How many times the execution was retried after a transient failure that happened before any money moved. Absent when it was never retried."
                    },
                    "createdAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    },
                    "updatedAt": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "string",
                          "format": "date-time"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "realmId",
                    "organizationId",
                    "accountId",
                    "walletId",
                    "context",
                    "subjectType",
                    "subjectId",
                    "requester",
                    "body",
                    "policyId",
                    "status",
                    "executionStatus",
                    "approvalDeadline",
                    "approvalHierarchy",
                    "approvals"
                  ]
                }
              }
            }
          }
        },
        "x-p3-confidence": {
          "response": "generated:typed",
          "request": "generated:typed"
        }
      }
    }
  }
}
