APG PayAPG Paydocs

Reference data

Get rule policy version

GET/rule-policies/{rulePolicyId}/versions/{versionId}
Request
GEThttps://api.tst.au.apgpay.dev/rule-policies/{rulePolicyId}/versions/{versionId}
curl -X GET https://api.tst.au.apgpay.dev/rule-policies/{rulePolicyId}/versions/{versionId} \
  -H "Authorization: Bearer $API_KEY"

Return one version of a policy with the rule it held. A version that does not belong to this rulePolicy is a 404, not a redirect.

Permissions

Required permission
rules:query

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

Path parameters

rulePolicyIdstring
required
versionIdinteger (int32)
required

Responses

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

Discriminated by type
type = "RpolVersionAttributes"
versioninteger (int32)required

The version's number, from 1.

Example 1250

stateRpolStaterequired
DraftPendingApprovalApprovedRejectedUnknown
modeRpolModerequired
ShadowEnforcingUnknown
pausedbooleanrequired

Example true

A rule: the template it is made from, and the value of each of the template's parameters. A parameter left out takes the template's default. The action is the one the template and its values take, so it is returned and never sent.

templateVersioninteger (int32)required

Example 1250

descriptionstring
effectiveFromstring (date-time)required

Example 2026-08-19T04:21:07Z

effectiveUntilstring (date-time)

Example 2026-08-19T04:21:07Z

retiredAtstring (date-time)

Example 2026-08-19T04:21:07Z

changeRpolChangerequired

What the version changed.

CreatedUpdatedPausedResumedRetiredRolledBackSubmittedApprovedRejectedUnknown
reasonCodeRpolReasonrequired
NewTypologyTuningRegulatoryChangeIncidentResponseCorrectionRollbackScheduledReviewImportUnknown
reasonstring

Example Requested by the customer.

changedBystringrequired
changedAtstring (date-time)required

Example 2026-08-19T04:21:07Z

approvedBystring
approvedAtstring (date-time)

Example 2026-08-19T04:21:07Z

rejectedBystring
rejectedAtstring (date-time)

Example 2026-08-19T04:21:07Z

Example
{
  "type": "RpolVersionAttributes",
  "version": 1250,
  "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",
  "effectiveFrom": "2026-08-19T04:21:07Z",
  "effectiveUntil": "2026-08-19T04:21:07Z",
  "retiredAt": "2026-08-19T04:21:07Z",
  "change": "Created",
  "reasonCode": "NewTypology",
  "reason": "Requested by the customer.",
  "changedBy": "string",
  "changedAt": "2026-08-19T04:21:07Z",
  "approvedBy": "string",
  "approvedAt": "2026-08-19T04:21:07Z",
  "rejectedBy": "string",
  "rejectedAt": "2026-08-19T04:21:07Z"
}

Error responses