Bank

The bank object represents your source and destination bank accounts, these can exist for money coming into or going out of your accounts.

The bank object is also included in calls to endpoints such as beneficiaries and payouts.

An example of a Bank Object

{
"id": "931450567731323125",
"iban": "GB89BARC20040444858415",
"account_number": "12345678",
"sort_code": "102030",
"name": "FELLOH"
}

idinteger

The unique identifier of the entry

ibanstring

The International Bank Account Number of the bank account.

account_numberstring

The account number of the bank account.

sort_codestring

The sort code of the bank account.

namestring

The user-friendly name of bank account holder.


Fetch all accounts

GET/bank/account

import axios from 'axios';
const response = await axios(
{
method: 'GET',
url: 'https://api.felloh.com/bank/account',
params: {
organisation: 'X9876'
},
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
},
);
use GuzzleHttp\Client;
function getBankAccount($token) {
$client = new Client();
$response = $client->get('https://api.felloh.com/bank/account', [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $token,
],
'query' => [
'organisation' => 'X9876',
],
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = 'YOUR_TOKEN_HERE'; // Replace with the actual token
$response = getBankAccount($token);
import requests
def get_bank_account_data(organisation, access_token):
api_url = 'https://api.felloh.com/bank/account'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
params = {
'organisation': organisation
}
response = requests.get(api_url, headers=headers, params=params)
response.raise_for_status()
return response.text
response_data = get_bank_account_data('X9876', '<YOUR TOKEN HERE>')
print(response_data)
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var response = await GetBankAccountData("X9876", "<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> GetBankAccountData(string organisation, string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = "https://api.felloh.com/bank/account";
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var queryString = $"?organisation={organisation}";
var fullApiUrl = $"{apiUrl}{queryString}";
var httpResponse = await client.GetAsync(fullApiUrl);
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsStringAsync();
}
}
}

RESPONSE

{
"data": [
{
"id": "931450567731323125",
"name": "Felloh account 1",
"created_at": "2023-01-24T16:12:21.306Z",
"updated_at": "2023-01-24T16:12:21.306Z",
"iban": "GB89BARC20040444858415",
"account_number": "123456",
"sort_code": "65-43-21"
},
{
"id": "931450567731323126",
"name": "Felloh account 2",
"created_at": "2023-01-24T16:12:21.306Z",
"updated_at": "2023-01-24T16:12:21.306Z",
"iban": "GB89BARC20040444858416",
"account_number": "123457",
"sort_code": "65-43-21"
}
],
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6",
"count": 2
}
}

This endpoint retrieves all bank accounts associated with the organisation.

HTTP Method

GET

HTTP Endpoint

PRODhttps://api.felloh.com/bank/account

SANDBOXhttps://sandbox.felloh.com/bank/account

Payload

ParameterRequiredTypeDescription
organisationtruestringThe organisation ID that you want to fetch banks for. You can find the organisation that you have access to by using the List all organisations method.

Response

Returns an array of Banks


Fetch account transactions

POST/bank/account/931450567731323125

import axios from 'axios';
const response = await axios(
{
method: 'post',
url: 'https://api.felloh.com/bank/account/931450567731323125',
data: {
organisation: 'X9876',
skip: 0,
take: 20
},
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
},
);
use GuzzleHttp\Client;
function getBankAccountDetails($token) {
$client = new Client();
$response = $client->post('https://api.felloh.com/bank/account/931450567731323125', [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $token,
],
'json' => [
'organisation' => 'X9876',
'skip' => 0,
'take' => 20,
],
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = 'YOUR_TOKEN_HERE'; // Replace with the actual token
$response = getBankAccountDetails($token);
import requests
import json
def post_bank_account_data(account_id, organisation, skip, take, access_token):
api_url = f'https://api.felloh.com/bank/account/{account_id}'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
data = {
'organisation': organisation,
'skip': skip,
'take': take
}
response = requests.post(api_url, headers=headers, data=json.dumps(data))
response.raise_for_status()
return response.text
response_data = post_bank_account_data('931450567731323125', 'X9876', 0, 20, '<YOUR TOKEN HERE>')
print(response_data)
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var response = await PostBankAccountData("931450567731323125", "X9876", 0, 20, "<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> PostBankAccountData(string accountId, string organisation, int skip, int take, string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = $"https://api.felloh.com/bank/account/{accountId}";
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var requestData = new
{
organisation = organisation,
skip = skip,
take = take
};
var content = new StringContent(Newtonsoft.Json.JsonConvert.SerializeObject(requestData), Encoding.UTF8, "application/json");
var httpResponse = await client.PostAsync(apiUrl, content);
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsStringAsync();
}
}
}

RESPONSE

