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/{bankaccountid}/reconciliations |
Method(s): | get, post,put,delete |
Response Formats: | JSON, XML |
Description: | These methods allows to 1) Retrieve previous reconciliations for the specified bank account. 2) Retrieve transactions corresponding to a specific reconciliation. 3) Create new reconciliations 4) Edit header details of reconciliations. Note: This API can be used only when the user has FullAccess permission. |
Reconciliation header parameters
Name | Type | Description |
---|---|---|
Id | Numeric | Unique reconciliation identifier. |
StartDate | Date | Reconciliation start date. |
EndDate | Date | Reconciliation end date. |
StartBalance | Numeric | Reconciliation start balance. |
EndBalance | Numeric | Reconciliation end balance. |
Status | String | Status of the reconciliation. |
Status message can be one of the values mentioned in the following table:
Status |
---|
InComplete |
Complete |
Overlaps_Previous |
ReconcileDate_Changed |
Starting_Balance_Changed |
Transactions_Modified |
Incorrect_Starting_Balance |
Reconciliation transaction parameters
Name | Type | Description |
---|---|---|
Id | Numeric | Unique transaction identifier. |
Type | String | The entity corresponding to this entity. |
Payee | String | The supplier/customer name. |
Comment | String | Comment |
PaidIn | Numeric | Amount that was received. |
PaidOut | Numeric | Amount that was paid. |
EditLink | String | The link that will contain the url to edit the entity. |
Reconciled | Boolean | Whether this transaction was reconciled. |
PaymentId | Numeric | Unique payment identifier. |
Date | Numeric | The transaction date. |
PaymentType | Numeric | Specifies the entity for which payment was done. 0:bank, 1:Invoice, 2:Receipts, 3:Invoice bulk payment,Invoice 4:Receipt bulk payment,Receipt 5:Journal entry, 6:bank transfers |
GET Operation
Returns a paginated list of previous bank reconciliations for the specified account .To GET list of previous bank reconciliations –
URL : bankaccounts/{bankaccountid}/reconciliations?page={page}
A paginated list of previous bank reconciliations is returned.
BankAccountId in the url corresponds to the bank account of the user and page corresponds to the block to be retrieved when the records are divided into a block of 10 records each.
Example response for GET of previous bank reconciliations list
{
"Data": [{
"Id": 4398,
"StartDate": "2008-08-26 12:00:00",
"EndDate": "2008-10-26 12:00:00",
"StartBalance": 1500.0000,
"EndBalance": 1800.0000,
"Status": "ReconcileDate_Changed"
}, {
"Id": 5387,
"StartDate": "2009-08-26 12:00:00",
"EndDate": "2009-10-26 12:00:00",
"StartBalance": 2000.0000,
"EndBalance": 1500.0000,
"Status": "Complete"
}, {
"Id": 6254,
"StartDate": "2012-01-26 12:00:00",
"EndDate": "2012-06-26 12:00:00",
"StartBalance": 1000.0000,
"EndBalance": 1500.0000,
"Status": "Transactions_Modified"
}],
"MetaData": {
"FirstPageUrl": "https://api.kashflow.com/RestApi/bankaccounts/476/reconciliations?page=1",
"LastPageUrl": "https://api.kashflow.com/RestApi/bankaccounts/476/reconciliations?page=5",
"NextPageUrl": "https://api.kashflow.com/RestApi/bankaccounts/476/reconciliations?page=5",
"PreviousPageUrl": "https://api.kashflow.com/RestApi/bankaccounts/476/reconciliations?page=4",
"TotalRecords": 43
}
}
GET Operation
Returns list of transactions for a specific reconciliation and bank account.To GET list of transactions for a specific reconciliation –
URL : /bankaccounts/{bankaccountid}/reconciliations/{reconciliationid}?excludetransactions={excludetransactions}
A true/false value for Excludetransactions parameter specifies whether transactions are to be retrieved along with the header. If excludetransactions parameter is not specified , its value will default to true and transactions will not be returned.
Example response for GET of previous bank reconciliations list
{
"EndBalance": -4980.0400,
"EndDate": "2014-01-21 12:00:00",
"Id": 129620,
"NewReconciliation": true,
"StartBalance": 1500.0000,
"StartDate": "2011-10-19 12:00:00",
"Status": "InComplete",
"Transactions": [{
"Comment": "INV #1632: ",
"Date": 2009-10-26 12:00:00,
"EditLink": "\/viewInvoice.asp?id=20035457",
"PaidIn": 1000.0000,
"PaidOut": 0.0000,
"Payee": "TEST02",
"PaymentId": 20183620,
"Reconciled": true,
"Type": "Sale - TEST02"
}, {
"Comment": "",
"Date": 2009-10-26 12:00:00,
"EditLink": "\/editBankTX.asp?id=19348259",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 19348259,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": 2009-10-26 12:00:00,
"EditLink": "\/editBankTX.asp?id=19639598",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 19639598,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": 2009-10-26 12:00:00,
"EditLink": "\/editBankTX.asp?id=19897504",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 19897504,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": 2009-10-26 12:00:00,
"EditLink": "\/editBankTX.asp?id=20147745",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 20147745,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": 2009-10-26 12:00:00,
"EditLink": "\/editBankTX.asp?id=20278361",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 20278361,
"Reconciled": true,
"Type": "Staff Salaries"
}]
}
GET Operation
Gets reconciliation metadata for a bank account. e.g if a reconciliation is already in progress or start balance/start date of next reconciliation.URL : /bankaccounts/{bankaccountid}/reconciliations/metadata
Method : GET
It either returns NextReconciliationStartDate and NextReconciliationStartBalance or InProgressReconciliationId depending on whether a reconciliation is already in progress or not.
Reconciliation metadata parameters
Name | Type | Description |
---|---|---|
InProgressReconciliationId | Numeric | If a reconciliation is already in progress, it will contain it’s reconciliationId. Otherwise, this property will not be returned in response. |
NextReconciliationStartDate | Date | The start date of next reconciliation i.e. the one which will be created now. This property will not be present in response if there is a reconciliation already in progress. Because new reconciliation cannot be created unless a previous in-progress one is completed. |
NextReconciliationStartBalance | Numeric | The start balance of next reconciliation i.e. the one which will be created now. This property will not be present in response if there is a reconciliation already in progress. Because new reconciliation cannot be created unless a previous in-progress one is completed. |
Example response of GET metadata
{
"NextReconciliationStartBalance": 4980.0000,
"NextReconciliationStartDate": "2014-01-21 12:00:00",
}
POST Operation
Creates a reconciliation for a given bank account and returns reconciliation and it’s transactions.To create a reconciliation –
URL : /bankaccounts/{bankaccountid}/reconciliations
Method : POST
EndDate and EndBalance values should be provided compulsorily.
Note: If any previous incomplete reconciliation exists, new reconciliation cannot be created.
Example request
{
"EndBalance": 4980.0400,
"EndDate": "2014-01-21 12:00:00",
}
Example response
{
"EndBalance": -4980.0400,
"EndDate": "2014-01-21 12:00:00",
"Id": 129620,
"LatestReconciliation": true,
"StartBalance": 1500.0000,
"StartDate": "2011-10-19 12:00:00",
"Status": "InComplete",
"Transactions": [{
"Comment": "INV #1632: ",
"Date": 2013-11-10 12:00:00,
"EditLink": "\/viewInvoice.asp?id=20035457",
"PaidIn": 1000.0000,
"PaidOut": 0.0000,
"Payee": "TEST02",
"PaymentId": 20183620,
"Reconciled": true,
"Type": "Sale - TEST02"
}, {
"Comment": "",
"Date": null,
"EditLink": "\/editBankTX.asp?id=19348259",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 19348259,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": null,
"EditLink": "\/editBankTX.asp?id=19639598",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 19639598,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": null,
"EditLink": "\/editBankTX.asp?id=19897504",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 19897504,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": null,
"EditLink": "\/editBankTX.asp?id=20147745",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 20147745,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": null,
"EditLink": "\/editBankTX.asp?id=20278361",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 20278361,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": null,
"EditLink": "\/editBankTX.asp?id=24688021",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 24688021,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": null,
"EditLink": "\/editBankTX.asp?id=24841298",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 24841298,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": null,
"EditLink": "\/editBankTX.asp?id=25025656",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 25025656,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": null,
"EditLink": "\/editBankTX.asp?id=25216751",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 25216751,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": null,
"EditLink": "\/editBankTX.asp?id=25412774",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 25412774,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": null,
"EditLink": "\/editBankTX.asp?id=25564751",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 25564751,
"Reconciled": true,
"Type": "Staff Salaries"
}, {
"Comment": "",
"Date": null,
"EditLink": "\/editBankTX.asp?id=26345388",
"PaidIn": 0.0000,
"PaidOut": 200.0000,
"Payee": "",
"PaymentId": 26345388,
"Reconciled": true,
"Type": "Staff Salaries"
}]
}
PUT Operation
Updates a reconciliation’s header details for a given bank account and returns reconciliation header details.Note: Updating reconciliation done state and updating end date and end balance are mutually exclusive operations.
URL : /bankaccounts/{bankaccountid}/reconciliations/{reconciliationid}
Method : PUT
To update a reconciliation’s end balance and end date –
Note: End date and end balance can only be updated if it’s the latest reconciliation.
Example request
{
"EndBalance": 4980.0400,
"EndDate": "2014-01-21 12:00:00",
}
To update a reconciliation’s done state –
Example request
{
"ReconciliationDone": true
}
Example response
{
"EndBalance": -4980.0400,
"EndDate": "2014-01-21 12:00:00",
"Id": 129620,
"LatestReconciliation": true,
"StartBalance": 1500.0000,
"StartDate": "2011-10-19 12:00:00",
"Status": "InComplete"
}
PUT-Item Operation
Updates reconciliation status of transaction items for a given reconciliation and returns transaction items including failed ones if any.parameters
Transaction items which need to be reconciled.Transaction items which need to be unreconciled.Transaction items which could not be reconciled/unreconciled and failed due to any specific reason.
Name | Type | Description |
---|---|---|
Reconcile parameters | ||
Id | Numeric | Id of transaction item. |
Type | Numeric | Type of transaction item in integer. |
UnReconcile parameters | ||
Id | Numeric | Id of transaction item. |
Type | Numeric | Type of transaction item in integer. |
Failed parameters | ||
Id | Numeric | Id of transaction item. |
Type | Numeric | Type of transaction item in integer. |
Type parameter values
Value | Description |
---|---|
0 | Bank Transaction |
1 | Invoice Payment |
2 | Receipt Payment |
3 | Invoice Bulk Payment |
4 | Receipt Bulk Payment |
5 | Journal |
6 | Bank Transfer |
URL : /bankaccounts/{bankaccountid}/reconciliations/{reconciliationid}/transactions
Method : PUT
To update reconciliation status of transaction items –
Example request
{
"Reconcile": [{"Id": 456, "Type": 2}, {"Id": 457, "Type": 2}],
"UnReconcile": [{"Id": 458, "Type": 2}, {"Id": 459, "Type": 3}]
}
Example response
{
"Failed": [{"Id": 458, "Type": 2}]
}
DELETE Operation
Deletes a bank reconciliation provided in the URL.URL : /bankaccounts/{bankaccountId}/reconciliations/{reconciliationId}