Bank Transactions

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/{accountId}/transactions

Method(s):

get,post,put,delete

Response Formats:

JSON, XML

Description:

These methods allow to retrieve the list of transactions, create a new transaction, update an existing transaction and delete transaction.

Parameters

NameTypeDescription
AccountIdNumericUnique bank account identifier
BFSTransactionIdNumeric Bank Feeds transaction Id
CommentString
CustomerCodeString Customer Code if it is an invoice payment
CustomerIdNumeric Customer Id if it is an invoice payment
IdNumeric Id of the transaction
PaidInNumeric Money paid in
MoneyOutNumeric Money paid out
ProjectIdNumeric Unique Project Identifier
ReconciledNumeric Whether this transaction is reconciled or not
ReconciledIdString Reconciliation Id
ResourceNumberNumeric  Number of Invoice/Purchase as applicable
SupplierCodeNumeric Supplier Code if it is purchase payment
DateDate Date of transaction
TransactionNumberNumericUser specific unique Number of Transaction
VATAbleBoolean Whether vat is exempted or not for a transaction
VATAmountNumeric Total amount of VAT in the transaction
VATPaidNumeric Amount of VAT paid till now
VATRateNumeric VAT rate for line item. For PUT and POST request, It cannot be specified in case of VATAble property as true. This field is readonly.
VATReturnIdNumeric VAT return Id if VAT return is filed already
TransactionTypeNumericSpecifies the type of Transaction

0
– Transaction raised against a Sales Type, Purchase Type or Bank Type Code
– Unallocated Advanced Payment to/ from a Supplier or Customer
– Transfer from the target Bank Account

1
– Invoice Payment
– Invoice Refund (Credit Note Payment)

2
– Purchase Payment
– Purchase Refund (Credit Note Payment)

3
– Invoice Batch Payment

4
– Purchase Batch Payment

5
– Journal Line (Debit or Credit)

6
– Transfer from another Bank Account

GET Operation

GET of transactions returns list of bank transaction for a given bank account.

URL: /bankaccounts/{accountId}/transactions?startDate={startDate}&endDate={endDate}&page={page}&

perpage={perpage}&sortcolumn={sortcolumn}&order={order}&filterby={filterby}&includeBulk={true/false}&searchtext={searchText}

A paginated list of bank transactions is returned (ordered by TransactionDate in descending order).
If startDate and endDate are not specified then, bank transactions for previous month will be fetched by default.
If page and page size are not specified then, first page with 10 bank transactions will be displayed (like invoices).

Example response for GET of bank transaction list


{  
   "Data":[  
      {  
         "AccountId":18,
         "BFSTransactionId":null,
         "Comment":"INV #45374: ",
         "CustomerCode":"000001",
         "CustomerId":16210401,
         "Date":null,
         "EditLink":"\/#invoices\/45374",
         "Id":36948882,
         "MoneyType":null,
         "PaidIn":20700.0000,
         "PaidOut":0.0000,
         "Payee":null,
         "PaymentType":0,
         "ProjectId":null,
         "Reconciled":true,
         "ReconciledId":246,
         "ResourceNumber":45374,
         "SupplierCode":"",
         "SupplierId":null,
         "TransactionDate":"2013-01-09 12:00:00",
         "TransactionNumber":null,
         "TransactionType":1,
         "Type":"Sale - 000001",
         "VATAble":true,
         "VATAmount":4140.0000,
         "VATPaid":4140.0000,
         "VATRate":20.0000,
         "VATReturnId":null
      },
      {  
         "AccountId":18,
         "BFSTransactionId":null,
         "Comment":"KF00044: ",
         "CustomerCode":"",
         "CustomerId":null,
         "Date":null,
         "EditLink":"\/#purchases\/44",
         "Id":22189152,
         "MoneyType":null,
         "PaidIn":0.0000,
         "PaidOut":6480.0000,
         "Payee":null,
         "PaymentType":0,
         "ProjectId":null,
         "Reconciled":false,
         "ReconciledId":0,
         "ResourceNumber":44,
         "SupplierCode":"ASDA0",
         "SupplierId":3048713,
         "TransactionDate":"2013-01-11 12:00:00",
         "TransactionNumber":null,
         "TransactionType":2,
         "Type":"Purchase - ASDA0",
         "VATAble":true,
         "VATAmount":1296.0000,
         "VATPaid":1296.0000,
         "VATRate":20.0000,
         "VATReturnId":null
      }
   ],
   "MetaData":{  
      "FirstPageUrl":"https:\/\/api.kashflow.com\/v2\/bankaccounts\/18\/transactions?startDate=20130101&endDate=20130131&page=1&sortcolumn=Date&order=Asc&filterby=All&includeBulk=True&includeJournals=True&includeMoneyTypeBankTransactions=True",
      "LastPageUrl":"https:\/\/api.kashflow.com\/v2\/bankaccounts\/18\/transactions?startDate=20130101&endDate=20130131&page=1&sortcolumn=Date&order=Asc&filterby=All&includeBulk=True&includeJournals=True&includeMoneyTypeBankTransactions=True",
      "NextPageUrl":null,
      "OpeningBalance":-100.3700,
      "PreviousPageUrl":null,
      "TotalRecords":8,
      "ClosingBalance": 29112.5200
   }
}

Request Parameters

