# Correct a payout account's details

`PATCH /lokta-lms/api/v1/sourcing-partners/{partnerId}/bank-accounts/{bankAccountId}`

Corrects the details of a payout account, with a reason.

Editable: `beneficiary_name`, `bank_name`, `branch_name`, `account_type`. Null leaves a field alone.

**`reason` is required**, unlike every other PATCH here. This is the record most worth changing fraudulently, the change log exists for exactly this write, and an unexplained edit is the shape a fraudulent one takes.

**`account_number` and `ifsc` are not editable.** A different account number is a different account: correcting one in place would silently re-point every future payout while keeping the row's identity, verification status and history, so the record would claim an account had been verified when the verified thing was a different account. Add the new account and promote it instead.

## Parameters
- `partnerId` (path, string, required)
- `bankAccountId` (path, string, required)
- `Idempotency-Key` (header, string): Per-intent key

## Request body (application/json)
- `reason` (string, required): Required, unlike other edits here. It is recorded in the change log.
- `beneficiary_name` (string): Null leaves the field alone.
- `bank_name` (string): Null leaves the field alone.
- `branch_name` (string): Null leaves the field alone.
- `account_type` (string): Null leaves the field alone.

## Responses
- `default`: default response

## Example request (cURL)
```bash
curl -X PATCH \
  'https://default.lokta.tech/lokta-lms/api/v1/sourcing-partners/{partnerId}/bank-accounts/{bankAccountId}' \
  -u '{username}:{password}' \
  -H 'Tenant-Identifier: default' \
  -H 'Content-Type: application/json' \
  -d '{
  "reason": "string",
  "beneficiary_name": "string",
  "bank_name": "string",
  "branch_name": "string",
  "account_type": "savings"
}'
```

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