List rule policies
/rule-policiescurl -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
rules:queryRequires 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.
startingAfterstringCursor pagination, moving forward: the id of the last item on the current page. Mutually exclusive with page.
endingBeforestringCursor 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 RpolColumnColumns to include, in order, when asking for text/csv. Omit for all of them. Sending it with application/json is a 400.
domainstringThe area whose policies are listed, as ruleAreaId names it.
ownerTypeRpolOwnerTypeOnly the policies this tenant owns, named with ownerId. Absent for every owner the caller may see.
PlatformEnterpriseMarketplaceMerchantUnknownownerIdstringThe id of the owner ownerType names. Absent for the platform.
stateRpolStateOnly the policies whose current version is in this state.
DraftPendingApprovalApprovedRejectedUnknownResponses
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.
typetype = "RpolPageAttributes"typeenumrequiredRpolViewAttributesrulePolicyIdRpolIdrequiredIdentifier of a rule policy.
Example rpol_9f2Kd8QpLzXw
domainstringrequiredThe area the rule belongs to, as ruleAreaId names it.
typeThe tenant that owns a rule policy or a named list: the platform, or an enterprise, a marketplace or a merchant.
enterpriseIdEntIdrequiredIdentifier of an enterprise.
Example ent_9f2Kd8QpLzXw
The tenant that owns a rule policy or a named list: the platform, or an enterprise, a marketplace or a merchant.
marketplaceIdMktpIdrequiredIdentifier of a marketplace.
Example mktp_9f2Kd8QpLzXw
The tenant that owns a rule policy or a named list: the platform, or an enterprise, a marketplace or a merchant.
merchantIdMchtIdrequiredIdentifier of a merchant.
Example mcht_9f2Kd8QpLzXw
The platform, which no enterprise, marketplace or merchant bounds.
The platform, which no enterprise, marketplace or merchant bounds.
stateRpolStaterequiredThe state of the current version.
DraftPendingApprovalApprovedRejectedUnknownmodeRpolModerequiredShadowEnforcingUnknownpausedbooleanrequiredWhether 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.
typeenumrequiredRpolRuleAttributestemplateIdstringrequiredThe template's id, as the area's description names it.
typeenumrequiredRpolArgumentAttributesparameterIdstringrequiredThe parameter's id, as the area's description names it.
typeAn amount of money in one currency.
An amount in minor current units of a given currency.
typeenumrequiredIsoCurrencyAmountminorCurrencyUnitsinteger (int64)requiredThe amount in minor currency units (e.g. cents for AUD).
Example 1250
currencyIsoCurrencyrequiredThe currency of the given amount as a 3 letter ISO code.
AFNDZDARSAMDAWGAUDAZNBSDBHDTHB+156 moreShow fewer
PAB, BBD, BYR, BZD, BMD, VEF, BOB, BRL, BND, BGN, BIF, CAD, CVE, KYD, XOF, XAF, XPF, CLP, COP, KMF, CDF, BAM, NIO, CRC, HRK, CUP, CZK, GMD, DKK, MKD, DJF, STD, DOP, VND, XCD, EGP, SVC, ETB, EUR, FKP, FJD, HUF, GHS, GIP, HTG, PYG, GNF, GYD, HKD, UAH, ISK, INR, IRR, IQD, JMD, JOD, KES, PGK, LAK, KWD, MWK, AOA, MMK, GEL, LBP, ALL, HNL, SLL, LRD, LYD, SZL, LSL, MGA, MYR, MUR, MXN, MXV, MDL, MAD, MZN, BOV, NGN, ERN, NAD, NPR, ANG, ILS, TWD, NZD, BTN, KPW, NOK, PEN, MRU, PKR, MOP, TOP, CUC, UYU, PHP, GBP, BWP, QAR, GTQ, ZAR, OMR, KHR, RON, MVR, IDR, RUB, RWF, SHP, SAR, RSD, SCR, SGD, SBD, KGS, SOS, TJS, SSP, LKR, SDG, SRD, SEK, CHF, SYP, BDT, WST, TZS, KZT, TTD, MNT, TND, TRY, TMT, AED, UGX, COU, CLF, UYI, USD, USN, USS, UZS, VUV, CHE, CHW, KRW, YER, JPY, CNY, ZMW, ZWL, PLN
Yes or no.
flagbooleanrequiredExample true
One or more named lists, by id. The lists must be ones the rule's owner may name: its own, or those of a tenant above it.
namedListIdsarray of NlstIdrequiredExample nlst_9f2Kd8QpLzXw
A number.
numbernumberrequiredExample 12.5
Several numbers.
numbersarray of numberExample 12.5
A percentage from 0 to 100.
percentnumberrequiredExample 12.5
Text, such as a name or a code.
textstringrequiredSeveral pieces of text.
textsarray of stringA length of time counted back from the moment a rule is evaluated, such as the last 30 days.
amountinteger (int64)requiredExample 1250
unitRpolWindowUnitrequiredSecondsMinutesHoursDaysWeeksUnknownThe action the rule takes when it matches. Read only: a rule's template and values decide it.
typeenumrequiredRpolActionAttributesnamestringrequiredThe action's name, as the area's description names it.
Example Ada Lovelace
templateVersioninteger (int32)requiredThe version of its template the rule was made with, which it keeps for as long as the policy holds it.
Example 1250
descriptionstringversioninteger (int32)requiredThe current version, which a change names as expectedVersion.
Example 1250
effectiveFromstring (date-time)requiredWhen 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)requiredExample 2026-08-19T04:21:07Z
createdBystringrequiredWho made the policy, keyed as a person or an API key is: user_ or staff_ or key_, and an id.
updatedAtstring (date-time)requiredExample 2026-08-19T04:21:07Z
updatedBystringrequiredWho made the current version.
approvedBystringapprovedAtstring (date-time)Example 2026-08-19T04:21:07Z
rejectedBystringrejectedAtstring (date-time)Example 2026-08-19T04:21:07Z
hasMorebooleanrequiredWhether further items exist after this page.
Example true
nextStartingAfterstringId 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
{
"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
statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}