Get all bank details

GET /api/configuration/bank-details

Success: 200 OK

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.

Sample request

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

Response fields

FieldTypeDescription
[].sortCodestringThe 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.
[].namestringThe 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.
[].branchNamestringThe specific branch this sort code belongs to. Maximum 25 characters. Optional — null or empty when the operator recorded only the institution.
[].propertyNamestringFirst 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.
[].streetstringStreet line of the branch address. Maximum 25 characters. Optional.
[].localitystringThe district or village line of the address, sitting between street and town. Maximum 25 characters. Optional and frequently unused.
[].townstringTown or city of the branch address. Maximum 25 characters. Optional.
[].regionstringCounty, state or region line. Maximum 25 characters. Optional. Free text — not a code from any list this API publishes.
[].countrystringCountry 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.
[].postcodestringPostcode 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.
[].telephonestringContact 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

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

StatusMeaningWhen
500Internal server errorAny 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.

This page as markdown · All pages · llms.txt