Account APIs

An account is a record in the general ledger that is used to sort and store transactions. Accounts are typically defined by an identifier (account number) and a caption or header and are coded by account type. An account refers to assets, liabilities, income, expenses, and equity, as represented by individual ledger pages, to which changes in value are chronologically recorded with debit and credit entries.

A chart of accounts (COA) is a created list of the accounts used by an organization to define each class of items for which money or its equivalent is spent or received.

AccountDto help you to create a new account, update a particular account, retrieve account, or get the list of all accounts.

More about Account API documentation

API


Search Account

Get accounts by filter criteria. More about search account

Description:
  • Allows you to retrieve a list of all accounts.
  • Allows you to retrieve a list of account details based on it's filter criteria.

GET

/v1/account

Request URL
https://bifrost.deskera.com/v1/account?limit=10&page=0&sort=createdOn&sortDir=desc
Curl
curl -X GET "https://bifrost.deskera.com/v1/account?limit=10&page=0&sort=createdOn&sortDir=desc" -H "accept: application/json" -H "x-access-token: sampleaccesstoken"
Parameters
NameLocated inDescriptionRequiredSchema
limitquerylimitNointeger
pagequerypageNointeger
queryqueryqueryNostring
searchquerysearchNostring
sortquerysortNostring
sortDirquerysortDirNostring
Sample Response
{
"content": [
{
"accountCode": "Saving Account",
"accountGroup": "Sample Account Group",
"accountGroupId": "SA001",
"accountNature": "ASSET",
"balance": 999.99,
"balanceInAccountCurrency": 999.99,
"code": "Sample Code",
"currency": "SGD",
"customField": [
{
"label": "Label",
"module": "Account",
"value": "Extra information"
}
],
"description": "Savings account",
"exchangeRate": 1,
"id": 1,
"name": "Savings account",
"openingBalance": 999.99,
"openingBalanceCdType": "DEBIT",
"openingBalanceInAccountCurrency": 999.99,
"status": "ACTIVE",
"taxCode": "Tax Code",
"totalBalance": 999.99,
"totalBalanceInAccountCurrency": 999.99,
"totalCOABalance": 999.99,
"totalCOABalanceInAccountCurrency": 999.99
}
],
"pageable": {
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"pageSize": 10,
"pageNumber": 0,
"offset": 0,
"paged": true,
"unpaged": false
},
"totalElements": 0,
"last": true,
"totalPages": 0,
"first": true,
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"numberOfElements": 0,
"size": 10,
"number": 0,
"empty": true
}
Responses
CodeDescriptionSchema
200OKAccountDto
401Unauthorized
403Forbidden
404Not Found
Security
Security SchemaScopes
Authorizationglobal

Create Account

Create a new account. More about create account

Description:
  • Allows you to create a new account.

POST

/v1/account

Request URL
https://bifrost.deskera.com/v1/account
Curl
curl -X POST "https://bifrost.deskera.com/v1/account" -H "accept: application/json" -H "x-access-token: sampleaccesstoken" -H "Content-Type: application/json" -d "{ \"accountCode\": \"Saving Account\", \"accountGroupId\": 1, \"accountGroupName\": \"Sample Account Group\", \"balance\": 999.99, \"currency\": \"SGD\", \"customField\": [ { \"label\": \"Label\", \"module\": \"string\", \"value\": \"XYZ\" } ], \"description\": \"Savings account description\", \"name\": \"Savings account\", \"openingBalance\": 999.99, \"openingBalanceCdType\": \"DEBIT\", \"taxCode\": \"Tax Code\", \"totalBalance\": 999.99}"
Parameters
NameLocated inDescriptionRequiredSchema
accountRequestDtobodyaccountRequestDtoYesAccountRequestDto
Sample Request
{
"accountCode": "Saving Account",
"accountGroupId": 1,
"accountGroupName": "Sample Account Group",
"balance": 999.99,
"currency": "SGD",
"customField": [
{
"label": "Label",
"module": "Account",
"value": "Extra information"
}
],
"description": "Savings account description",
"name": "Savings account",
"openingBalance": 999.99,
"openingBalanceCdType": "DEBIT",
"taxCode": "Tax Code",
"totalBalance": 999.99
}
Sample Response
{
"accountCode": "Saving Account",
"accountGroupId": 1,
"accountGroupName": "Sample Account Group",
"balance": 999.99,
"currency": "SGD",
"customField": [
{
"label": "Label",
"module": "Account",
"value": "Extra information"
}
],
"description": "Savings account description",
"name": "Savings account",
"openingBalance": 999.99,
"openingBalanceCdType": "DEBIT",
"taxCode": "Tax Code",
"totalBalance": 999.99
}
Responses
CodeDescriptionSchema
200OKAccountRequestDto
201Created
401Unauthorized
403Forbidden
404Not Found
Security
Security SchemaScopes
Authorizationglobal

