API Docs
/
No Results Found
Bank Rules

Bank Rules

In Zoho Books, you can automate the categorization of the bank feeds. The transaction rules feature in banking will help you in automatically identifying the bank transaction and categorizing it under the criteria provided by you.

Attribute

rule_id
string
ID of the Rule
rule_name
string
Name of the Rule
rule_order
integer
Order of the rule
apply_to
string
Entities to which Rule must be applied
criteria_type
string
Type of Criteria
criterion
array
Show Sub-Attributes arrow
criteria_id
string
ID of the Criteria
field
string
Field involved in the Criteria
comparator
string
Comparator used in Criteria
value
string
Value to be compared with
record_as
string
Entity as which it should be recorded
account_id
string
Account ID of the Bank
account_name
string
Name of the account
tax_id
string
Tax ID involved in the transaction.
customer_id
string
ID of the Customer Associated with the Rule
customer_name
string
Name of the Customer Associated with the Rule
reference_number
string
Specifies if Reference number is manual or generated from the statement.
payment_mode
string
Payment Mode Associated with the Rule
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the bank rules. VAT treatment denotes the location of the customer, if the customer resides in UK then the VAT treatment is uk. If the customer is in an EU country & VAT registered, you are resides in Northen Ireland and selling/purchasing Goods then his VAT treatment is eu_vat_registered, if he resides outside of the UK then his VAT treatment is overseas (For Pre Brexit, this can be split as eu_vat_registered, eu_vat_not_registered and non_eu).
product_type
string
🇬🇧 United Kingdom
, Europe only
Product Type associated with the Rule. Allowed values: goods or service or digital_service.
tax_authority_id
string
🇺🇸 United States
only
ID of the Tax Authority Associated with the Rule
tax_authority_name
string
🇺🇸 United States
only
Name of the Tax Authority Associated with the Rule
tax_exemption_code
string
🇮🇳 India
, 🇺🇸 United States
only
Code of the Tax Exemption Associated with the Rule

Example

{ "rule_id": "460000000048005", "rule_name": "Minimum Deposit Rule", "rule_order": 0, "apply_to": "deposits", "criteria_type": "and", "criterion": [ { "criteria_id": "460000000048009", "field": "amount", "comparator": "greater_than_or_equals", "value": "500.00" } ], "record_as": "deposit", "account_id": "460000000000361", "account_name": "Petty Cash", "tax_id": "460000000048238", "customer_id": "46000000000111", "customer_name": "Trendz", "reference_number": "from_statement", "payment_mode": "Cash", "vat_treatment": "string", "product_type": "string", "tax_authority_id": "string", "tax_authority_name": "string", "tax_exemption_code": "string" }

Create a rule

Create a rule and apply it on deposit/withdrawal for bank accounts and on refund/charges for credit card accounts.
oauthscope : ZohoBooks.banking.CREATE

Arguments

rule_name
string
(Required)
Name of the Rule
target_account_id
long
(Required)
The account on which the rule has to be applied.
apply_to
string
(Required)
Rule applies to either deposits or withdrawals for bank accounts and to refunds or charges for credit card account. Allowed Values : withdrawals, deposits, refunds and charges.
criteria_type
string
(Required)
Specifies whether all the criteria have to be satisfied or not. Allowed Values : and and or
criterion
array
(Required)
Show Sub-Attributes arrow
field
string
Field involved in the Criteria
comparator
string
Comparator used in Criteria
value
string
Value to be compared with
record_as
string
(Required)
Record transaction based on value specified in apply_to node. For bank accounts: If apply_to is deposits: sales_without_invoices, transfer_fund, interest_income, other_income, expense_refund, deposit. If apply_to is withdrawals: expense, transfer_fund, card_payment, owner_drawings. For credit_card accounts: If apply_to is refunds: card_payment, transfer_fund, expense_refund, refund. If apply_to is charges: expense, transfer_fund. Allowed Values: expense, deposit, refund, transfer_fund, card_payment, sales_without_invoices, expense_refund, interest_income, other_income and owner_drawings
account_id
long
Account which is involved in the rule with the target account.
customer_id
long
ID of the customer.(Applicable for sales_without_invoices,deposit, expense)
tax_id
string
Tax ID involved in the transaction.
reference_number
string
Specifies if Reference number is manual or generated from the statement. Allowed Values: manual and from_statement
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the bank rules. VAT treatment denotes the location of the customer, if the customer resides in UK then the VAT treatment is uk. If the customer is in an EU country & VAT registered, you are resides in Northen Ireland and selling/purchasing Goods then his VAT treatment is eu_vat_registered, if he resides outside of the UK then his VAT treatment is overseas (For Pre Brexit, this can be split as eu_vat_registered, eu_vat_not_registered and non_eu).
product_type
string
🇬🇧 United Kingdom
, Europe only
Product Type associated with the Rule. Allowed values: goods or service or digital_service.
tax_authority_id
string
🇺🇸 United States
only
ID of the Tax Authority Associated with the Rule
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
only
ID of the Tax Exemption Associated with the Rule

