Disbursements

A disbursement represents a disbursal of funds (from Felloh managed accounts), that have been disbursed to one of your beneficiaries.

An example of a disbursement Object

{
"id": "919c9dba-0102-11ed-b939-0242ac120002",
"amount": 1060200,
"currency": "GBX",
"bank_reference": "X9876-080720221401",
"created_at": "2022-07-08T14:08:04.130Z",
"receiving_account": {
"iban": "GB89BARC20040444858415",
"account_number": "12345678",
"sort_code": "102030",
"name": "FELLOH",
"created_at": "2022-01-16T06:52:42.423Z",
},
"transactions": [
{
"id": "99ede88e-0102-11ed-b939-0242ac120002",
"amount": 72500,
"currency": "GBX",
"created_at": "2022-07-07T09:25:07.982Z",
"completed_at": "2022-07-07T09:25:07.982Z"
},
{
"id": "9f284f24-0102-11ed-b939-0242ac120002",
"amount": 987700,
"currency": "GBX",
"created_at": "2022-07-07T16:34:25.482Z",
"completed_at": "2022-07-07T16:34:25.482Z"
}
]
}

idstring

Unique identifier for the object

amountinteger

The total sum of what was disbursed

currencystring

The currency of the disbursement | see currency documentation

bank_referencestring

A unique reference sent with the payment

created_atdatetime

The datetime at which the object was created within our systems

receiving_accountobject

A bank object detailing the destination account of the beneficiary.

transactionsarray

An array containing all compact transaction objects linked to the disbursement


Fetch all

POST/ledger/disbursements

import axios from 'axios';
const response = await axios(
{
method: 'post',
url: 'https://api.felloh.com/ledger/disbursements',
data: {
organisation: 'X9876',
skip: 10,
take: 20
},
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
}
);
require 'vendor/autoload.php';
use GuzzleHttp\Client;
function getDisbursements($token) {
$url = 'https://api.felloh.com/ledger/disbursements';
$client = new Client();
$response = $client->post($url, [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $token,
],
'json' => [
'organisation' => 'X9876',
'skip' => 10,
'take' => 20
]
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = 'YOUR_TOKEN_HERE'; // Replace with the actual token
$response = getDisbursements($token);
import requests
import json
def post_ledger_disbursements(organisation, skip, take, access_token):
api_url = 'https://api.felloh.com/ledger/disbursements'
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_ledger_disbursements('X9876', 10, 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 PostLedgerDisbursements("X9876", 10, 20, "<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> PostLedgerDisbursements(string organisation, int skip, int take, string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = "https://api.felloh.com/ledger/disbursements";
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();
}
}
}

JSON RESPONSE Defined by type parameter being NULL or 'json'

{
"data": [
{
"id": "919c9dba-0102-11ed-b939-0242ac120002",
"amount": 1060200,
"currency": "GBX",
"bank_reference": "X9876-080720221401",
"created_at": "2022-07-08T14:08:04.130Z",
"receiving_account": {
"iban": "GB89BARC20040444858415",
"account_number": "12345678",
"sort_code": "102030",
"name": "FELLOH",
"created_at": "2022-01-16T06:52:42.423Z",
},
"transactions": [
{
"id": "99ede88e-0102-11ed-b939-0242ac120002",
"amount": 72500,
"currency": "GBX",
"created_at": "2022-07-07T09:25:07.982Z",
"completed_at": "2022-07-07T09:25:07.982Z"
},
{
"id": "9f284f24-0102-11ed-b939-0242ac120002",
"amount": 987700,
"currency": "GBX",
"created_at": "2022-07-07T16:34:25.482Z",
"completed_at": "2022-07-07T16:34:25.482Z"
}
]
}
],
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6",
"count": 1
}
}

CSV RESPONSE Defined by type parameter being 'csv'

{
"data": {
"url": "https://ledger-production-reports.s3.eu-west-2.amazonaws.com/02803bec-dddf-4f3e-902d-ef0e42a856af.csv"
},
"errors": [],
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "02803bec-dddf-4f3e-902d-ef0e42a856af",
"count": 184
}
}

This endpoint retrieves all disbursements. Disbursements are sorted by creation date, with the most recent disbursement coming first.

HTTP Method

POST

HTTP Endpoint

PRODhttps://api.felloh.com/ledger/disbursements

SANDBOXhttps://sandbox.felloh.com/ledger/disbursements

Payload

