Get Loan By ID
curl --request GET \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/credit/loan/{loanId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/credit/loan/{loanId}"
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/credit/loan/{loanId}', 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/credit/loan/{loanId}",
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/credit/loan/{loanId}"
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/credit/loan/{loanId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/credit/loan/{loanId}")
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": "Loan fetched successfully,
"data": {
"id": "67f67f0f8b28995e47bed8db",
"borrower": "67d3267b6b2f7dfc493db74a",
"creditor": "624598bd83067c00f691c0ca",
"amount": 840000,
"currency": "NGN",
"repayment_amount": 796000,
"repayment_date": "Wed Jul 09 2025 15:07:06 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-09T14:07:11.828Z",
"updated_at": "2025-04-09T14:07:36.091Z",
"collaterals": [
{
"name": "CredPal2",
"token_id": "67e30ac4c6ee9dd9cc0fe0e4",
"quantity": 0
},
{
"name": "CredPal",
"token_id": "66b3dd8b7f741f367b960f26",
"quantity": 52.36842105263158
}
]
}
}
Credit Loan
Get Loan By ID
Fetches a single loan using its ID.
GET
/
api
/
credit
/
loan
/
{loanId}
Get Loan By ID
curl --request GET \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/credit/loan/{loanId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/credit/loan/{loanId}"
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/credit/loan/{loanId}', 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/credit/loan/{loanId}",
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/credit/loan/{loanId}"
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/credit/loan/{loanId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/credit/loan/{loanId}")
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": "Loan fetched successfully,
"data": {
"id": "67f67f0f8b28995e47bed8db",
"borrower": "67d3267b6b2f7dfc493db74a",
"creditor": "624598bd83067c00f691c0ca",
"amount": 840000,
"currency": "NGN",
"repayment_amount": 796000,
"repayment_date": "Wed Jul 09 2025 15:07:06 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-09T14:07:11.828Z",
"updated_at": "2025-04-09T14:07:36.091Z",
"collaterals": [
{
"name": "CredPal2",
"token_id": "67e30ac4c6ee9dd9cc0fe0e4",
"quantity": 0
},
{
"name": "CredPal",
"token_id": "66b3dd8b7f741f367b960f26",
"quantity": 52.36842105263158
}
]
}
}
The id of the loan being repaid.
{
"status": "success",
"message": "Loan fetched successfully,
"data": {
"id": "67f67f0f8b28995e47bed8db",
"borrower": "67d3267b6b2f7dfc493db74a",
"creditor": "624598bd83067c00f691c0ca",
"amount": 840000,
"currency": "NGN",
"repayment_amount": 796000,
"repayment_date": "Wed Jul 09 2025 15:07:06 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-09T14:07:11.828Z",
"updated_at": "2025-04-09T14:07:36.091Z",
"collaterals": [
{
"name": "CredPal2",
"token_id": "67e30ac4c6ee9dd9cc0fe0e4",
"quantity": 0
},
{
"name": "CredPal",
"token_id": "66b3dd8b7f741f367b960f26",
"quantity": 52.36842105263158
}
]
}
}
Was this page helpful?
⌘I
