APG PayAPG Paydocs

Reference data

Update rule policy

PATCH/rule-policies/{rulePolicyId}

Make the next version of a policy, or take a step of the maker and checker flow: submit, approve or reject a version, pause, resume or retire the rule.

9 actionsRpolUpdateApproveRpolUpdatePauseRpolUpdateRejectRpolUpdateResumeRpolUpdateRetireRpolUpdateReviseRpolUpdateRollBackRpolUpdateSetModeRpolUpdateSubmit

Permissions

Required permission
rules:update

Requires the `update` action on `rules` for the supplied runtime context

Path parameters

rulePolicyIdstring
required

Request body

This body is a typed union. Pick a variant to see its fields and a matching example.

Discriminated by type
type = "RpolUpdateApprove"
expectedVersioninteger (int32)required

Example 1250

reasonCodeRpolReasonrequired
NewTypologyTuningRegulatoryChangeIncidentResponseCorrectionRollbackScheduledReviewImportUnknown
reasonstring

Example Requested by the customer.

curl -X PATCH https://api.tst.au.apgpay.dev/rule-policies/{rulePolicyId} \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "RpolUpdateApprove",
  "expectedVersion": 1250,
  "reasonCode": "NewTypology",
  "reason": "Requested by the customer."
}'

Responses

The response is a tagged shape: type is always "RpolUpdateRspAttributes". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "RpolUpdateRspAttributes"

The resource as it stands after the change.

Example
{
  "type": "RpolUpdateRspAttributes",
  "updated": {
    "type": "RpolViewAttributes",
    "rulePolicyId": "rpol_9f2Kd8QpLzXw",
    "domain": "string",
    "owner": {
      "type": "RpolOwnerEnterprise",
      "enterpriseId": "ent_9f2Kd8QpLzXw"
    },
    "state": "Draft",
    "mode": "Shadow",
    "paused": true,
    "rule": {
      "type": "RpolRuleAttributes",
      "templateId": "string",
      "arguments": [
        {
          "type": "RpolArgumentAttributes",
          "parameterId": "string",
          "value": {
            "type": "RpolValueAmount",
            "amount": {
              "type": "IsoCurrencyAmount",
              "minorCurrencyUnits": 1250,
              "currency": "AUD"
            }
          }
        }
      ],
      "action": {
        "type": "RpolActionAttributes",
        "name": "Ada Lovelace"
      }
    },
    "templateVersion": 1250,
    "description": "string",
    "version": 1250,
    "effectiveFrom": "2026-08-19T04:21:07Z",
    "effectiveUntil": "2026-08-19T04:21:07Z",
    "retiredAt": "2026-08-19T04:21:07Z",
    "createdAt": "2026-08-19T04:21:07Z",
    "createdBy": "string",
    "updatedAt": "2026-08-19T04:21:07Z",
    "updatedBy": "string",
    "approvedBy": "string",
    "approvedAt": "2026-08-19T04:21:07Z",
    "rejectedBy": "string",
    "rejectedAt": "2026-08-19T04:21:07Z"
  }
}

Error responses