POST
/
api
/
banking
/
rules
{
  "id": 1,
  "name": "Monthly Salary",
  "order": 1,
  "applyIfAccountId": 1,
  "applyIfTransactionType": "deposit",
  "conditionsType": "and",
  "conditions": [
    {
      "id": 1,
      "field": "description",
      "comparator": "contains",
      "value": "Salary"
    }
  ],
  "assignCategory": "InterestIncome",
  "assignAccountId": 1,
  "assignPayee": "Employer Inc.",
  "assignMemo": "Monthly Salary",
  "createdAt": "2024-03-20T10:00:00Z",
  "updatedAt": "2024-03-20T10:00:00Z"
}

Headers

Authorization
string
required

Value must be 'Bearer <token>' where <token> is an API key prefixed with 'bc_' or a JWT token.

Example:

"Bearer bc_1234567890abcdef"

organization-id
string
required

Required if Authorization is a JWT token. The organization ID to operate within.

Body

application/json
name
string
required

The name of the bank rule

Example:

"Monthly Salary"

order
number
required

The order of the bank rule

Example:

1

applyIfAccountId
number
required

The account ID to apply the rule if

Example:

1

applyIfTransactionType
string
required

The transaction type to apply the rule if

Example:

"deposit"

conditionsType
string
required

The conditions type to apply the rule if

Example:

"and"

conditions
string[]
required

The conditions to apply the rule if

Example:
[
{
"field": "description",
"comparator": "contains",
"value": "Salary"
}
]
assignCategory
string
required

The category to assign the rule if

Example:

"Income:Salary"

assignAccountId
number
required

The account ID to assign the rule if

Example:

1

assignPayee
string
required

The payee to assign the rule if

Example:

"Employer Inc."

assignMemo
string
required

The memo to assign the rule if

Example:

"Monthly Salary"

Response

201 - application/json

The bank rule has been successfully created.

id
number
required

The unique identifier of the bank rule

Example:

1

name
string
required

The name of the bank rule

Example:

"Monthly Salary"

order
number
required

The order in which the rule should be applied

Example:

1

applyIfAccountId
number
required

The account ID to apply the rule if

Example:

1

applyIfTransactionType
enum<string>
required

The transaction type to apply the rule if

Available options:
deposit,
withdrawal
Example:

"deposit"

conditionsType
enum<string>
required

The conditions type to apply the rule if

Available options:
and,
or
Example:

"and"

conditions
object[]
required

The conditions to apply the rule if

Example:
[
{
"id": 1,
"field": "description",
"comparator": "contains",
"value": "Salary"
}
]
assignCategory
enum<string>
required

The category to assign the rule if

Available options:
InterestIncome,
OtherIncome,
Deposit,
Expense,
OwnerDrawings
Example:

"InterestIncome"

assignAccountId
number
required

The account ID to assign the rule if

Example:

1

createdAt
string
required

The creation timestamp of the bank rule

Example:

"2024-03-20T10:00:00Z"

updatedAt
string
required

The last update timestamp of the bank rule

Example:

"2024-03-20T10:00:00Z"

assignPayee
string

The payee to assign the rule if

Example:

"Employer Inc."

assignMemo
string

The memo to assign the rule if

Example:

"Monthly Salary"