Convert your bank statement to JSON with One Simple Request

javascript Copy
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');

let data = new FormData();
data.append('statement', fs.createReadStream('<path_to_your_bank_statement_file>'));
data.append('apiKey', '<your_api_key>');

let config = {
    method: 'post',
    maxBodyLength: Infinity,
    url: 'https://api.bankintotal.com/api/statement/upload',
    headers: { 
        ...data.getHeaders()
    },
    data : data
};

axios.request(config)
    .then((response) => {
        console.log(response.data);
    })
    .catch((error) => {
        console.log(error);
    });

  • Replace <path_to_your_bank_statement_file> with your bank statement file path

  • Replace <your_api_key> with your API Key that you can get it from here

You will get a response like that:

Some attributes may not exist depend on the transaction type

json Copy
{
  "account": {
    "name": "string",
    "number": "string",
    "rib": "string",
    "startingBalance": "number",
    "endingBalance": "number",
    "bankName": "string",
    "currency": "string"
  },
  "period": {
    "from": "string",
    "to": "string"
  };
  "transactions": [
    {
    "startDate": "string", // Date in string format
    "endDate": "string", // Date in string format
    "amount": "number",
    "description": "string",
    "type": "transactionType", // could be: transfer , withdrawal
    "transferType": "string", // is issued or received transfer
    "from": "string", // 
    "isFees": "boolean", // is it a transfer fees or not
    "time": {
      "hour": "number",
      "minute": "number"
      },
    "bank": "string",
    "city": "string",
    "isByInternet": "boolean",
    "isInternational": "boolean",
    "isByCard": "boolean",
    "isInvoice": "boolean",
    "to": "string",
    "card": "string",
    "service": "string",
    "byTo": "string",
    "service": "string",
    "ref": "string",
    }
  ]
}