Retrieve Account

Get account by id. More about retrieve account

Description:
  • Allows you to retrieve a specific account details.

GET

/v1/account/{id}

Request URL
https://bifrost.deskera.com/v1/account/1
Curl
curl -X GET "https://bifrost.deskera.com/v1/account/1" -H "accept: application/json" -H "x-access-token: sampleaccesstoken"
Parameters
NameLocated inDescriptionRequiredSchema
idpathidYeslong
Sample Response
{
"accountCode": "Saving Account",
"accountGroup": "Sample Account Group",
"accountGroupId": "SA001",
"accountNature": "ASSET",
"balance": 999.99,
"balanceInAccountCurrency": 999.99,
"code": "Sample",
"currency": "USD",
"customField": [
{
"label": "Label",
"module": "Account",
"value": "Extra information"
}
],
"description": "Savings account",
"exchangeRate": 1,
"id": 1,
"name": "Savings account",
"openingBalance": 999.99,
"openingBalanceCdType": "DEBIT",
"openingBalanceInAccountCurrency": 999.99,
"status": "ACTIVE",
"taxCode": "Tax Code",
"totalBalance": 999.99,
"totalBalanceInAccountCurrency": 999.99,
"totalCOABalance": 999.99,
"totalCOABalanceInAccountCurrency": 999.99
}
Responses
CodeDescriptionSchema
200OKAccountDto
401Unauthorized
403Forbidden
404Not Found
Security
Security SchemaScopes
Authorizationglobal

Update Account

Update account information. More about update account

Description:
  • Allows you to update a specific account information.

PUT

/v1/account/{id}

Request URL
https://bifrost.deskera.com/v1/account/1
Curl
curl -X PUT "https://bifrost.deskera.com/v1/account/1" -H "accept: application/json" -H "x-access-token: sampleaccesstoken" -H "Content-Type: application/json" -d "{ \"accountCode\": \"Saving Account\", \"accountGroupId\": 1, \"accountGroupName\": \"Sample Account Group\", \"balance\": 999.99, \"currency\": \"SGD\", \"customField\": [ { \"label\": \"Label\", \"module\": \"Account\", \"value\": \"Extra information\" } ], \"description\": \"Savings account description\", \"name\": \"Savings account\", \"openingBalance\": 999.99, \"openingBalanceCdType\": \"DEBIT\", \"taxCode\": \"Tax Code\", \"totalBalance\": 999.99}"
Parameters
NameLocated inDescriptionRequiredSchema
accountbodyaccountYesAccountRequestDto
idpathidYeslong
Sample Request
{
"accountCode": "Saving Account",
"accountGroupId": 1,
"accountGroupName": "Sample Account Group",
"balance": 999.99,
"currency": "SGD",
"customField": [
{
"label": "Label",
"module": "Account",
"value": "Extra information"
}
],
"description": "Savings account description",
"name": "Savings account",
"openingBalance": 999.99,
"openingBalanceCdType": "DEBIT",
"taxCode": "Tax Code",
"totalBalance": 999.99
}
Sample Response
{
"accountCode": "Saving Account",
"accountGroupId": 1,
"accountGroupName": "Sample Account Group",
"balance": 999.99,
"currency": "SGD",
"customField": [
{
"label": "Label",
"module": "Account",
"value": "Extra information"
}
],
"description": "Savings account description",
"name": "Savings account",
"openingBalance": 999.99,
"openingBalanceCdType": "DEBIT",
"taxCode": "Tax Code",
"totalBalance": 999.99
}
Responses
CodeDescriptionSchema
200Account information has been updated successfully.AccountRequestDto
201Created
400Account with same name already exists
401Unauthorized
403Forbidden
404Account does not exist.
Security
Security SchemaScopes
Authorizationglobal

