Get Repayment Schedule
Overview​
GetRepaymentScheduleQuery retrieves the full repayment schedule for a loan quote, including per-installment principal, interest, total due, outstanding balance, payment status, and any paid amounts.
The schedule is created by
SetCollectionDetailsCommand. If no schedule exists for the loan, a04error is returned.
Command Details​
- Command:
GetRepaymentScheduleQuery - Type: Query (read-only)
API Endpoint​
POST /api/bpm/cmd
Request Structure​
| Field | Type | Required | Description |
|---|---|---|---|
loanRequestId | long | Yes | ID of the loan quote (LoanQuote.Id) |
Try It Out​
POST
/api/bpm/cmdGetRepaymentScheduleQueryRequest Body
Response Structure​
{
"response": {
"isSuccessful": true,
"statusCode": "00",
"message": "12 installment(s) in repayment schedule.",
"count": 12,
"data": {
"loanQuoteId": 1001,
"totalInstallments": 12,
"totalAmountDue": 560000.00,
"totalAmountPaid": 46666.67,
"outstandingAmount": 513333.33,
"schedule": [
{
"id": 1,
"installmentNumber": 1,
"dueDate": "2025-09-15T00:00:00Z",
"principalAmount": 41666.67,
"interestAmount": 5000.00,
"totalDue": 46666.67,
"outstandingBalance": 458333.33,
"status": "Paid",
"paidDate": "2025-09-15T08:30:00Z",
"amountPaid": 46666.67
},
{
"id": 2,
"installmentNumber": 2,
"dueDate": "2025-10-15T00:00:00Z",
"principalAmount": 41666.67,
"interestAmount": 5000.00,
"totalDue": 46666.67,
"outstandingBalance": 416666.67,
"status": "Pending",
"paidDate": null,
"amountPaid": null
}
]
}
},
"responseCode": "00",
"responseDescription": "Success"
}
Response Fields​
Summary​
| Field | Type | Description |
|---|---|---|
loanQuoteId | long | The loan quote ID |
totalInstallments | int | Total number of installments in the schedule |
totalAmountDue | decimal | Sum of all totalDue values across all installments |
totalAmountPaid | decimal | Sum of all amountPaid values (Paid/Waived installments) |
outstandingAmount | decimal | totalAmountDue - totalAmountPaid |
Per-Installment​
| Field | Type | Description |
|---|---|---|
id | long | Database ID of the schedule row |
installmentNumber | int | 1-based sequence number |
dueDate | datetime | Expected payment date |
principalAmount | decimal | Principal component of this installment |
interestAmount | decimal | Interest component of this installment |
totalDue | decimal | principalAmount + interestAmount |
outstandingBalance | decimal | Remaining principal balance after this installment |
status | string | Pending, Paid, Waived, Failed, or Skipped |
paidDate | datetime? | Date the installment was settled (or waived) |
amountPaid | decimal? | Amount actually collected (0 for waived installments) |
Error Responses​
| Status Code | Message |
|---|---|
04 | "No repayment schedule found for this loan. Set collection details first." |
Related Commands​
- Set Collection Details — Generate or regenerate the schedule
- Waive Installment — Mark an installment as settled outside the system