Skip to main content

Account Service

Account describe the customers and vendors accounts, that are associated with the Tenant. You can create, retrieve, update, and delete accounts by using API.

Account Object

Attributes


AttributeTypeDescription
idlongUnique identifier for the object.
accountCodestringUnique accountCode assigned to the object.
namestringAccount name.
codestringUnique code assigned to the object.
descriptionstringAccount Description.
taxCodestringAccount tax code assigned to the object.
currencystringCurrency used.
accountGroupstringAccount Group Name. Attributes for account group.
accountGroupIdstringAccount Group Id.
accountSubGroupstringAccount Sub Group Id.
accountSubGroupNamestringAccount Sub Group Name.
isSubAccountbooleanHas the value true if the account is a sub-account or false otherwise.
parentlongIdentifier of the parent account, when this account is a sub-account.
parentNamestringName of the parent account, when this account is a sub-account.
statusstringStatus of the account. Possible values for account status.
openingBalanceBigDecimalOpening Balance Amount.
openingBalanceInAccountCurrencyBigDecimalOpening balance amount in the account's currency.
exchangeRateBigDecimalExchange rate.
balanceBigDecimalBalance Amount.
balanceInAccountCurrencyBigDecimalBalance amount in the account's currency.
totalBalanceBigDecimalTotal value of Opening Balance and Balance.
totalBalanceInAccountCurrencyBigDecimalTotal value of Opening Balance and Balance in the account's currency.
totalCOABalanceBigDecimalTotal value of Opening Balance and Balance with Nature.
totalCOABalanceInAccountCurrencyBigDecimalTotal value of Opening Balance and Balance with Nature in the account's currency.
openingBalanceCdTypestringOpening Balance Type. Possible values for type.
accountNaturestringAccount Nature. Possible values for account nature.
isDefaultbooleanHas the value true if this is a default (system) account or false otherwise.
openingBalanceEditablebooleanHas the value true if the opening balance can still be edited or false otherwise.
isUndepositedFundAccountbooleanHas the value true if this is the Undeposited Funds account or false otherwise.
isCreditCardbooleanHas the value true if the account represents a credit card or false otherwise.
isTdsApplicablebooleanHas the value true if TDS (Tax Deducted at Source) is applicable to this account or false otherwise.
natureOfIncomePaymentstringNature of income payment, used for TDS calculation.
usedChequeNumbersstringCheque numbers already used against this account.
itcAdjustmentenumITC (Input Tax Credit) adjustment applied to the account. Possible values for ITC adjustment.
isRevaluedbooleanHas the value true if the account balance includes a currency revaluation or false otherwise.
glAccountCodestringGeneral ledger account code.
customFieldlistList of key-value pairs for custom field name and its value.

API


Create Account

Creates a new account.

Parameters

Code

  @Autowired
private AccountsApiClient accountsApiClient;

public AccountRequestDto createAccount(AccountRequestDto accountRequest, String accessToken){
return this.accountsApiClient.createAccount(accountRequest, accessToken);
}

Retrieve Account

Retrieves the details of an existing account. You need only supply the unique account id that was returned upon account creation.

Parameters

Code

  @Autowired
private AccountsApiClient accountsApiClient;

public AccountDto getAccountById(Long accountId, String accessToken){
return this.accountsApiClient.getById(accountId, accessToken);
}

List All Accounts

Returns list of accounts.

Parameters

Code

  @Autowired
private AccountsApiClient accountsApiClient;

public Accounts getAccounts(String accessToken, Integer limit, Integer page){
return this.accountsApiClient.getAccounts(accessToken, limit, page);
}

Update Account

Updates the details of an existing account.

Parameters

Code

  @Autowired
private AccountsApiClient accountsApiClient;

public void updateAccount(Long accountId, AccountRequestDto accountRequest, String accessToken){
this.accountsApiClient.updateAccount(accountId, accountRequest, accessToken);
}

Delete Account

Deletes an existing account. You only need to supply the unique account id that was returned upon account creation.

Parameters

Code

  @Autowired
private AccountsApiClient accountsApiClient;

public void deleteAccount(Long accountId, String accessToken){
this.accountsApiClient.deleteAccount(accountId, accessToken);
}

Objects


Account_Group

AttributeTypeDescription
idlongUnique identifier for the object.
namestringAccount Group Name.
parentIdlongID of AccountGroup Parent.
accountNatureIdlongID of Account Nature.
parentNamestringName of AccountGroup Parent.
isDeletedbooleanHas the value true if the accountGroup is deleted or false if the accountGroup still exist.
accountMasterlongIdentifier for accountMaster.
codestringAccount Code

Balance

AttributeTypeDescription
cdTypeenumCredit / Debit Type. Possible values for type.
openingBalanceBigDecimalOpening Balance Amount.
accountCodestringUnique accountCode assigned to the object.

Bank_Account

AttributeTypeDescription
bankNumberstringUnique identifier for the object.
bankNamestringBank Account Name.
connectStatusbooleanHas the value true if the status is active or false if the status is deactive.

Account

Request body used by Create Account and Update Account.

AttributeTypeDescription
idlongUnique identifier for the object.
accountCodestringUnique accountCode assigned to the object.
namestringAccount Name.
descriptionstringAccount Description.
accountGroupIdlongAccount Group ID
accountGroupNamestringName of Account Group.
taxCodestringAccount Tax code.
currencystringAccount Currency.
statusstringStatus of the account. Possible values for account status.
controlAccountbooleanHas the value true if the control account flag is false or false if the control account flag is true.
openingBalanceCdTypeenumCredit / Debit Type. Possible values for type.
openingBalanceBigDecimalOpening Balance Amount.
balanceBigDecimalBalance Amount.
totalBalanceBigDecimalTotal value of Opening Balance and Balance.
exchangeRateBigDecimalExchange rate.
isUndepositedFundAccountbooleanHas the value true if this is the Undeposited Funds account or false otherwise.
isCreditCardbooleanHas the value true if the account represents a credit card or false otherwise.
isTdsApplicablebooleanHas the value true if TDS (Tax Deducted at Source) is applicable to this account or false otherwise.
natureOfIncomePaymentstringNature of income payment, used for TDS calculation.
isSubAccountbooleanHas the value true if the account is a sub-account or false otherwise.
parentlongIdentifier of the parent account, when this account is a sub-account.
parentNamestringName of the parent account, when this account is a sub-account.
accountSubGrouplongIdentifier of the account sub-group.
accountSubGroupNamestringName of the account sub-group.
sequenceFormatstringSequence format id.
itcAdjustmentenumITC (Input Tax Credit) adjustment applied to the account. Possible values for ITC adjustment.
isRevaluedbooleanHas the value true if the account balance includes a currency revaluation or false otherwise.
glAccountCodestringGeneral ledger account code.
customFieldlistList of key-value pairs for custom field name and its value.

Enums


STATUS

  • ACTIVE
  • INACTIVE

OPENING_BALANCE_TYPE

  • CREDIT
  • DEBIT

ACCOUNT_NATURE

  • Asset
  • Liability
  • Income
  • Expenses
  • Equity

ITC_ADJUSTMENT

  • NA
  • ITC_IS_BLOCKED
  • ITC_IS_REVERSED

TYPE

  • CREDIT
  • DEBIT