# Update the bank customer ID on an LRS bank account

Sets `bank_customer_id` on a customer's LRS bank account, for example to correct a value the customer entered wrongly. Any existing value is replaced. The value is checked against the rules of the account's bank.

Endpoint: PATCH /customer/{id}/bank_account/{bank_account_id}
Version: 1.0.0
Security: JWT

## Security:

  - `JWT` (unknown)
    http bearer JWT

## Path parameters:

  - `id` (string, required)
    The ID of the customer

  - `bank_account_id` (string, required)
    The ID of the LRS bank account

## Request fields (application/json):

  - `bank_customer_id` (string)
    The customer's identifier at their bank. Required for banks that use one. For those banks it must contain only digits, with a length inside the range the bank accepts. For other banks it is optional; omitting it clears the value.
    Example: 12345678

## Response 200:

  - `200` (unknown)
    Bank customer ID updated

## Response 200 fields (application/json):

  - `id` (string)
    Unique identifier of the LRS bank account. It starts with `acclrs_`.
    Example: acclrs_68468c03g9xt7

  - `bank_code` (string)
    Code of the customer's bank. Must be a `bank_code` returned by `GET /lrs/banks` for your account, matched exactly and case-sensitively. An LRS order that uses this account must use a quote created for the same `bank_code`, or the order is rejected.
    Example: hdfc

  - `account_number` (string)
    The customer's account number at that bank. Digits only, with a length inside the range that bank accepts. Returned in full, as sent, in the response.
    Example: 12345678901234

  - `bank_customer_id` (string)
    Optional. The customer's identifier at their bank. For banks that use one, it must contain only digits, with a length inside the range that bank accepts; an invalid value is rejected with `400`.
    Example: 12345678

## Response 400:

  - `400` (unknown)
    Bad Request — the customer does not exist on your account, `bank_customer_id` is missing for a bank that uses one, or it is not all digits or its length is outside the range the bank accepts.

## Response 400 fields (application/json):

  - `error` (string)
    Example: Bad Request

  - `message` (string)
    Example: Bank customer id can't be blank

## Response 401:

  - `401` (unknown)
    Unauthorized — invalid or missing authentication token

## Response 401 fields (application/json):

  - `error` (string)
    Example: Unauthorized

  - `message` (string)
    Example: Missing token

## Response 404:

  - `404` (unknown)
    Not Found — the customer has no bank account with this ID.

## Response 404 fields (application/json):

  - `error` (string)
    Example: Not Found

  - `message` (string)
    Example: Bank account not found

## Response 400 examples:

  - `Customer does not exist on your account` (unknown)

  - `bank_customer_id missing for a bank that uses one` (unknown)

  - `bank_customer_id contains a non-digit` (unknown)