List of Account Types

Get account groups by filter criteria. More about list of account types

Description:
  • Allows you to retrieve a list of all account groups.
  • Allows you to retrieve specific account group based on it's filter criteria.

GET

/v1/account/group

Request URL
https://bifrost.deskera.com/v1/account/group?limit=10&page=0&sort=createdOn&sortDir=desc
Curl
curl -X GET "https://bifrost.deskera.com/v1/account/group?limit=10&page=0&sort=createdOn&sortDir=desc" -H "accept: application/json" -H "x-access-token: sampleaccesstoken"
Parameters
NameLocated inDescriptionRequiredSchema
limitquerylimitNointeger
pagequerypageNointeger
queryqueryqueryNostring
searchquerysearchNostring
sortquerysortNostring
sortDirquerysortDirNostring
Sample Response
{
"content": [
{
"accountMaster": 1,
"accountNatureId": 3,
"code": "AG-0000001",
"id": 1,
"isDeleted": false,
"name": "Saving",
"parentId": 1,
"parentName": "Saving"
}
],
"pageable": {
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"pageSize": 10,
"pageNumber": 0,
"offset": 0,
"paged": true,
"unpaged": false
},
"totalElements": 0,
"last": true,
"totalPages": 0,
"first": true,
"sort": {
"sorted": true,
"unsorted": false,
"empty": false
},
"numberOfElements": 0,
"size": 10,
"number": 0,
"empty": true
}
Responses
CodeDescriptionSchema
200OKAccountGroupDto
401Unauthorized
403Forbidden
404Not Found
Security
Security SchemaScopes
Authorizationglobal

Models


AccountDto

NameTypeDescriptionRequired
accountCodestringAccount codeNo
accountGroupstringAccount groupNo
accountGroupIdstringAccount groupNo
accountNaturestringAccount NatureNo
balancenumberBalance AmountNo
balanceInAccountCurrencynumberBalance Amount in Account CurrencyNo
codestringAccount codeNo
currencystringAccount CurrencyNo
customField[ CustomFieldItem ]List of custom fieldsNo
descriptionstringAccount DescriptionNo
exchangeRatenumberBase to Foreign Exchange RateNo
idlongAccount ID.No
namestringAccount NameNo
openingBalancenumberOpening Balance Amount in Base currencyNo
openingBalanceCdTypestringOpening balance Credit/Debit TypeNo
openingBalanceInAccountCurrencynumberOpening Balance Amount in Account currencyNo
statusstringAccount StatusNo
taxCodestringAccount TaxNo
totalBalancenumberSummation of Opening Balance and BalanceNo
totalBalanceInAccountCurrencynumberSummation of Opening Balance and Balance in Account CurrencyNo
totalCOABalancenumberSummation of Opening Balance and Balance with NatureNo
totalCOABalanceInAccountCurrencynumberSummation of Opening Balance and Balance with Nature in Account CurrencyNo

AccountRequestDto

NameTypeDescriptionRequired
accountCodestringAccount codeNo
accountGroupIdlongAccount Group IdNo
accountGroupNamestringAccount Group NameNo
balancenumberBalance AmountNo
currencystringSingapore DollarsNo
customFieldobjectcustom field jsonNo
descriptionstringAccount DescriptionNo
namestringAccount NameNo
openingBalancenumberOpening Balance AmountNo
openingBalanceCdTypestringOpening balance Credit/Debit TypeNo
taxCodestringAccount TaxNo
totalBalancenumberSummation of Opening Balance and BalanceNo

AccountGroupDto

NameTypeDescriptionRequired
accountMasterlongAccount MasterNo
accountNatureIdlongAccount Nature IdNo
codestringAccount StatusNo
idlongAccountGroup ID.No
isDeletedbooleanAccountGroup is deletedNo
namestringAccountGroup NameNo
parentIdlongAccountGroup Parent idNo
parentNamestringAccountGroup Parent nameNo

CustomFieldItem

NameTypeDescriptionRequired
labelstringCustom Field NameYes
modulestringSupported ModulesNo
valueobjectDimension ValueNo