APG PayAPG Paydocs

Reference data

List rule policies

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

Return a page of the policies the caller may see in one area, newest change first, optionally only one owner's and only those in one state. Walk the pages with page, or pass nextStartingAfter back as startingAfter.

Permissions

Required permission
rules:query

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

Query parameters

pageinteger (int32)

Offset pagination: 1-based page number. Mutually exclusive with the cursor parameters.

startingAfterstring

Cursor pagination, moving forward: the id of the last item on the current page. Mutually exclusive with page.

endingBeforestring

Cursor pagination, moving backward: the id of the first item on the current page. Mutually exclusive with page.

limitinteger (int32)

Maximum items per page.

columnsarray of RpolColumn

Columns to include, in order, when asking for text/csv. Omit for all of them. Sending it with application/json is a 400.

domainstring
required

The area whose policies are listed, as ruleAreaId names it.

ownerTypeRpolOwnerType

Only the policies this tenant owns, named with ownerId. Absent for every owner the caller may see.

PlatformEnterpriseMarketplaceMerchantUnknown
ownerIdstring

The id of the owner ownerType names. Absent for the platform.

stateRpolState

Only the policies whose current version is in this state.

DraftPendingApprovalApprovedRejectedUnknown

Responses

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

Discriminated by type
type = "RpolPageAttributes"
hasMorebooleanrequired

Whether further items exist after this page.

Example true

nextStartingAfterstring

Id to pass as startingAfter to fetch the next page. Present in cursor mode only.

totalCountinteger (int64)

Total items matching the query.

Example 42

pageinteger (int32)

The 1-based page returned. Present in offset mode only.

Example 1250

totalPagesinteger (int32)

Total pages available. Present in offset mode only.

Example 1250

Example
{
  "type": "RpolPageAttributes",
  "data": [
    {
      "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"
    }
  ],
  "hasMore": true,
  "nextStartingAfter": "string",
  "totalCount": 42,
  "page": 1250,
  "totalPages": 1250
}

Error responses