# Retrieve Loan Transaction Template

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

This is a convenience resource. It can be useful when building maintenance user interface screens for client applications. The template data returned consists of any or all of:

Field Defaults
Allowed Value Lists

Example Requests:

loans/1/transactions/template?command=repaymentloans/1/transactions/template?command=merchantIssuedRefundloans/1/transactions/template?command=payoutRefundloans/1/transactions/template?command=goodwillCredit
loans/1/transactions/template?command=waiveinterest
loans/1/transactions/template?command=writeoff
loans/1/transactions/template?command=close-rescheduled
loans/1/transactions/template?command=close
loans/1/transactions/template?command=disburse
loans/1/transactions/template?command=disburseToSavings
loans/1/transactions/template?command=recoverypayment
loans/1/transactions/template?command=prepayLoan
loans/1/transactions/template?command=refundbycash
loans/1/transactions/template?command=refundbytransfer
loans/1/transactions/template?command=foreclosure
loans/1/transactions/template?command=interestPaymentWaiver
loans/1/transactions/template?command=creditBalanceRefund (returned 'amount' field will have the overpaid value)
loans/1/transactions/template?command=charge-off
loans/1/transactions/template?command=downPayment
loans/1/transactions/template?command=interest-refund

## Parameters
- `loanId` (path, integer, required): loanId
- `command` (query, string): command
- `dateFormat` (query, string): dateFormat
- `transactionDate` (query, object): transactionDate
- `locale` (query, string): locale
- `transactionId` (query, integer): transactionId

## Responses
- `200`: OK

## Response fields
- `amount` (number)
- `chargeOffReasonOptions` (array of GetLoanProductsChargeOffReasonOptions)
- `classificationOptions` (array of GetCodeValuesDataResponse)
- `currency` (GetLoanCurrency)
- `date` (string)
- `feeChargesPortion` (number)
- `interestPortion` (number)
- `netDisbursalAmount` (number)
- `paymentTypeOptions` (array of GetPaymentTypeOptions)
- `penaltyChargesPortion` (number)
- `principalPortion` (number)
- `total` (GetLoansTotal)
- `type` (GetLoansTransactionType)

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

## Example response
```json
{
  "amount": 200,
  "chargeOffReasonOptions": [
    {}
  ],
  "classificationOptions": [
    {}
  ],
  "currency": {
    "code": "UGX",
    "decimalPlaces": 2,
    "displayLabel": "Uganda Shilling (USh)",
    "displaySymbol": "USh"
  }
}
```

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