# Get Check Deposit Bank Accounts

> `GET /inboxes/{inbox_id}/check-deposit-bank-accounts`

Web page: https://reference.earthclassmail.com/v1/rest-api/spec/operations/listcheckdepositbankaccounts/

URL: `GET https://api.earthclassmail.com/v1/inboxes/{inbox_id}/check-deposit-bank-accounts`

Returns the bank accounts checks from this inbox can be deposited to. Use an account's `id` as `check_deposit_bank_account_id` in [Request Check Deposit](https://reference.earthclassmail.com/_llms_txt/v1/rest-api/spec/operations/requestcheckdeposit.md).

Every member of the inbox sees the same accounts. Only inbox admins receive `routing_number` and the `contact_*` fields; other callers get the ID, display name, bank, account type and masked account number.

## Authorization

Send your API key in the `x-api-key` header.

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `inbox_id` | path | yes | string |  |
| `page` | query | no | integer | The desired page from the result set. Defaults to 1. |
| `per_page` | query | no | integer | The number of items per page. Defaults to 100. |

## Responses

### 200

Success

Content type: `application/json`

- `total` (integer): Total number of items across all pages.
- `per_page` (integer): Number of items per page.
- `current_page` (integer): The current page number (1-based).
- `last_page` (integer): The last available page number.
- `from` (integer): The index of the first item on this page (1-based).
- `to` (integer): The index of the last item on this page (1-based).
- `data` (array of `InboxCheckDepositBankAccount`)

Example:

```json
{
  "current_page": 1,
  "data": [
    {
      "id": 500,
      "created_at": "2020-04-01T09:00:00Z",
      "updated_at": "2020-04-01T09:00:00Z",
      "inbox_id": 100003,
      "check_processing_system_type": 0,
      "account_number": "********4510",
      "account_display_name": "Business Checking",
      "account_type": "checking",
      "financial_institution": {
        "id": 42,
        "name": "First National Bank",
        "expedited": true
      }
    }
  ],
  "from": 1,
  "last_page": 1,
  "per_page": 100,
  "to": 1,
  "total": 1
}
```

### 401

The `x-api-key` header is missing or the key is not valid, or the caller can't access an ID in the request. IDs that don't exist return the same response as IDs the caller can't access.

Content type: `application/json`

Type: `Error`

Example — Missing API key:

```json
{
  "error": {
    "code": 401,
    "message": "The request does not include a valid access token. Please provide a valid access token.",
    "type": "Authorization"
  }
}
```

Example — Invalid API key:

```json
{
  "error": {
    "code": 401,
    "message": "x-api-key: x-api-key is invalid",
    "type": "REST"
  }
}
```

Example — No access to resource:

```json
{
  "error": {
    "code": 401,
    "message": "User does not have access to requested resource.",
    "type": "Authorization"
  }
}
```

## Schemas

### Error

Error envelope returned with 4xx and 5xx responses.

- `error` (object)
  - `code` (integer): Usually the HTTP status code. It can differ; a request to an unknown path returns HTTP 400 with code 500.
  - `message` (string): Human-readable description of the error.
  - `type` (string): The kind of error, for example `Authorization` or `REST`.
  - `fields` (object): Returned only with `422` responses. It may give more details about what failed validation, as lists of messages keyed by the name of the input.

### InboxCheckDepositBankAccount

- `id` (integer)
- `created_at` (string<date-time>)
- `updated_at` (string<date-time>)
- `inbox_id` (integer or null)
- `routing_number` (string)
- `check_processing_system_type` (integer)
- `account_number` (string)
- `account_display_name` (string)
- `account_type` (string)
- `financial_institution` (`BankingInstitution`)
- `contact_name` (string)
- `contact_business` (string)
- `contact_address` (string)
- `contact_phone` (string)
- `rdc` (boolean)

### BankingInstitution

- `id` (integer)
- `name` (string)
- `routing_number` (string)
- `has_shipping_address` (boolean)
- `shipping_banking_institution_id` (integer or null)
- `expedited` (boolean): When `true`, every deposit to this bank ships overnight at no extra cost, so there's no need to request `expedited`.
- `shipping_addresses` (array of `ShippingAddress`)
- `rdc` (boolean)
- `rdcVerified` (boolean)

### ShippingAddress

- `id` (integer)
- `created_at` (string<date-time>)
- `updated_at` (string<date-time>)
- `addressee` (string)
- `address_line_1` (string)
- `address_line_2` (string)
- `locality` (string)
- `region_abbreviation` (string)
- `region` (string)
- `country_abbreviation` (string)
- `country` (string)
- `postal_code` (string)
- `phone` (string)
- `tags` (array of string)
- `delivery_confidence_percent` (number or null)
- `inbox_id` (integer or null)
- `company` (string or null)
- `is_authorized` (boolean or null)
- `requires_hs_tariff_codes` (boolean or null)
- `requires_itn` (boolean or null)
