Bank Accounts

This s a documentation page for our shiny new REST API - you weren't meant to find it. This API isn't ready for public use yet. We're chopping and changing it a LOT as we grow it. So if you build something that uses it then it's very likely to break in a future update. Don't say you weren't warned!

URL:

https://api.kashflow.com/v2/bankaccounts

Method(s):

get,post,put,delete

Response Formats:

JSON, XML

Description:

This method allows to retrieve, create, update and delete bank accounts.

Parameters

FeedAccountNameStringName of bank feed account

NameTypeDescription
IdNumericUnique id given to the bank account
CodeNumericCode assigned to the bank account
AccountNameStringName of the bank account
IsDefaultAccountBooleanWhether this account is the default bank account for the user
IsArchivedBooleanWhether this account is archived
StartingDateDateStarting date of the bank account. For e.g. [JSONDATE]
ReconcileDateDateLast reconciled date of the bank account. For e.g. [JSONDATE]
DefaultReceiptPaymentTypeObjectInformation related to default receipt payment type. For details, refer documentation of Payment Method
DefaultInvoicePaymentTypeObjectInformation related to default invoice payment type. For details, refer documentation of Payment Method
TransactionLockEnabledBooleanWhether transactions for this bank account are locked
TransactionLockDateDateThe date before which transactions for this bank account are locked
StartingAmountNumericStarting amount of this bank account
BankBalanceNumericTotal transaction amount of this bank account
BankFeedsAccountIdNumericId of bank feed account
FeedAccountHolderStringName of bank feed account holder
FeedAccountNumberStringBank feed account number
IconIdNumericIcon Id of bank account
IncludeOnDashBoardBooleanIndicates whether to include this bank account on Dashboard or not
LastTransactionImportDateDateLast transaction import date
NoteStringNote for the bank account
ShowPaidInFirstBooleanIf true then PaidIn column will be displayed first instead of PaidOut column on transaction list page.

GET Operation

GET of banks returns list of all bank accounts setup for the user.

URL : /bankaccounts

Example response for GET of list of banks


