The Loan Application API allows authorized clients to submit loan requests for registered customers.
POST /api/loans/apply
Base URL: https://banking.finserv.com.ng
This endpoint requires an API key.
| Header | Value |
|---|---|
| x-api-key | Your assigned API key |
| Key | Value |
|---|---|
| Content-Type | application/json |
| x-api-key | YOUR_SECURE_API_KEY |
{
"customerId": "CUST123456",
"accountId": "ACCT654321",
"loanType": "Business Loan",
"amount": 1000000,
"repaymentFrequency": "monthly",
"repaymentPeriod": "6 months"
}
{
"loanId": "LOAN123456",
"customerId": "CUST123456",
"accountId": "ACCT654321",
"loanType": "Business Loan",
"amount": 1000000,
"repaymentFrequency": "monthly",
"repaymentPeriod": "6 months",
"status": "pending approval"
}
{"error": "All parameters are required"}{"error": "Customer or Account not found"}{"error": "API Key is missing"}{"error": "Invalid API Key"}fetch("https://banking.finserv.com.ng/api/loans/apply", {
method: "POST",
headers: {
"Content-Type": "application/json",
"x-api-key": "YOUR_SECURE_API_KEY"
},
body: JSON.stringify({
customerId: "CUST123456",
accountId: "ACCT654321",
loanType: "Business Loan",
amount: 1000000,
repaymentFrequency: "monthly",
repaymentPeriod: "6 months"
})
})
.then(response => response.json())
.then(data => {
console.log("Loan ID:", data.loanId);
console.log("Customer ID:", data.customerId);
console.log("Account ID:", data.accountId);
console.log("Loan Type:", data.loanType);
console.log("Amount:", data.amount);
console.log("Repayment Frequency:", data.repaymentFrequency);
console.log("Repayment Period:", data.repaymentPeriod);
console.log("Status:", data.status);
})
.catch(error => console.error("Error:", error));
Set method to POST, URL to https://banking.finserv.com.ng/api/loans/apply, add headers, and body as shown above.