## Get Bank Account

`print_mail.bank_accounts.retrieve(strid)  -> BankAccount`

**get** `/print-mail/v1/bank_accounts/{id}`

Retrieve a bank account by ID.

### Parameters

- `id: str`

### Returns

- `class BankAccount: …`

  - `id: str`

    A unique ID prefixed with bank_account_

  - `account_number: str`

    The account number of the bank account.

  - `bank_country_code: BankAccountCountryCode`

    Countries typically have different bank account formats and standards. These are the countries
    which PostGrid's bank accounts API supports.

    - `"CA"`

    - `"US"`

  - `bank_name: str`

    The name of the bank.

  - `created_at: datetime`

    The UTC time at which this resource was created.

  - `live: bool`

    `true` if this is a live mode resource else `false`.

  - `object: Literal["bank_account"]`

    Always `bank_account`.

    - `"bank_account"`

  - `updated_at: datetime`

    The UTC time at which this resource was last updated.

  - `bank_primary_line: Optional[str]`

    The primary address line of the bank.

  - `bank_secondary_line: Optional[str]`

    The secondary address line of the bank.

  - `ca_designation_number: Optional[str]`

    The designation number of the bank account (for CA).

  - `description: Optional[str]`

    An optional string describing this resource. Will be visible in the API and the dashboard.

  - `metadata: Optional[Dict[str, object]]`

    See the section on Metadata.

  - `route_number: Optional[str]`

    The route number of the bank account (for CA).

  - `routing_number: Optional[str]`

    The routing number of the bank account (for US).

  - `signature_image: Optional[str]`

    A signed link to the signature image uploaded when this bank account was created. This is omitted if `signatureText` is present.

  - `signature_text: Optional[str]`

    The signature text PostGrid uses to generate a signature for cheques created using this bank account. This is omitted if `signatureImage` is present.

  - `transit_number: Optional[str]`

    The transit number of the bank account (for CA).

### Example

```python
import os
from postgrid import PostGrid

client = PostGrid(
    print_mail_api_key=os.environ.get("POSTGRID_PRINT_MAIL_API_KEY"),  # This is the default and can be omitted
)
bank_account = client.print_mail.bank_accounts.retrieve(
    "id",
)
print(bank_account.id)
```

#### Response

```json
{
  "id": "bank_account_12345",
  "object": "bank_account",
  "live": false,
  "bankName": "Test Bank",
  "bankPrimaryLine": "145 mulberry st",
  "bankSecondaryLine": "new york ny 10013",
  "bankCountryCode": "US",
  "accountNumber": "1234567",
  "routingNumber": "123456789",
  "signatureText": "Signature",
  "createdAt": "2020-11-12T23:23:47.974Z",
  "updatedAt": "2020-11-12T23:23:47.974Z"
}
```