[{
  "AccountName": "Current Account",
  "BankBalance": 20310.0000,
  "BankFeedsAccountId": 0,
  "Code": 1200,
  "DefaultInvoicePaymentType": {
    "Id": 45,
    "Name": "Bank Transfer"
  },
  "DefaultPurchasePaymentType": {
    "Id": 0,
    "Name": null
  },
  "FeedAccountHolder": "",
  "FeedAccountName": "",
  "FeedAccountNumber": "",
  "IconId": 0,
  "Id": 12,
  "IncludeOnDashBoard": false,
  "IsArchived": false,
  "IsDefaultAccount": false,
  "LastTransactionImportDate": null,
  "Note": null,
  "ReconcileDate": null,
  "ShowPaidInFirst": false,
  "StartingAmount": 0,
  "StartingDate": null,
  "TransactionLockDate": "2014-07-30 12:00:00",
  "TransactionLockEnabled": false
},
{
  "AccountName": "HSBC",
  "BankBalance": 200.0000,
  "BankFeedsAccountId": 0,
  "Code": 1201,
  "DefaultInvoicePaymentType": {
    "Id": 45,
    "Name": "Bank Transfer"
  },
  "DefaultPurchasePaymentType": {
    "Id": 0,
    "Name": null
  },
  "FeedAccountHolder": "",
  "FeedAccountName": "",
  "FeedAccountNumber": "",
  "IconId": 0,
  "Id": 302030,
  "IncludeOnDashBoard": false,
  "IsArchived": false,
  "IsDefaultAccount": true,
  "LastTransactionImportDate": null,
  "Note": null,
  "ReconcileDate": null,
  "ShowPaidInFirst": false,
  "StartingAmount": 0,
  "StartingDate": null,
  "TransactionLockDate": "2014-07-31 12:00:00",
  "TransactionLockEnabled": false
},
{
  "AccountName": "ICICI",
  "BankBalance": 12069.0000,
  "BankFeedsAccountId": 0,
  "Code": 1202,
  "DefaultInvoicePaymentType": {
    "Id": 45,
    "Name": "Bank Transfer"
  },
  "DefaultPurchasePaymentType": {
    "Id": 0,
    "Name": null
  },
  "FeedAccountHolder": "",
  "FeedAccountName": "",
  "FeedAccountNumber": "",
  "IconId": 0,
  "Id": 302040,
  "IncludeOnDashBoard": false,
  "IsArchived": false,
  "IsDefaultAccount": false,
  "LastTransactionImportDate": null,
  "Note": null,
  "ReconcileDate": null,
  "ShowPaidInFirst": false,
  "StartingAmount": 0,
  "StartingDate": null,
  "TransactionLockDate": "2014-08-04 12:00:00",
  "TransactionLockEnabled": false
},
{
  "AccountName": "HDFC",
  "BankBalance": 0.0000,
  "BankFeedsAccountId": 0,
  "Code": 1203,
  "DefaultInvoicePaymentType": {
    "Id": 11,
    "Name": "Cheque"
  },
  "DefaultPurchasePaymentType": {
    "Id": 0,
    "Name": null
  },
  "FeedAccountHolder": "",
  "FeedAccountName": "",
  "FeedAccountNumber": "",
  "IconId": 0,
  "Id": 302042,
  "IncludeOnDashBoard": false,
  "IsArchived": false,
  "IsDefaultAccount": false,
  "LastTransactionImportDate": null,
  "Note": null,
  "ReconcileDate": null,
  "ShowPaidInFirst": false,
  "StartingAmount": 0,
  "StartingDate": null,
  "TransactionLockDate": "2014-08-07 12:00:00",
  "TransactionLockEnabled": false
},
{
  "AccountName": "BNY",
  "BankBalance": 0.0000,
  "BankFeedsAccountId": 0,
  "Code": 1204,
  "DefaultInvoicePaymentType": {
    "Id": 45,
    "Name": "Bank Transfer"
  },
  "DefaultPurchasePaymentType": {
    "Id": 0,
    "Name": null
  },
  "FeedAccountHolder": "",
  "FeedAccountName": "",
  "FeedAccountNumber": "",
  "IconId": 0,
  "Id": 302043,
  "IncludeOnDashBoard": false,
  "IsArchived": false,
  "IsDefaultAccount": false,
  "LastTransactionImportDate": null,
  "Note": null,
  "ReconcileDate": null,
  "ShowPaidInFirst": false,
  "StartingAmount": 0,
  "StartingDate": null,
  "TransactionLockDate": "2014-08-07 12:00:00",
  "TransactionLockEnabled": false
}]

GET details of a perticular bank account.

URL : /bankaccounts/{bankaccountid}

Example response for GET of a bank


{
  "AccountName": "Current Account",
  "BankBalance": 0,
  "BankFeedsAccountId": 0,
  "Code": 1200,
  "DefaultInvoicePaymentType": {
    "Id": 45,
    "Name": "Bank Transfer"
  },
  "DefaultPurchasePaymentType": {
    "Id": 45,
    "Name": "Other"
  },
  "FeedAccountHolder": "",
  "FeedAccountName": "",
  "FeedAccountNumber": "",
  "IconId": 0,
  "Id": 12,
  "IncludeOnDashBoard": true,
  "IsArchived": false,
  "IsDefaultAccount": false,
  "LastTransactionImportDate": null,
  "Note": "bank accout note - ashwini",
  "ReconcileDate": "2010-07-31 12:00:00",
  "ShowPaidInFirst": false,
  "StartingAmount": 100.0000,
  "StartingDate": "2014-07-10 12:00:00",
  "TransactionLockDate": "2014-07-30 12:00:00",
  "TransactionLockEnabled": false
}

To get unique bank code.

URL : /bankaccounts/suggestedcode

Example response for GET of bank code


  6722

POST Operation