Request Example

Click to copy
$ curl https://books.zoho.com/api/v3/bankaccounts/rules -X POST -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "rule_name": "Minimum Deposit Rule", "target_account_id": 460000000048001, "apply_to": "deposits", "criteria_type": "and", "criterion": [ { "field": "amount", "comparator": "greater_than_or_equals", "value": "500.00" } ], "record_as": "deposit", "account_id": 460000000049001, "customer_id": 46000000000111, "tax_id": "460000000048238", "reference_number": "manual", "vat_treatment": "string", "product_type": "string", "tax_authority_id": "string", "tax_exemption_id": "string" }

Response Example

{ "code": 0, "message": "The bank rule has been created.", "rule": { "rule_id": "460000000048005", "rule_name": "Minimum Deposit Rule", "rule_order": 0, "apply_to": "deposits", "criteria_type": "and", "criterion": [ { "criteria_id": "460000000048009", "field": "amount", "comparator": "greater_than_or_equals", "value": "500.00" } ], "record_as": "deposit", "account_id": "460000000000361", "account_name": "Petty Cash", "tax_id": "460000000048238", "customer_id": "46000000000111", "customer_name": "Trendz", "reference_number": "from_statement", "payment_mode": "Cash", "vat_treatment": "string", "product_type": "string", "tax_authority_id": "string", "tax_authority_name": "string", "tax_exemption_code": "string" } }

Get Rules List

Fetch all the rules created for a specified bank or credit card account ID.
oauthscope : ZohoBooks.banking.READ

Query Parameters

account_id
(Required)
ID of the Bank Account

Request Example

Click to copy
$ curl https://books.zoho.com/api/v3/bankaccounts/rules -H "Authorization: Zoho-oauthtoken 1000.41d9f2cfbd1b7a8f9e314b7aff7bc2d1.8fcc9810810a216793f385b9dd6e125f"

Response Example

{ "code": 0, "message": "success", "rules": [ { "rule_id": "460000000048005", "rule_name": "Minimum Deposit Rule", "rule_order": 0, "apply_to": "deposits", "criteria_type": "and", "record_as": "deposit", "account_id": "460000000000361", "account_name": "Petty Cash", "criterion": [ { "criteria_id": "460000000048009", "field": "amount", "comparator": "greater_than_or_equals", "value": "500.00" } ] }, {...}, {...} ] }

Update a rule

Make changes to the rule, add or modify it and update.
oauthscope : ZohoBooks.banking.UPDATE

Arguments

