Ledger History by Interaction ID
curl --request GET \
--url https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id \
--header 'X-Auth-Token: <x-auth-token>' \
--header 'platform: <platform>' \
--header 'uuid: <uuid>' \
--header 'x-fapi-interaction-id: <x-fapi-interaction-id>'import requests
url = "https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id"
headers = {
"platform": "<platform>",
"uuid": "<uuid>",
"X-Auth-Token": "<x-auth-token>",
"x-fapi-interaction-id": "<x-fapi-interaction-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
platform: '<platform>',
uuid: '<uuid>',
'X-Auth-Token': '<x-auth-token>',
'x-fapi-interaction-id': '<x-fapi-interaction-id>'
}
};
fetch('https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Auth-Token: <x-auth-token>",
"platform: <platform>",
"uuid: <uuid>",
"x-fapi-interaction-id: <x-fapi-interaction-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("platform", "<platform>")
req.Header.Add("uuid", "<uuid>")
req.Header.Add("X-Auth-Token", "<x-auth-token>")
req.Header.Add("x-fapi-interaction-id", "<x-fapi-interaction-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id")
.header("platform", "<platform>")
.header("uuid", "<uuid>")
.header("X-Auth-Token", "<x-auth-token>")
.header("x-fapi-interaction-id", "<x-fapi-interaction-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["platform"] = '<platform>'
request["uuid"] = '<uuid>'
request["X-Auth-Token"] = '<x-auth-token>'
request["x-fapi-interaction-id"] = '<x-fapi-interaction-id>'
response = http.request(request)
puts response.read_bodyAPI Endpoints
Ledger History by ID
Retrieves ledger entries matching a specific interaction ID (external correlation ID).
GET
/
ledger
/
account-ledger-history-interaction-id
Ledger History by Interaction ID
curl --request GET \
--url https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id \
--header 'X-Auth-Token: <x-auth-token>' \
--header 'platform: <platform>' \
--header 'uuid: <uuid>' \
--header 'x-fapi-interaction-id: <x-fapi-interaction-id>'import requests
url = "https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id"
headers = {
"platform": "<platform>",
"uuid": "<uuid>",
"X-Auth-Token": "<x-auth-token>",
"x-fapi-interaction-id": "<x-fapi-interaction-id>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {
platform: '<platform>',
uuid: '<uuid>',
'X-Auth-Token': '<x-auth-token>',
'x-fapi-interaction-id': '<x-fapi-interaction-id>'
}
};
fetch('https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Auth-Token: <x-auth-token>",
"platform: <platform>",
"uuid: <uuid>",
"x-fapi-interaction-id: <x-fapi-interaction-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("platform", "<platform>")
req.Header.Add("uuid", "<uuid>")
req.Header.Add("X-Auth-Token", "<x-auth-token>")
req.Header.Add("x-fapi-interaction-id", "<x-fapi-interaction-id>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id")
.header("platform", "<platform>")
.header("uuid", "<uuid>")
.header("X-Auth-Token", "<x-auth-token>")
.header("x-fapi-interaction-id", "<x-fapi-interaction-id>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["platform"] = '<platform>'
request["uuid"] = '<uuid>'
request["X-Auth-Token"] = '<x-auth-token>'
request["x-fapi-interaction-id"] = '<x-fapi-interaction-id>'
response = http.request(request)
puts response.read_bodyFetches all ledger entries that were processed with a specific interaction ID (external correlation ID). This is useful for retrieving all transactions related to a single interaction or session.
Request Headers
string
required
The JWT Access Token obtained from the
/login or /refresh-token endpoint.string
required
The interaction ID (external correlation ID) to search for. This should be a UUID.
string
required
The date and time at which the request was initiated (ISO 8601 format).
string
required
The IP address of the customer making the request.
Code Examples
curl --location 'https://{domain}.fincode.software/api/v6/services/ledger/account-ledger-history-interaction-id' \
--header 'X-Auth-Token: YOUR_JWT_ACCESS_TOKEN' \
--header 'x-fapi-interaction-id: 123e4567-e89b-12d3-a456-426614174000' \
--header 'x-fapi-auth-date: 2024-01-15T10:30:00Z' \
--header 'x-fapi-customer-ip-address: 192.168.1.1'
const axios = require('axios');
const BASE_URL = 'https://{domain}.fincode.software/api/v6/services/ledger';
async function getLedgerHistoryByInteractionId(accessToken, interactionId) {
try {
const response = await axios.get(
`${BASE_URL}/account-ledger-history-interaction-id`,
{
headers: {
'X-Auth-Token': accessToken,
'x-fapi-interaction-id': interactionId,
'x-fapi-auth-date': new Date().toISOString(),
'x-fapi-customer-ip-address': '192.168.1.1',
},
}
);
console.log(`Found ${response.data.data.length} transactions with interaction ID ${interactionId}:`);
response.data.data.forEach((entry) => {
console.log(
`${entry.executionDate}: ${entry.ledgerType} ` +
`${entry.transactionAmount} (Balance: ${entry.newBalance})`
);
});
return response.data.data;
} catch (error) {
console.error(
'Failed to fetch ledger history:',
error.response?.data || error.message
);
throw error;
}
}
⌘I
