Create banking rule

Create a banking rule. The rule is applied to pending imported bank transactions immediately, assigning its category, fund, payee, and memo to the transactions that match its conditions; when auto is set, matching transactions are confirmed automatically, and one you could not confirm by hand stays pending while the rule still saves. While multi-org is on, the rule's organization (the one named in the body, else your single organization, else the default) needs Full Write Accounting at every campus of it (400 otherwise).

Required permission: Full Write Accounting

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

The details of the banking rule

string | null
required

The rule's name.

direction
object | null
required

The transaction direction the rule applies to: 1 = balance increases, 2 = balance decreases.

condition
object | null
required

How the rule's conditions combine: 1 = all of the following, 2 = any of the following.

account
object | null
required

The account (category) the rule assigns to matching transactions.

fund
object | null
required

The fund the rule assigns to matching transactions.

filters
array of objects | null
required

The rule's conditions. At least one is required.

filters*
int32

The rule's unique identifier.

accounts
array of objects | null

The bank accounts the rule applies to. Empty when the rule applies to all bank accounts.

accounts
type
object | null

How the rule is applied to transactions; always 1 (match).

destination
object | null

Where the rule applies: send id 1 to apply the rule to all bank accounts (ignoring accounts); any other value scopes it to the accounts list.

payee
object | null

The payee the rule assigns to matching transactions. A caller who does not read the payee in full sees only what the payee's privacy settings share; a business keeps its details.

string | null

The memo the rule assigns to matching transactions.

boolean | null

Whether the rule is active.

boolean | null

Whether matching transactions are confirmed automatically without manual review.

organization
object | null

The organization whose books this rule belongs to; present only while two or more organizations exist. Its bank accounts, category account and fund must belong to it. On writes, provide the id; omitted on a create, the rule goes to the caller's single organization, else the default organization; omitted on an update, it stays where it is. A create needs Full Write Accounting at every campus of its organization, named or not; a move needs it at every campus of both the current organization and the new one. Ignored while there is one organization and by bulk updates.

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

401

Authentication is required, or the Ocs-Api-Key header is missing or invalid.

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json