rule_name
string
(Required)
Name of the Rule
target_account_id
long
(Required)
The account on which the rule has to be applied.
apply_to
string
(Required)
Rule applies to either deposits or withdrawals for bank accounts and to refunds or charges for credit card account. Allowed Values : withdrawals, deposits, refunds and charges.
criteria_type
string
(Required)
Specifies whether all the criteria have to be satisfied or not. Allowed Values : and and or
criterion
array
(Required)
Show Sub-Attributes arrow
criteria_id
string
ID of the Criteria
field
string
Field involved in the Criteria
comparator
string
Comparator used in Criteria
value
string
Value to be compared with
record_as
string
(Required)
Record transaction based on value specified in apply_to node. For bank accounts: If apply_to is deposits: sales_without_invoices, transfer_fund, interest_income, other_income, expense_refund, deposit. If apply_to is withdrawals: expense, transfer_fund, card_payment, owner_drawings. For credit_card accounts: If apply_to is refunds: card_payment, transfer_fund, expense_refund, refund. If apply_to is charges: expense, transfer_fund. Allowed Values: expense, deposit, refund, transfer_fund, card_payment, sales_without_invoices, expense_refund, interest_income, other_income and owner_drawings
account_id
long
Account which is involved in the rule with the target account.
customer_id
long
ID of the customer.(Applicable for sales_without_invoices,deposit, expense)
tax_id
string
Tax ID involved in the transaction.
reference_number
string
Specifies if Reference number is manual or generated from the statement. Allowed Values: manual and from_statement
vat_treatment
string
🇬🇧 United Kingdom
only
(Optional) VAT treatment for the bank rules. VAT treatment denotes the location of the customer, if the customer resides in UK then the VAT treatment is uk. If the customer is in an EU country & VAT registered, you are resides in Northen Ireland and selling/purchasing Goods then his VAT treatment is eu_vat_registered, if he resides outside of the UK then his VAT treatment is overseas (For Pre Brexit, this can be split as eu_vat_registered, eu_vat_not_registered and non_eu).
product_type
string
🇬🇧 United Kingdom
, Europe only
Product Type associated with the Rule. Allowed values: goods or service or digital_service.
tax_authority_id
string
🇺🇸 United States
only
ID of the Tax Authority Associated with the Rule
tax_exemption_id
string
🇮🇳 India
, 🇺🇸 United States
only
ID of the Tax Exemption Associated with the Rule

Request Example

Click to copy
$ curl https://books.zoho.com/api/v3/bankaccounts/rules/{rule_id} -X PUT -d '{"field":"value","field":"value"}'

Body Parameters

Click to copy
{ "rule_name": "Minimum Deposit Rule", "target_account_id": 460000000048001, "apply_to": "deposits", "criteria_type": "and", "criterion": [ { "criteria_id": "460000000048009", "field": "amount", "comparator": "greater_than_or_equals", "value": "500.00" } ], "record_as": "deposit", "account_id": 460000000049001, "customer_id": 46000000000111, "tax_id": "460000000048238", "reference_number": "manual", "vat_treatment": "string", "product_type": "string", "tax_authority_id": "string", "tax_exemption_id": "string" }

Response Example

{ "code": 0, "message": "The bank rule has been updated.", "rule": { "rule_id": "460000000048005", "rule_name": "Minimum Deposit Rule", "rule_order": 0, "apply_to": "deposits", "criteria_type": "and", "criterion": [ { "criteria_id": "460000000048009", "field": "amount", "comparator": "greater_than_or_equals", "value": "500.00" } ], "record_as": "deposit", "account_id": "460000000000361", "account_name": "Petty Cash", "tax_id": "460000000048238", "customer_id": "46000000000111", "customer_name": "Trendz", "reference_number": "from_statement", "payment_mode": "Cash", "vat_treatment": "string", "product_type": "string", "tax_authority_id": "string", "tax_authority_name": "string", "tax_exemption_code": "string" } }

Get a rule

Get details of a specific rule.
oauthscope : ZohoBooks.banking.READ

Request Example

Click to copy
$ curl https://books.zoho.com/api/v3/bankaccounts/rules/{rule_id}

Response Example

{ "code": 0, "message": "success", "rule_id": "460000000048005", "rule_name": "Minimum Deposit Rule", "rule_order": 0, "apply_to": "deposits", "criteria_type": "and", "criterion": [ { "criteria_id": "460000000048009", "field": "amount", "comparator": "greater_than_or_equals", "value": "500.00" } ], "record_as": "deposit", "account_id": "460000000000361", "account_name": "Petty Cash", "tax_id": "460000000048238", "customer_id": "46000000000111", "customer_name": "Trendz", "reference_number": "from_statement", "payment_mode": "Cash", "vat_treatment": "string", "product_type": "string", "tax_authority_id": "string", "tax_authority_name": "string", "tax_exemption_code": "string" }

Delete a rule

Delete a rule from your account and make it no longer applicable on the transactions.
oauthscope : ZohoBooks.banking.DELETE

Request Example

Click to copy
$ curl https://books.zoho.com/api/v3/bankaccounts/rules/{rule_id} -X DELETE

Response Example

{ "code": 0, "message": "The rule has been deleted." }