Update bank details

PUT /api/configuration/bank-details/{sortCode}

Overview

Rewrites a stored bank record — the name, branch and postal address held against a UK sort code. These records are reference data used when direct debit details are captured, not a member's own bank account. Records are identified by sort code, so one record exists per sort code per tenant.

This is a full replacement, not a partial update. Every field in the table below is written on every call. Any field you leave out is written as null, wiping the stored value. To change one line of an address you must send the whole record back — read it first with GET /api/configuration/bank-details/{sortCode} and re-send every field you want to keep.

The sort code identifies the record and cannot be changed here: the value in the path and the value in the body must be identical, and the record is looked up by that value. To move details to a different sort code, create a new record and delete the old one.

The record must already exist. Unlike some configuration endpoints, an unknown sort code is reported properly, with 404. On success the response is 204 No Content and the change is visible on the next read.

Endpoint

PUT {base_url}/api/configuration/bank-details/{sortCode}

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

Path parameters

NameTypeRequiredDescription
sortCodestringYesSort code of the bank record to rewrite — it has nothing to do with sorting results. It must match the sortCode in the body exactly, character for character, or the request fails with 400. If no record exists for it the request fails with 404.

Request body

FieldTypeRequiredDescription
sortCodestringYesThe record's identifier, and the value used to find the record to update — so it identifies the record rather than changing it. Mandatory (The Sort Code must not be empty) and limited to 6 characters (The Sort Code cannot be more than 6 characters), so send the six digits without separators. Must equal the path value or the request fails with SortCode {sortCode} does not match sortCode from object.
namestringYesThe bank's name, as it should appear wherever the sort code is shown. Mandatory (The Name must not be empty), maximum 25 characters (The Name cannot be more than 25 characters) — a hard limit, with no leeway.
branchNamestringNoThe branch this sort code belongs to. Maximum 25 characters (The Branch Name cannot be more than 25 characters). Written on every call: omit it and the stored branch name is cleared.
propertyNamestringNoFirst line of the branch address — the building name or number. Maximum 25 characters (The Property Name cannot be more than 25 characters). Omitting it clears the stored value.
streetstringNoStreet of the branch address. Maximum 25 characters (The Street cannot be more than 25 characters). Omitting it clears the stored value.
localitystringNoDistrict or locality within the town, for addresses that need a line between street and town. Maximum 25 characters (The Locality cannot be more than 25 characters). Omitting it clears the stored value.
townstringNoTown or city of the branch address. Maximum 25 characters (The Town cannot be more than 25 characters). Omitting it clears the stored value.
regionstringNoCounty, state or region of the branch address. Maximum 25 characters (The Region cannot be more than 25 characters). Omitting it clears the stored value.
countrystringNoCountry of the branch address, as free text — there is no country code list behind this field. Maximum 25 characters (The Country cannot be more than 25 characters). Omitting it clears the stored value.
postcodestringNoPostcode of the branch address. Maximum 10 characters (The Postcode cannot be more than 10 characters), which is the tightest limit on the record. No format validation is applied, so any 10-character string is accepted. Omitting it clears the stored value.
telephonestringNoContact telephone number for the branch, as free text with no format validation. Maximum 25 characters (The Telephone cannot be more than 25 characters). Omitting it clears the stored value.

Sample request

cURL
curl -X PUT '{base_url}/api/configuration/bank-details/{sortCode}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "sortCode": "string",
  "name": "string",
  "branchName": "string",
  "propertyName": "string",
  "street": "string",
  "locality": "string",
  "town": "string",
  "region": "string",
  "country": "string",
  "postcode": "string",
  "telephone": "string"
}'

Errors

StatusMeaningWhen
400Bad requestThe sortCode in the body differs from the one in the path — body is SortCode {sortCode} does not match sortCode from object. Checked first, before the record is looked up.
400Bad requestBody validation failed: sortCode or name missing or blank, or any field over its maximum length. The response body is a validation problem document keyed by field name.
404Not foundNo bank record exists for that sort code — body is Bank details with sortCode {sortCode} doesn't exist.
500Internal server errorAn unexpected server-side failure, including a failure saving the record. No detail is returned.

This page as markdown · All pages · llms.txt