Retrieve a bank rule

Operation ID: getBankRule

Group: Banking › Bank Rules

Open in the interactive reference

GET /banking/bank-rules/{id}

Read-only: Reads and returns; changes nothing.

Retrieves a bank rule. The response is the whole rule, including its criteria, the bank accounts or credit card accounts it applies to and its action object. GET banking/bank-rules returns the rule fields only.

Parameters

Name In Type Required Description
Api-Version header string · v1 yes The API version this request targets, named by its public identifier. Required on every request; omitting it, or naming a version this company does not have, is answered with 400. This document describes version v1.
id path string yes The unique identifier of the bank rule you want to retrieve. Example: "9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7".

Response

200 Success

Under data (getBankRuleOutput):

Field Type Required Description
id string yes The unique identifier for the bank rule. Example: "9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7".
bankRuleNumber string no The bank rule number. Example: 'BR-000014'. Example: "BR-000014".
rule string yes The name of the bank rule. Unique within the tenant. Example: "Stripe payouts".
action string yes What the rule creates for each bank transaction that meets its criteria. Possible values: 'createBankEntry' (a bank entry), 'createCreditCardEntry' (a credit card entry). Example: "createBankEntry".
status string yes The status of the rule. Possible values: 'active' (the rule runs whenever bank rules run), 'inactive' (the rule is kept but does not run), 'draft' (a rule proposed by the Bank Rules Advisor, which does not run until it is activated). Example: "active".
priority number yes The order in which this rule runs relative to other rules. Lower numbers run first. Example: 10.
description string no A description of the rule.
externalId string no The bank rule's identifier in an external system, if provided.
lastModifiedDate date-time yes The date and time the bank rule last changed, in UTC. Format YYYY-MM-DDTHH:mm:ss.sssZ. Example: "2026-08-27T09:15:22.000Z".
criteria array<object> yes The conditions a bank transaction must meet, in the order they are evaluated. Rules created or updated through the API always have at least one. Example: [{"id":"3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84","criteria":"description","operator":"containsCaseInsensitive","logicalOperator":"and","value":"STRIPE"}].
criteria[].id string yes The unique identifier for the criterion.
criteria[].criteria string yes The bank transaction field this criterion tests. Possible values: 'amount' (the signed transaction amount, negative for money out), 'description' (the description as the bank supplied it), 'payeePayor' (the name of the counterparty).
criteria[].operator string yes How the field is compared with value. When criteria is 'amount', it is 'equal', 'notEqual', 'greaterThan', 'greaterThanOrEqual', 'lessThan' or 'lessThanOrEqual'. When criteria is 'description' or 'payeePayor', it is 'is', 'isNot', 'contains' or 'doesNotContain', which are case-sensitive, or 'isCaseInsensitive', 'isNotCaseInsensitive', 'containsCaseInsensitive' or 'doesNotContainCaseInsensitive'.
criteria[].logicalOperator string no How this criterion combines with the next one. Possible values: 'and', 'or'. When absent, 'and' applies. Consecutive criteria joined by the same operator form a group, and groups are always combined with 'and'. For example, A or B, and C matches (A or B) and C, while A and B, or C matches A and B and C. Not used when the rule has criteria groups.
criteria[].value string yes The value the field is compared with. A number when criteria is 'amount', and text otherwise.
criteria[].groupKey string no The key of the criteria group this criterion belongs to. See key on criteriaGroups. Absent when the rule has no criteria groups.
criteriaGroups array<object> yes The nested AND/OR groups of the rule's criteria. Empty when the rule combines its criteria with logicalOperator on each criterion. When present, exactly one group has no parentKey and is the root. Example: [].
criteriaGroups[].key string yes The group's identifier, referenced by groupKey on criteria and by parentKey on child groups.
criteriaGroups[].parentKey string no The key of the parent group. Absent on the root group.
criteriaGroups[].logicalOperator string yes How the group combines its criteria and child groups. Possible values: 'and', 'or'.
accounts array<object> yes The bank accounts or credit card accounts this rule applies to. Rules created or updated through the API always have at least one. They all belong to the same legal entity, and are all bank accounts or all credit card accounts. Example: [{"id":"c41d0b58-2e97-4f6a-8d13-7b5e9c204af6","bankAccountId":"8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e","accountName":"Operating account"}].
accounts[].id string yes The unique identifier for the bank account mapping.
accounts[].bankAccountId string yes The unique identifier for the bank account. See id on GET banking/bank-accounts/:id.
accounts[].accountName string no The name of the bank account.
actionObject object no The values for the bank entry or credit card entry the rule creates for each bank transaction that meets its criteria. Absent when the rule has no action object, and such a rule is skipped when bank rules run. Example: {"id":"e93b7d15-2c48-4a60-9f31-5b7c8d9e0a12","accountId":"6d1e4b27-8a90-4c31-b5f2-7e8a9c0d1b23","name":"Stripe payout","description":"Auto-created by rule"}.
actionObject.id string yes The unique identifier for the action object.
actionObject.accountId string no The account each bank entry or credit card entry posts to. See id on GET accounting/accounts/:id.
actionObject.name string no The name given to each bank entry or credit card entry.
actionObject.description string no The description set on each bank entry or credit card entry and on its line.
actionObject.billableExpense string no Marks the line of each credit card entry as a billable expense when 'yes'. Possible values: 'yes', 'no'.
actionObject.businessUnitId string no The business unit set on each bank entry or credit card entry.
actionObject.departmentId string no The department set on each bank entry or credit card entry.
actionObject.customerId string no The customer set on each credit card entry. Not applied to bank entries. See id on GET accounting/customers/:id.
actionObject.vendorId string no The vendor saved on the rule. It is not applied to bank entries or credit card entries. See id on GET accounting/vendors/:id.
actionObject.intercompanyPartnerId string no The intercompany partner set on each bank entry or credit card entry. Applied only when accountId is an elimination account. No endpoint returns intercompany partners.
actionObject.valueAllocationTags array<string> no The value allocation tag codes set on each bank entry or credit card entry. A tag is applied only while value allocation tags are turned on and its dimension is enabled for that type of entry.
{
  "data": {
    "id": "9f2c6a10-7d34-4c8e-9b21-5a0f3e6d81b7",
    "bankRuleNumber": "BR-000014",
    "rule": "Stripe payouts",
    "action": "createBankEntry",
    "status": "active",
    "priority": 10,
    "description": "<description>",
    "externalId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "lastModifiedDate": "2026-08-27T09:15:22.000Z",
    "criteria": [
      {
        "id": "3f1a8c25-9d47-4e60-b892-0c5a7e3b1d84",
        "criteria": "description",
        "operator": "containsCaseInsensitive",
        "logicalOperator": "and",
        "value": "STRIPE"
      }
    ],
    "criteriaGroups": [],
    "accounts": [
      {
        "id": "c41d0b58-2e97-4f6a-8d13-7b5e9c204af6",
        "bankAccountId": "8f2c1d40-5a6b-4c7d-9e80-1f2a3b4c5d6e",
        "accountName": "Operating account"
      }
    ],
    "actionObject": {
      "id": "e93b7d15-2c48-4a60-9f31-5b7c8d9e0a12",
      "accountId": "6d1e4b27-8a90-4c31-b5f2-7e8a9c0d1b23",
      "name": "Stripe payout",
      "description": "Auto-created by rule"
    }
  },
  "diagnostics": [
    {
      "code": "<code>",
      "message": "<message>",
      "severity": "error",
      "path": [
        "<path>"
      ],
      "details": "<details>"
    }
  ]
}

Errors

Code Status
NOT_FOUND 400

Statuses