# Retrieve a Loan

`GET /lokta-lms/api/v1/loans/{loanId}`

Note: template=true parameter doesn't apply to this resource.Example Requests:

loans/1


loans/1?fields=id,principal,annualInterestRate


loans/1?associations=all

loans/1?associations=all&exclude=guarantors


loans/1?fields=id,principal,annualInterestRate&associations=repaymentSchedule,transactions

## Parameters
- `loanId` (path, integer, required): loanId
- `staffInSelectedOfficeOnly` (query, boolean): staffInSelectedOfficeOnly
- `associations` (query, string): Loan object relations to be included in the response
- `exclude` (query, string): Optional Loan object relation list to be filtered in the response
- `fields` (query, string): Optional Loan attribute list to be in the response

## Responses
- `200`: OK

## Response fields
- `accountNo` (string)
- `actualNoTerm` (integer)
- `allowFullTermForTranche` (boolean): Allow full term length for each tranche disbursement
- `amortizationType` (GetLoansLoanIdAmortizationType)
- `annualInterestRate` (number)
- `approvedPrincipal` (number)
- `buyDownFeeCalculationType` (StringEnumOptionData)
- `buyDownFeeIncomeType` (StringEnumOptionData)
- `buyDownFeeStrategy` (StringEnumOptionData)
- `capitalizedIncomeCalculationType` (StringEnumOptionData)
- `capitalizedIncomeStrategy` (StringEnumOptionData)
- `capitalizedIncomeType` (StringEnumOptionData)
- `chargeOffBehaviour` (StringEnumOptionData)
- `chargedOff` (boolean)
- `charges` (array of GetLoansLoanIdLoanChargeData): Set of charges
- `clientExternalId` (string)
- `clientId` (integer)
- `clientName` (string)
- `clientOfficeId` (integer)
- `currency` (GetLoansLoanIdCurrency): currency
- `delinquencyRange` (DelinquencyRangeData)
- `delinquent` (GetLoansLoanIdDelinquencySummary): Delinquent data
- `disallowExpectedDisbursements` (boolean)
- `disbursedAmountPercentageForDownPayment` (number)
- `disbursementDetails` (array of GetLoansLoanIdDisbursementDetails): Set of GetLoansLoanIdDisbursementDetails
- `emiAmountVariations` (array of GetLoansLoanIdLoanTermVariations): List of GetLoansLoanIdLoanTermVariations
- `enableAutoRepaymentForDownPayment` (boolean)
- `enableBuyDownFee` (boolean)
- `enableDownPayment` (boolean)
- `enableIncomeCapitalization` (boolean)
- `enableInstallmentLevelDelinquency` (boolean)
- `externalId` (string)
- `fixedLength` (integer)
- `fixedPrincipalPercentagePerInstallment` (number)
- `fraud` (boolean)
- `graceOnArrearsAgeing` (integer)
- `graceOnInterestCharged` (integer)
- `graceOnInterestPayment` (integer)
- `graceOnPrincipalPayment` (integer)
- `id` (integer)
- `inArrearsTolerance` (integer)
- `interestCalculationPeriodType` (GetLoansLoanIdInterestCalculationPeriodType)
- `interestRateFrequencyType` (GetLoansLoanIdInterestRateFrequencyType)
- `interestRatePerPeriod` (number)
- `interestRecognitionOnDisbursementDate` (boolean)
- `interestType` (GetLoansLoanIdInterestType)
- `isFloatingInterestRate` (boolean)
- `lastClosedBusinessDate` (string)
- `loanOfficerId` (integer)
- `loanOfficerName` (string)
- `loanProductDescription` (string)
- `loanProductId` (integer)
- `loanProductName` (string)
- `loanPurposeId` (integer)
- `loanPurposeName` (string)
- `loanScheduleProcessingType` (EnumOptionData)
- `loanScheduleType` (EnumOptionData)
- `loanTermVariations` (array of GetLoansLoanIdLoanTermVariations): List of GetLoansLoanIdLoanTermVariations
- `loanType` (GetLoansLoanIdLoanType)
- `netDisbursalAmount` (number)
- `numberOfRepayments` (integer)
- `originators` (array of GetLoansLoanIdOriginatorData): List of originators associated with this loan
- `overpaidOnDate` (string)
- `principal` (number)
- `proposedPrincipal` (number)
- `repaymentEvery` (integer)
- `repaymentFrequencyType` (GetLoansLoanIdRepaymentFrequencyType)
- `repaymentSchedule` (GetLoansLoanIdRepaymentSchedule)
- `repaymentStartDateType` (EnumOptionData)
- `status` (GetLoansLoanIdStatus)
- `summary` (GetLoansLoanIdSummary)
- `termFrequency` (integer)
- `termPeriodFrequencyType` (GetLoansLoanIdTermPeriodFrequencyType)
- `timeline` (GetLoansLoanIdTimeline)
- `totalOverpaid` (number)
- `transactionProcessingStrategyCode` (string)
- `transactions` (array of GetLoansLoanIdTransactions): Set of GetLoansLoanIdTransactions

## Example request (cURL)
```bash
curl -X GET \
  'http://localhost:8080/lokta-lms/api/v1/loans/{loanId}' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default'
```

## Example response
```json
{
  "accountNo": "000000001",
  "actualNoTerm": 6,
  "allowFullTermForTranche": false,
  "amortizationType": {
    "code": "amortizationType.equal.installments",
    "description": "Equal installments",
    "id": 1
  }
}
```

Interactive: https://developer.lokta.ai/reference.html#operation/retrieveOneLoan