Creates a new bank account for a specific user.
URL: /bankaccounts

  • Bank Account name and nominal code should be unique for a KashFlow account for that specific user.
  • Mandatory fields for POST of bank account : AccountName and ReconcileDate.
  • Account code will be autogenerated if not specified (in case user specifies, it will be validated and throws 400 if already exists).
  • Icon id will be validated across master data if specified. Else IconId will be set to zero
  • Default order for Paid In/Paid Out will be : Paid In/Paid Out, if not specified.
  • In case of invoice/receipts payment methods, if user specifies invalid payment method, it will set default payment method of invoice/receipts for that specific user.
  • ‘Include on Overview page’ will be set as true by default if not specified.
  • Only one bank account can be user’s default account.
  • When TransactionLockEnabled is true, it is mandatory to specify TransactionLockDate. When TransactionLockEnabled is false, TransactionLockDate will be set to current date.
  • When value for IsArchived is not specified, default will be set to false

Example request for POST of bank account


{
    "AccountName": "MBNA",
    "DefaultInvoicePaymentType": {
        "Id": 11
    },
    "DefaultPurchasePaymentType": {
        "Id": 37
    },
    "IconId": 17,
    "IncludeOnDashBoard": true,
    "IsArchived": false,
    "IsDefaultAccount": false,
    "Note": "",
    "ReconcileDate": "2014-10-10",
    "ShowPaidInFirst": true,
    "StartingAmount": 0.0000,
    "TransactionLockDate": "2014-09-05",
    "TransactionLockEnabled": false
}

Response : 201 Created with newly created bank account
Example response for POST of bank account


{
    "AccountName": "MBNA",
    "BankBalance": 0,
    "BankFeedsAccountId": 0,
    "Code": 0,
    "DefaultInvoicePaymentType": {
        "Id": 11,
        "Name": "Cheque"
    },
    "DefaultPurchasePaymentType": {
        "Id": 37,
        "Name": "Other"
    },
    "FeedAccountHolder": "",
    "FeedAccountName": "",
    "FeedAccountNumber": "",
    "IconId": 17,
    "Id": 302063,
    "IncludeOnDashBoard": true,
    "IsArchived": false,
    "IsDefaultAccount": false,
    "LastTransactionImportDate": null,
    "Note": "",
    "ReconcileDate": "2014-10-10 12:00:00",
    "ShowPaidInFirst": true,
    "StartingAmount": 0.0000,
    "StartingDate": "1970-01-01 12:00:00",
    "TransactionLockDate": "2014-09-05 12:00:00",
    "TransactionLockEnabled": false
}

PUT Operation

Updates the bank account details.

  • Account code is mandatory.
  • Account name is mandatory.
  • Reconcile Date is mandatory.
  • Bank Account name and nominal code should be unique for a KashFlow account for that specific user.
  • Icon id will be validated if specified.
  • Default order for Paid In/Paid Out will be : Paid In/Paid Out, if not specified.
  • In case of invoice/receipts payment methods, if user specifies invalid payment method, the payment method of invoice/receipts in the bank will be retained.
  • ‘Include on Overview page’ will be set as true by default if not specified.
  • Only one bank account can be user’s default account.

URL : /bankaccounts/{accountId}

Example request for PUT of bank account


{
    "AccountName": "MBNA",
    "Code": 9694,
    "DefaultInvoicePaymentType": {
        "Id": 11,
        "Name": "Cheque"
    },
    "DefaultPurchasePaymentType": {
        "Id": 37,
        "Name": "Other"
    },
    "IconId": 17,
    "IncludeOnDashBoard": true,
    "IsArchived": false,
    "IsDefaultAccount": false,
    "Note": "Bank Account for new transactions",
    "ReconcileDate": "2014-09-05 12:00:00",
    "ShowPaidInFirst": true,
    "StartingAmount": 0.0000,
    "StartingDate": "2014-09-05 12:00:00",
    "TransactionLockDate": "2014-09-05 12:00:00",
    "TransactionLockEnabled": false
}

DELETE Operation

Deletes the bank account with the id provided in the URL.

URL : /bankaccounts/{accountId}

{accountId} specified in the url will be replaced by bank account which needs to be deleted.

See how IRIS KashFlow works with your business and your books