Delete site bank account

DELETE /api/configuration/{siteId}/bank-accounts/{eftSystemId}

Overview

Deletes the bank account a site uses for one EFT (electronic funds transfer) system. A site holds at most one bank account per EFT system, so the site and EFT system together identify the record; deleting one leaves the site's accounts for other EFT systems untouched.

The endpoint checks two things in order before deleting. First it confirms the site exists; if not you get 404 with Site with id {siteId} was not found. Then it confirms a bank account exists for that site and EFT system; if not you get 404 with Bank Account with site id {siteId} and eft system id {eftSystemId} was not found. Because existence is checked explicitly, repeating a successful delete returns 404 rather than a no-op.

The delete is permanent, and a following Retrieve all site bank accounts reflects the change straight away. A successful call returns 204 No Content with an empty body.

Endpoint

DELETE {base_url}/api/configuration/{siteId}/bank-accounts/{eftSystemId}

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

Path parameters

NameTypeRequiredDescription
siteIdstringYesThe site whose bank account you are removing, matching the id returned by Retrieve all sites. Validated first: an unrecognised site returns 404 before the bank account is looked at.
eftSystemIdinteger (int32)YesThe EFT system the account belongs to. Take it from the eftsystemId on an account returned by Retrieve all site bank accounts.

Sample request

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

Errors

StatusMeaningWhen
404Not foundEither Site with id {siteId} was not found when the site does not exist, or Bank Account with site id {siteId} and eft system id {eftSystemId} was not found when the site exists but has no account for that EFT system — which is also what a repeated delete returns. The message is returned as the response body.
500Internal server errorAny unexpected server-side failure during the delete. The body carries the error message, so treat a 500 here as retryable only after you have re-read the account.

This page as markdown · All pages · llms.txt