{
"data": [
{
"id": "912523558539563950",
"posting_date": "2023-04-02",
"is_credit": true,
"is_debit": false,
"payee": null,
"payer": null,
"amount": 12704,
"currency": "GBP",
"description": "HX COVER",
"status": "posted",
"type": "Automated Credit",
"typeCode": "BAC",
"category": "uncategorized",
"created_at": "2023-04-05T09:01:03.806Z",
"updated_at": "2023-04-05T09:01:03.806Z",
"disbursal": null
},
{
"id": "122523549552375345",
"posting_date": "2023-04-02",
"is_credit": true,
"is_debit": false,
"payee": null,
"payer": null,
"amount": 1446131,
"currency": "GBP",
"description": "FELLOH GHCSCJNCNJSC FP 01/04/23",
"status": "posted",
"type": "Automated Credit",
"typeCode": "BAC",
"category": "income",
"created_at": "2023-04-05T09:01:03.754Z",
"updated_at": "2023-04-05T09:01:03.754Z",
"disbursal": {
"id": "8115e826-b1c3-4a20-b1b4-7727232275c25",
"amount": 1446131,
"bank_reference": "FBDKEGHXOWEJQXT0",
"created_at": "2023-03-03T18:01:22.185Z",
"currency": "GBX",
"provider_reference": "abcdefghij",
"is_ledgered": false,
"is_manual_review": false,
"updated_legacy_system": false
}
}
],
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6",
"count": 2
}
}

This endpoint allows you to fetch all transactions for a specific bank account.

HTTP Method

POST

HTTP Endpoint

PRODhttps://api.felloh.com/bank/account/<BANK ACCOUNT ID>

SANDBOXhttps://sandbox.felloh.com/bank/account/<BANK ACCOUNT ID>

Payload

ParameterRequiredTypeDescription
organisationtruestringThe organisation ID that you owns the bank account. You can find the organisation that you have access to by using the List all organisations method.
skipfalseIntegerSee pagination section for details
takefalseIntegerSee pagination section for details

Response

dataarray

An array of ledger entries from your bank account

data.idinteger

The unique identifier of the entry

data.posting_datedate

The date that the entry was posted

data.is_creditboolean

Whether the entry is a credit to the account

data.is_debitboolean

Whether the entry is a debit from the account

data.payeestring

The name of the payee

data.payerstring

The name of the payer

data.amountinteger

The amount that the entry is for

data.currencystring

The currency that they entry is for

data.descriptionstring

The description of the entry

data.statusstring

The status of the entry

data.typestring

The translated type of entry (Automated Credit, Faster Payment, Etc...)

data.typeCodestring

The raw type provided by your bank

data.categorystring

A spending category that the categorisation system has applied to the entry

data.created_atdatetime

The datetime at which the entry was created

data.updated_atdatetime

The datetime at which the entry was last updated

data.disbursalobject

If a matching disbursal is found, provides a Disbursement Objects/p>


Fetch account statistics

GET/bank/statistics

import axios from 'axios';
const response = await axios(
{
method: 'get',
url: 'https://api.felloh.com/bank/statistics',
params: {
organisation: 'X9876'
},
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
},
);
use GuzzleHttp\Client;
function getBankStatistics($token) {
$client = new Client();
$response = $client->get('https://api.felloh.com/bank/statistics', [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $token,
],
'query' => [
'organisation' => 'X9876',
],
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = 'YOUR_TOKEN_HERE'; // Replace with the actual token
$response = getBankStatistics($token);
import requests
def get_bank_statistics(organisation, access_token):
api_url = 'https://api.felloh.com/bank/statistics'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
params = {
'organisation': organisation
}
response = requests.get(api_url, headers=headers, params=params)
response.raise_for_status()
return response.text
response_data = get_bank_statistics('X9876', '<YOUR TOKEN HERE>')
print(response_data)
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
var response = await GetBankStatistics("X9876", "<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> GetBankStatistics(string organisation, string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = "https://api.felloh.com/bank/statistics";
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var queryString = $"?organisation={organisation}";
var fullApiUrl = $"{apiUrl}{queryString}";
var httpResponse = await client.GetAsync(fullApiUrl);
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsStringAsync();
}
}
}

RESPONSE

{
"data": {
"accounts": {
"count": 2,
"last_sync": "2023-01-24T16:12:21.306Z",
"items": [
{
"id": "931450567790697385",
"payee_iban": "DE12345678912345678912",
"payer_iban": "DE11100110012612442222",
"amount": -900,
"description": "Sample transaction 2 for 2023-01-24",
"status": "posted",
"category": "provider_fee",
"created_at": "2023-01-24T16:12:22.614Z",
"updated_at": "2023-01-24T16:12:22.614Z"
},
{
"id": "931450567790697384",
"payee_iban": "DE11100110012612442222",
"payer_iban": "DE12345678912345678912",
"amount": 900,
"description": "Sample transaction 1 for 2023-01-24",
"status": "posted",
"category": "fees_and_charges",
"created_at": "2023-01-24T16:12:22.401Z",
"updated_at": "2023-01-24T16:12:22.401Z"
}
]
}
},
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6"
}
}

This endpoint displays statistics and accounts for an organisation.

HTTP Method

GET

HTTP Endpoint

PRODhttps://api.felloh.com/bank/statistics

SANDBOXhttps://sandbox.felloh.com/statistics

Payload

ParameterRequiredTypeDescription
organisationtruestringThe organisation ID that you want to fetch banks for. You can find the organisation that you have access to by using the List all organisations method.

Response

accounts.countinteger

The number of bank accounts linked to the organisation

accounts.last_syncdatetime

The datetime at which the organisations bank account was last synchronised.

accounts.itemsarray

An array of Banks objects.