NameDescription
accountIdUnique identifier of bank account
startDatestart date in YYYYMMDD format (optional)
endDateend date in YYYYMMDD format (optional)
accountIdUnique identifier of bank account
pageThe page number (optional)
perpageNumber of records to be fetched (optional)
sortbyName of the column on which sorting needs to be applied. The acceptable values for this parameter are:
1. Date
2. PaidIn
3. PaidOut
4. TransactionTypeThis parameter is optional. Default is Date
orderSort direction can be either Asc for ascending or Desc for descending. Default is Desc. (optional)
filterbyThe list can be filtered by transactions frequency type. Set this parameter to “All” or empty or exclude from the URL if all transactions are to be retrieved. The acceptable values for this parameter are:
1. All
2. Unallocated
3. Invoice
4. Purchase
Default is All
includeBulkDefault is true. Pass false when you don’t want bulk Invoice/Purchase payments to be included in results
searchTextsearch keywords
includeFeedMatchedDefault is true. Pass false when you don’t want all transaction for which BankFeeds have already been matched
includeJournalsDefault is true. Pass false when you don’t want banktransaction done from Journals
includeNominalCodeBankTransactionsDefault is true. Pass false when you don’t want bank transactions done from other bank accounts.


To GET a particular bank transaction with all details –

URL : /bankaccounts/{accountId}/transactions/{transactionId}

Example response for GET of bank transaction


{  
   "AccountId":18,
   "Comment":"Advance payment recieved from Supplier",
   "CustomerCode":"",
   "Date":"2014-08-21 12:00:00",
   "EditLink":"",
   "Id":31417163,
   "MoneyType":2100,
   "PaidIn":0.0000,
   "PaidOut":44.3300,
   "PaymentType":0,
   "ProjectNumber":0,
   "Reconciled":true,
   "ReconciledId":34,
   "SupplierCode":"KLAY01",
   "TransactionNumber":34,
   "TransactionType":-1,
   "Type":"",
   "VATAble":true,
   "VATAmount":7.3900,
   "VATPaid":0.0000,
   "VATRate":20.0000,
   "VATReturnId":0
}

POST Operation

Creates a new bank transaction record with the given data using following URL –

URL: /bankaccounts/{accountId}/transactions

{accountId} in the URL will be replaced by bank account for which transaction is to be created.
Newly created bank transaction is returned in response.

Example request for POST of bank transaction


{
    "AccountId": 18,
    "Comment": "Update Test",
    "CustomerCode": "",
    "Date": "2014-10-16 12:00:00",
    "Id": 31417166,
    "MoneyType": 2100,
    "PaidIn": 0.0000,
    "PaidOut": 10.0000,
    "ProjectNumber": 0,
    "SupplierCode": "ASDA0",
    "TransactionType": -1,
    "VATAble": true,
    "VATAmount": 2.0000,
    "VATPaid": 1.0000,
    "VATRate": 3.0000,
    "VATReturnId": 1
}

Response : 201 Created with newly created bank transaction

Example response for POST of bank transaction


{
    "Id":17622,
    "AccountId": 18,
    "Comment": "Update Test",
    "CustomerCode": "",
    "Date": "2014-10-16 12:00:00",
    "Id": 31417166,
    "MoneyType": 2100,
    "PaidIn": 0.0000,
    "PaidOut": 10.0000,
    "ProjectNumber": 0,
    "SupplierCode": "ASDA0",
    "TransactionType": -1,
    "VATAble": true,
    "VATAmount": 2.0000,
    "VATPaid": 1.0000,
    "VATRate": 3.0000,
    "VATReturnId": 1
}

PUT Operation

Updates bank transaction record specified with the given data using following URL –

URL: /bankaccounts/{accountId}/transactions/{transactionid}

{accountId} in the URL will be replaced by bank account for which transaction is to be created.
Newly created bank transaction is returned in response.

{transactionid} in the url will be replaced by transaction id to be updated

Example request for PUT of bank transaction


{
    "Id" : 18927,
    "AccountId": 18,
    "Comment": "Update Test",
    "CustomerCode": "",
    "Date": "2014-10-16 12:00:00",
    "Id": 31417166,
    "MoneyType": 2100,
    "PaidIn": 0.0000,
    "PaidOut": 10.0000,
    "ProjectNumber": 0,
    "SupplierCode": "ASDA0",
    "TransactionType": -1,
    "VATAble": true,
    "VATAmount": 2.0000,
    "VATPaid": 1.0000,
    "VATRate": 3.0000,
    "VATReturnId": 1
}

Response : 200 OK with updated bank transaction

Example response for PUT of bank transaction


{
    "Id" : 18927,
    "AccountId": 18,
    "Comment": "Update Test",
    "CustomerCode": "",
    "Date": "2014-10-16 12:00:00",
    "Id": 31417166,
    "MoneyType": 2100,
    "PaidIn": 0.0000,
    "PaidOut": 10.0000,
    "ProjectNumber": 0,
    "SupplierCode": "ASDA0",
    "TransactionType": -1,
    "VATAble": true,
    "VATAmount": 2.0000,
    "VATPaid": 1.0000,
    "VATRate": 3.0000,
    "VATReturnId": 1
}

DELETE Operation

Deletes a specific transaction of a bank account using following URL –

URL: /bankaccounts/{accountId}/transactions/{transactionid}

{accountId} in the URL will be replaced by bank account for which transaction is to be deleted.
{transactionid} in the url will be replaced by transaction id to be deleted.
Rest Api returns 204 as in http response code if deletion is succeeded.

See how IRIS KashFlow works with your business and your books