Get all site bank accounts

GET /api/configuration/{siteId}/bank-accounts

Success: 200 OK

Overview

Returns the bank accounts a single site collects money into. An operator configures at most one account per EFT system — Gladstone's term for a funds-transfer collection scheme such as BACS Direct Debit, SEPA or Australian Direct Debit. Each scheme has its own file format and its own set of mandatory account fields, which is why a site can hold several accounts at once and why most fields below are populated for some schemes and null for others.

A site holds at most one account per EFT system, so eftsystemId is unique within the array and the array length equals the number of schemes configured for that site. Use an eftsystemId from this response as the path segment on Get site bank accounts by EFT system ID, Create or update site bank account and Delete site bank account. The catalogue of EFT systems themselves is available from Get all EFT systems.

The empty case returns 404, not an empty array, and the message is misleading. If the site exists but has no bank accounts configured, the endpoint returns 404 with the body Site with id {siteId} was not found — byte-for-byte the same response as a site id that does not exist at all. You cannot tell the two apart from this endpoint. Confirm the site separately with Get site by ID before concluding a site is absent.

There is no active, inactive or deleted flag on a site bank account, and nothing is filtered beyond the site id, so every configured account is returned. Retiring an account means deleting it.

Two further behaviours worth planning for:

The account data returned here is in clear text; iban in particular is classed as confidential banking data. Treat the whole response accordingly.

Endpoint

GET {base_url}/api/configuration/{siteId}/bank-accounts

{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.

Path parameters

NameTypeRequiredDescription
siteIdstringYesThe site whose accounts you want. Operator-defined and up to 15 characters, so it is meaningful only within one tenant — take it from the id of a site returned by Get all sites rather than hardcoding it. Match its case exactly; see the Overview.

Sample request

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

Response fields

Every field can be null apart from eftsystemId and siteId. Which of them carry a value depends entirely on the collection scheme, as noted per field. The maximum lengths given are those that can be returned; the create/update endpoint enforces its own, shorter, limits, so accounts written by older tooling can be longer than a new write would allow.

FieldTypeDescription
[].bankCodestringThe scheme-level bank identifier used by the French and Italian direct-debit formats, and also required when writing accounts for BACS credit-card collections (13) and the two Belgian schemes (19, 20). Null for schemes that do not use it. Up to 25 characters returned; writes are capped at 5.
[].cdtfidstringAn Australian-scheme identifier, required when writing an account for Australian credit-card collections (14) and null elsewhere. Up to 25 characters returned; writes are capped at 3.
[].eftsystemIdinteger (int32)The collection scheme this account is used for, and unique within one site's accounts. Unlike most Gladstone configuration ids these are platform-wide and identical in every tenant: 1 BACS - DD, 2 A.I.B, 3 Ulster Bank, 4 National Irish Bank, 5 Bank Of Ireland, 6 Australian - DD, 7 Dutch - Guilders, 8 French, 9 Spanish, 10 Swiss - Bank, 11 German, 12 Italian, 13 BACS - CC, 14 Australian - CC, 15 Swiss - Post Office, 16 Austrian, 17 Dutch Euros, 18 Swedish, 19 Belgian Francs, 20 Belgian Euros, 21 SmartDebit - DD, 22 SmartDebit - UPG, 23 Danske Bank. Only the schemes an operator has configured for the site appear in the response.
[].financialInstitutionstringThe financial-institution code the Australian direct-debit format requires; also required when writing an account for the two Belgian schemes (19, 20). Null for schemes that do not use it. Up to 25 characters returned; writes are capped at 3.
[].merchantNumberstringThe merchant number for the card-collection schemes — required when writing an account for BACS - CC (13) or Australian - CC (14), and null for the direct-debit schemes. Up to 25 characters returned; writes are capped at 10.
[].namestringThe bank account name. The only field every scheme requires, so it is populated on every account. Up to 32 characters returned; writes are capped at 25.
[].numberstringThe bank account number. Required by every scheme except Spanish (9), SmartDebit - DD (21) and SmartDebit - UPG (22), which need only name. Up to 30 characters returned; writes are capped at 8.
[].originatorPlusIndinteger (int32)Applies only to Bank Of Ireland (5); 0 no, 1 yes. Expect null on accounts for every other scheme.
[].processInAuddisRuninteger (int32)Whether this account is included when an AUDDIS run is performed; 0 no, 1 yes. May be null on accounts where the flag was never set.
[].siteIdstringEchoes the siteId path parameter; identical on every element of the array.
[].sortCodestringThe account sort code. A write is rejected without it for schemes 2, 3, 4, 5 (the Irish banks), 6 (Australian - DD), 8 (French), 12 (Italian), 13 (BACS - CC) and 19, 20 (Belgian); the remaining schemes, BACS - DD (1) included, do not require it. Up to 25 characters returned; writes are capped at 6.
[].userNumberstringThe direct-debit user number the operator was issued by the scheme. Used in Australia, France, Ireland and Italy; a write is rejected without it for schemes 2, 3, 4, 5, 6, 8, 12, 13, 15 and 19, 20. Null for schemes that do not use it. Up to 25 characters returned; writes are capped at 6.
[].bicstringThe SEPA equivalent of the sort code. Populated for the SEPA-style schemes; a write is rejected outright when the EFT system has BIC marked mandatory, which is the case for every standard scheme except German (11). Up to 25 characters.
[].ibanstringThe SEPA equivalent of the account number. A write is rejected when the EFT system both shows BIC/IBAN for sites and has BIC marked mandatory. Up to 50 characters. Classed as confidential banking data — do not log or cache it in the clear.

Sample response

200 OK
[
  {
    "bankCode": "string",
    "cdtfid": "string",
    "eftsystemId": 12345,
    "financialInstitution": "string",
    "merchantNumber": "string",
    "name": "string",
    "number": "string",
    "originatorPlusInd": 1,
    "processInAuddisRun": 1,
    "siteId": "string",
    "sortCode": "string",
    "userNumber": "string",
    "bic": "string",
    "iban": "string"
  }
]

Errors

StatusMeaningWhen
404Not foundReturned with the body Site with id {siteId} was not found in two different situations: the site id does not exist, or the site exists but has no bank accounts configured. The response is identical in both cases. A site id whose case does not match the site's exactly falls into the second case.
500Internal server errorAny unexpected server-side failure while loading the site or its accounts. The body is empty and carries no detail.

This page as markdown · All pages · llms.txt