# Get all bank details

`GET /api/configuration/bank-details`

- **Success:** `200 OK`
- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Get all bank details](https://support.gladstonesoftware.cloud/reference/configuration/get-all-bank-details)

## Overview

Lists the banks the operator has recorded, keyed by sort code. This is a **local address book maintained by the operator**, not a lookup of the UK banking industry's sort code directory: entries exist only because someone at the operator typed them in or imported them, so the list is usually short, may be stale, and cannot be relied on to contain the bank behind an arbitrary sort code. Use it to offer a picker of known banks when capturing Direct Debit details, and fall back to free entry when the sort code you need is absent.

Every field except `sortCode` is nullable, so expect entries that are little more than a sort code and a name.

The response is always `200`; when no banks are configured you get an empty array `[]`, not a `404` or a `204`. A non-empty list can briefly lag behind a change; an empty list is always current.

Nothing is filtered — there is no active/inactive flag on a bank, so a branch that has since closed or merged stays in the list until the operator deletes it.

## Endpoint

`GET {base_url}/api/configuration/bank-details`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Sample request

```bash title="cURL"
curl -X GET '{base_url}/api/configuration/bank-details' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `[].sortCode` | string | The bank branch sort code, unique within your tenant and the value you pass to the single-bank lookup. Up to 25 characters can be returned, but the create and update endpoints reject anything over 6 ("The Sort Code cannot be more than 6 characters"), so in practice this is a 6-digit code. **The value is exactly what the operator typed** — the API applies no formatting, so you may see `123456` in one entry and separators in another; normalise before comparing. |
| `[].name` | string | The bank's name, for example the institution rather than the branch. Maximum 25 characters — short enough that longer bank names are routinely truncated or abbreviated by whoever entered them, so do not match on it. Required when creating a bank ("The Name must not be empty"), but banks created outside the API can come back with `null`. |
| `[].branchName` | string | The specific branch this sort code belongs to. Maximum 25 characters. Optional — `null` or empty when the operator recorded only the institution. |
| `[].propertyName` | string | First line of the branch address: the building name or number. Maximum 25 characters. Optional. Together with `street`, `locality`, `town`, `region`, `country` and `postcode` this forms an address in no fixed shape — any of the lines may be empty, so build the display address by joining the non-empty parts rather than assuming a fixed number of lines. |
| `[].street` | string | Street line of the branch address. Maximum 25 characters. Optional. |
| `[].locality` | string | The district or village line of the address, sitting between `street` and `town`. Maximum 25 characters. Optional and frequently unused. |
| `[].town` | string | Town or city of the branch address. Maximum 25 characters. Optional. |
| `[].region` | string | County, state or region line. Maximum 25 characters. Optional. Free text — not a code from any list this API publishes. |
| `[].country` | string | Country of the branch address. Maximum 25 characters. Optional, and **free text rather than an ISO country code** — expect `UK`, `United Kingdom`, `GB` and blank to all appear across a single tenant. |
| `[].postcode` | string | Postcode of the branch address. Maximum 10 characters — the tightest limit on the record. Optional, and returned exactly as typed, so spacing and case are inconsistent. |
| `[].telephone` | string | Contact telephone number for the branch. Maximum 25 characters. Optional, free text with no format enforced, so it may include spaces, an international prefix, or an extension. |

## Sample response

```json title="200 OK"
[
  {
    "sortCode": "string",
    "name": "string",
    "branchName": "string",
    "propertyName": "string",
    "street": "string",
    "locality": "string",
    "town": "string",
    "region": "string",
    "country": "string",
    "postcode": "string",
    "telephone": "string"
  }
]
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `500` | Internal server error | Any unexpected server-side failure while reading the bank list. The response is a bare status code with **no body**, so there is nothing to distinguish one cause of failure from another. Retry with backoff. |