ParameterRequiredTypeDescription
organisationtruestringThe organisation ID that you want to fetch disbursements for. 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
show-child-organisationsfasleBooleanWhether to also show disbursements for any of the requested organisations child organisations
typefaslestringCan be 'csv' or 'json', defaults to json
date_fromfalsedateThe date that you want to get disubrsements from, in ISO 8601 format
date_tofalsedateThe date that you want to get disubrsements to, in ISO 8601 format
keywordfalsestringA bank reference that you want to filter by

Response

Returns an array of Disbursement Objects


Fetch one

GET/ledger/disbursements/919c9dba-0102-11ed-b939-0242ac120002

import axios from 'axios';
const disbursementID = '919c9dba-0102-11ed-b939-0242ac120002';
const response = await axios(
{
method: 'get',
url: `https://api.felloh.com/ledger/disbursements/${disbursementID}`,
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer <YOUR TOKEN HERE>`,
},
}
);
use GuzzleHttp\Client;
function getDisbursement($token, $disbursementID) {
$url = "https://api.felloh.com/ledger/disbursements/{$disbursementID}";
$client = new Client();
$response = $client->get($url, [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $token,
],
]);
$data = json_decode($response->getBody(), true);
return $data;
}
$token = 'YOUR_TOKEN_HERE'; // Replace with the actual token
$disbursementID = '919c9dba-0102-11ed-b939-0242ac120002'; // Replace with the actual disbursement ID
$response = getDisbursement($token, $disbursementID);
import requests
def get_ledger_disbursement(disbursement_id, access_token):
api_url = f'https://api.felloh.com/ledger/disbursements/{disbursement_id}'
headers = {
'Content-Type': 'application/json',
'Authorization': f'Bearer {access_token}'
}
response = requests.get(api_url, headers=headers)
response.raise_for_status()
return response.text
disbursement_id = '919c9dba-0102-11ed-b939-0242ac120002'
response_data = get_ledger_disbursement(disbursement_id, '<YOUR TOKEN HERE>')
print(response_data)
using System;
using System.Net.Http;
using System.Threading.Tasks;
class Program
{
static async Task Main()
{
string disbursementId = "919c9dba-0102-11ed-b939-0242ac120002";
var response = await GetLedgerDisbursement(disbursementId, "<YOUR TOKEN HERE>");
Console.WriteLine(response);
}
static async Task<string> GetLedgerDisbursement(string disbursementId, string accessToken)
{
using (HttpClient client = new HttpClient())
{
string apiUrl = $"https://api.felloh.com/ledger/disbursements/{disbursementId}";
client.DefaultRequestHeaders.Add("Content-Type", "application/json");
client.DefaultRequestHeaders.Add("Authorization", $"Bearer {accessToken}");
var httpResponse = await client.GetAsync(apiUrl);
httpResponse.EnsureSuccessStatusCode();
return await httpResponse.Content.ReadAsStringAsync();
}
}
}

RESPONSE

{
"data": {
"id": "919c9dba-0102-11ed-b939-0242ac120002",
"amount": 1060200,
"currency": "GBX",
"bank_reference": "X9876-080720221401",
"created_at": "2022-07-08T14:08:04.130Z",
"receiving_account": {
"iban": "GB89BARC20040444858415",
"account_number": "12345678",
"sort_code": "102030",
"name": "FELLOH",
"created_at": "2022-01-16T06:52:42.423Z",
},
"transactions": [
{
"id": "99ede88e-0102-11ed-b939-0242ac120002",
"amount": 72500,
"currency": "GBX",
"created_at": "2022-07-07T09:25:07.982Z",
"completed_at": "2022-07-07T09:25:07.982Z"
},
{
"id": "9f284f24-0102-11ed-b939-0242ac120002",
"amount": 987700,
"currency": "GBX",
"created_at": "2022-07-07T16:34:25.482Z",
"completed_at": "2022-07-07T16:34:25.482Z"
}
]
},
"errors": {},
"meta": {
"code": 200,
"reason": "OK",
"message": "The request was successful",
"request_id": "cdd40f5c-9d82-44c2-92e3-b5d2cad364f6"
}
}

This endpoint allows you to retrieve a single disbursement

HTTP Method

GET

HTTP Endpoint

PRODhttps://api.felloh.com/ledger/disbursements/<DISBURSEMENT ID>

SANDBOXhttps://sandbox.felloh.com/ledger/disbursements/<DISBURSEMENT ID>

Path Parameters

ParameterRequiredTypeDescription
disbursementtrueUUIDThe disbursement id that you wish to retrieve

Response

Returns a Disbursement Object