# Update a Loan Charge

`PUT /lokta-lms/api/v1/loans/{loanId}/charges/{loanChargeId}`

Currently Loan Charges may be updated only if the Loan is not yet approved

## Parameters
- `loanId` (path, integer, required): loanId
- `loanChargeId` (path, integer, required): loanChargeId

## Request body (application/json)
- `amount` (number)
- `dateFormat` (string)
- `dueDate` (string)
- `locale` (string)

## Responses
- `200`: OK

## Response fields
- `changes` (PutLoansLoanIdChargesChargeIdRequest):  PutLoansLoanIdChargesChargeIdRequest
- `clientId` (integer)
- `loanId` (integer)
- `officeId` (integer)
- `resourceExternalId` (string)
- `resourceId` (integer)

## Example request (cURL)
```bash
curl -X PUT \
  'https://default.lokta.tech/lokta-lms/api/v1/loans/{loanId}/charges/{loanChargeId}' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default' \
  -H 'Content-Type: application/json' \
  -d '{
  "amount": 60,
  "dateFormat": "dd MMMM yyyy",
  "dueDate": "27 March 2013",
  "locale": "en"
}'
```

## Example response
```json
{
  "changes": {
    "amount": 60,
    "dateFormat": "dd MMMM yyyy",
    "dueDate": "27 March 2013",
    "locale": "en"
  },
  "clientId": 1,
  "loanId": 1,
  "officeId": 1
}
```

Interactive: https://developer.lokta.ai/reference#operation/updateLoanCharge
