Account Rules

The account rules determine what types of balances will be created automatically when an account is created or a currency associated with it, and determine whether an account can be created by the user or whether it is unique in the system for its desired description.

Notice: the type of an account (asset, liability, equity, revenue or expense) is determined in the Chart of Accounts for every account description and balance type

Uniqueness

Some accounts in the system, for a given classification, will only have one account created for the operation, which will then be mapped in a fixed manner in the transactional rules and not used as transaction input parameters.

Types of Balances

The system allows you to configure which types of balances will be automatically created for each currency in an account. Balance types are just classifications of balances that have their standard structural functioning, each having its own movement history in its currency.

Creation or Update of Account Rules

The PUT /account_rules method is used to register account creation rules individually or in batch. The same method is used to replace the rules individual or in batch.

The method will receive a rule mapping list with the following fields in each record:

Field
Description

description

Unique account description freely created by the user

unique

Determines the control of the uniqueness of accounts of this classification in the system

available_balance

Determines whether every account in this classification will have the automatically created available balance type

pending_balance

Determines whether every account in this classification will have the automatically created pending balance type

blocked_balance

Determines whether every account in this classification will have the automatically created blocked balance type

Notice:

  • once created an account rule description cannot be deleted

  • a description set as unique FALSE cannot be updated to unique TRUE

  • a description set as available_balance TRUE cannot be updated to FALSE

  • a description set as pending_balance TRUE cannot be updated to FALSE

  • a description set as blocked_balance TRUE cannot be updated to FALSE

Example of creating or updating rules:

PUT /account_rules

{
  "data": [
    {
      "description": "digital_account",
      "unique": false,
      "available_balance": true,
      "pending_balance": true,
      "blocked_balance": true
    }
  ]
}

Account Rules Query

The GET /account_rules method is used to query the rules.

Rules query example:

GET /account_rules

Example response:

{
  "data": [
    {
      "description": "digital_account",
      "unique": false,
      "available_balance": true,
      "pending_balance": true,
      "blocked_balance": true
    }
  ]
}

Last updated