APG PayAPG Paydocs

Reference data

List rule areas

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

Return every rule area the platform has registered, each with what it offers.

Permissions

Required permission
rules:query

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

Query parameters

pageinteger (int32)

1-based page number.

limitinteger (int32)

Maximum items per page.

columnsarray of RareaColumn

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

Responses

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

Discriminated by type
type = "RareaPageAttributes"
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": "RareaPageAttributes",
  "data": [
    {
      "type": "RareaViewAttributes",
      "ruleAreaId": "string",
      "templates": [
        {
          "type": "RareaTemplateAttributes",
          "templateId": "string",
          "templateVersion": 1250,
          "name": "Ada Lovelace",
          "description": "string",
          "parameters": [
            {
              "type": "RareaParameterAttributes",
              "parameterId": "string",
              "label": "string",
              "valueType": "string",
              "required": true,
              "default": {
                "type": "RpolValueAmount",
                "amount": {
                  "type": "IsoCurrencyAmount",
                  "minorCurrencyUnits": 1250,
                  "currency": "AUD"
                }
              },
              "bounds": [
                {
                  "type": "RareaBoundAtLeast",
                  "min": 12.5
                }
              ],
              "listKind": "string"
            }
          ],
          "presets": [
            {
              "type": "RareaPresetAttributes",
              "name": "Ada Lovelace",
              "arguments": [
                {
                  "type": "RpolArgumentAttributes",
                  "parameterId": "string",
                  "value": {
                    "type": "RpolValueAmount",
                    "amount": {
                      "type": "IsoCurrencyAmount",
                      "minorCurrencyUnits": 1250,
                      "currency": "AUD"
                    }
                  }
                }
              ]
            }
          ],
          "actions": [
            "string"
          ]
        }
      ],
      "fields": [
        {
          "type": "RareaFieldAttributes",
          "name": "Ada Lovelace",
          "valueType": "string",
          "operators": [
            {
              "type": "RareaOperatorAttributes",
              "name": "Ada Lovelace",
              "symbol": "string",
              "description": "string"
            }
          ],
          "sensitivity": "Plain"
        }
      ],
      "actions": [
        {
          "type": "RareaActionAttributes",
          "name": "Ada Lovelace",
          "label": "string",
          "parameters": [
            {
              "type": "RareaActionParameterAttributes",
              "parameterId": "string",
              "label": "string",
              "valueType": "string",
              "options": [
                "string"
              ],
              "required": true,
              "default": {
                "type": "RpolValueAmount",
                "amount": {
                  "type": "IsoCurrencyAmount",
                  "minorCurrencyUnits": 1250,
                  "currency": "AUD"
                }
              }
            }
          ]
        }
      ],
      "listKinds": [
        "string"
      ]
    }
  ],
  "hasMore": true,
  "nextStartingAfter": "string",
  "totalCount": 42,
  "page": 1250,
  "totalPages": 1250
}

Error responses