APG PayAPG Paydocs

Reference data

Get rule policy

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

Return one rule policy as its current version holds it, with its rule.

Permissions

Required permission
rules:query

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

Path parameters

rulePolicyIdstring
required

Responses

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

Discriminated by type
type = "RpolViewAttributes"
rulePolicyIdRpolIdrequired

Identifier of a rule policy.

Example rpol_9f2Kd8QpLzXw

domainstringrequired

The area the rule belongs to, as ruleAreaId names it.

stateRpolStaterequired

The state of the current version.

DraftPendingApprovalApprovedRejectedUnknown
modeRpolModerequired
ShadowEnforcingUnknown
pausedbooleanrequired

Whether the rule is switched off without being retired.

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

The version of its template the rule was made with, which it keeps for as long as the policy holds it.

Example 1250

descriptionstring
versioninteger (int32)required

The current version, which a change names as expectedVersion.

Example 1250

effectiveFromstring (date-time)required

When the rule takes effect.

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

effectiveUntilstring (date-time)

When the rule stops taking effect. Absent for one that does not.

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

retiredAtstring (date-time)

When the rule was retired. Absent for one that is not.

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

createdAtstring (date-time)required

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

createdBystringrequired

Who made the policy, keyed as a person or an API key is: user_ or staff_ or key_, and an id.

updatedAtstring (date-time)required

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

updatedBystringrequired

Who made the current version.

approvedBystring
approvedAtstring (date-time)

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

rejectedBystring
rejectedAtstring (date-time)

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

Example
{
  "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