apyhub
DATA VALIDATION · FINANCE

Validate SWIFT/BIC API

Hosted on ApyHub

What it does

SWIFT Code Validator checks whether a BIC/SWIFT code is valid and returns the parts that make it up. Send a bic value in the request body and get back either false for an invalid code or a validation object with valid, bank_code, branch_code, country_code, and location_code.

Use it when you need to verify bank identifiers before storing them, routing payments, or accepting financial details in a form. Because SWIFT codes are used across international banking workflows, catching malformed values early helps reduce downstream payment errors and support issues.

The response is straightforward to parse and fits well into validation pipelines, checkout flows, onboarding checks, and internal tooling. If the code is well formed, you get the component fields you can log or compare against your own records; if it is not, you get a simple invalid result.

POST
Validate a BIC / SWIFT code
http://localhost:8080/apyhub/validate-swift-bic-code
QUICKSTARTGUIDE

Quickstart

Validate a BIC/SWIFT code by sending it in a JSON body.

curl -X POST "http://localhost:8080/apyhub/validate-swift-bic-code" \
  -H "apy-token: $APY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"bic":"ABNANL2A"}'

What you'll get back

Returns a JSON object with a data field. data can be either a boolean false when the BIC is invalid, or an object with validation details: valid, bank_code, branch_code, country_code, and location_code.

{
  "data": {
    "valid": true,
    "bank_code": "ABNA",
    "branch_code": "XXX",
    "country_code": "NL",
    "location_code": "2A"
  }
}
TRY ITLIVE · 5 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
body*
BIC/SWIFT code to validate (8 or 11 characters).

About this endpoint

What it does

Validates a BIC/SWIFT code submitted in the request body. The response returns a data field whose shape depends on the validation result: either a boolean false for an invalid code, or an object with parsed BIC details and a valid flag.

Request Body

ParameterTypeMandatoryDescription
bicStringYesBIC/SWIFT code to validate. Must be 8 or 11 characters.

Response

Returns a JSON object with a required data field. data is either a boolean false when the BIC is invalid, or an object containing valid, bank_code, branch_code, country_code, and location_code fields.

ParameterTypeMandatoryDescription
dataENUMYesEither false when the BIC is invalid, or an object with the following fields when valid: valid (Boolean), bank_code (String), branch_code (String), country_code (String), location_code (String).

Body

Name
Type
Description
bodyREQUIRED
object
▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.