Get Loans By Creditor
curl --request GET \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans \
--header 'Authorization: Bearer <token>'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans', 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://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Loans fetched successfully",
"data": {
"page": 1,
"limit": 5,
"sort": {
"created_at": -1
},
"docs": [
{
"id": "67ef86a1ad2aff781bf01810",
"borrower": "67d3267b6b2f7dfc493db74a",
"creditor": "624598bd83067c00f691c0ca",
"amount": 840000,
"currency": "NGN",
"repayment_amount": 1096000,
"repayment_date": "Fri Jul 04 2025 08:13:30 GMT+0100 (West Africa Standard Time)",
"interest_rate": 0.3,
"duration": 3,
"status": "ACTIVE",
"grace_period": 5,
"grace_period_unit": "DAYS",
"reason": "Personal Use",
"created_at": "2025-04-04T07:13:37.093Z",
"updated_at": "2025-04-04T07:14:01.042Z"
}
],
"totalDocs": 25,
"totalPages": 5,
"hasPrevPage": false,
"hasNextPage": true
}
}
Credit Loan
Get Loans By Creditor
Retrieves all loans for the authenticated creditor with pagination support.
GET
/
api
/
creditor
/
credit
/
loans
Get Loans By Creditor
curl --request GET \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans \
--header 'Authorization: Bearer <token>'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans', 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://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/creditor/credit/loans")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Loans fetched successfully",
"data": {
"page": 1,
"limit": 5,
"sort": {
"created_at": -1
},
"docs": [
{
"id": "67ef86a1ad2aff781bf01810",
"borrower": "67d3267b6b2f7dfc493db74a",
"creditor": "624598bd83067c00f691c0ca",
"amount": 840000,
"currency": "NGN",
"repayment_amount": 1096000,
"repayment_date": "Fri Jul 04 2025 08:13:30 GMT+0100 (West Africa Standard Time)",
"interest_rate": 0.3,
"duration": 3,
"status": "ACTIVE",
"grace_period": 5,
"grace_period_unit": "DAYS",
"reason": "Personal Use",
"created_at": "2025-04-04T07:13:37.093Z",
"updated_at": "2025-04-04T07:14:01.042Z"
}
],
"totalDocs": 25,
"totalPages": 5,
"hasPrevPage": false,
"hasNextPage": true
}
}
Page number for pagination (default: 1).
Number of items per page (default: 10).
{
"status": "success",
"message": "Loans fetched successfully",
"data": {
"page": 1,
"limit": 5,
"sort": {
"created_at": -1
},
"docs": [
{
"id": "67ef86a1ad2aff781bf01810",
"borrower": "67d3267b6b2f7dfc493db74a",
"creditor": "624598bd83067c00f691c0ca",
"amount": 840000,
"currency": "NGN",
"repayment_amount": 1096000,
"repayment_date": "Fri Jul 04 2025 08:13:30 GMT+0100 (West Africa Standard Time)",
"interest_rate": 0.3,
"duration": 3,
"status": "ACTIVE",
"grace_period": 5,
"grace_period_unit": "DAYS",
"reason": "Personal Use",
"created_at": "2025-04-04T07:13:37.093Z",
"updated_at": "2025-04-04T07:14:01.042Z"
}
],
"totalDocs": 25,
"totalPages": 5,
"hasPrevPage": false,
"hasNextPage": true
}
}
Was this page helpful?
⌘I
