Sortware API

This version of the API is no longer supported. Please visit our SortWare API V4 documentation page for current version of this document.

Sort Code and Account Number Validation API Specifications

1. What is the IBAN Calculation API?

Reverse SORT code is an online system, which provides businesses with an interface where they can perform real-time SORT code validation and identification.

Those functions come in the form of add-on modules, which expand the functionality of your portal.

The SORT module adds access to our extensive SORT code database to your portal. You can access the data through an API and make automatic calls or integrate the SORT/BIC identification database in your software solution.

2. Features

SORT module provides you with the following functionality:

  • Retrieve information about the bank based on the sort code.
  • Automatically generates a valid IBAN format for the supplied sort code and account number
  • Identify support of FPS payments/CHAPS and Direct Debit for the account/bank/sort combination.
  • Multiple results displayed in a code-friendly XML structured response

3. API Usage

The API system allows you to automate Sort code validation via a simple HTTP GET or POST request.

The accepted parameters are listed in the table below:

Field Name Length Type Description
sortcode 6 String The Sort Code
account 8 String Bank Account Number
api_key 128 String Your personal API key.
Inside your Online Portal you can find your API key, which is used to secure the search requests.

EXAMPLE Sort Code and Account Number validation query.
An example usage of the SORT Code API with a GET request can be found below:

https://api.iban.com/clients/api/sort-api-eiscd.php?api_key=[API_KEY]&sortcode=[SORT]&account=[ACCOUNT]

Where:

  • API is your API key
  • SORT is the bank’s sort code.
  • Account is the account number.
  • Once an HTTP GET or POST request is made with the correct API key, the system will return the results in an XML format.


The sort code API also can perform sort code searches only by submitting the following request:

https://api.iban.com/clients/api/sort-api-eiscd.php?api_key=[API_KEY]&search=[SORT]

You can find an example XML response in the next section “API XML Response Structure”

4. API XML Response Structure

An XML Schema of the API’s response can be found in the documentation archive.
A detailed description of the fields returned can be seen in the table below:

Field Name Length Type Description
SORT_CODE 8 or 11 String The SORT/BIC code you searched for is displayed if searching by SORT code. If searching by bank name the SORT code of the corresponding bank and branch is displayed.
ACCOUNT 8 String The Account Number you submitted is displayed for back reference.
IBAN 256 String An International Bank Account Number is generated from the Sort Code and Account Number supplied.
BANK_NAME 256 String Name of the bank or financial institution which owns this SORT/BIC number.
BANK_BIC 11 String BIC Code of the corresponding bank branch.
CHAPS_BIC 11 String BIC code required for CHAPS transactions to clients of this specific bank branch.
BANK_BRANCH 128 String Name of the specific branch to which the SORT/BIC code is assigned.
COUNTRY 32 String Full name of the country of origin e.g. “United States”
COUNTRY_CODE 2 String Two letter abbreviation of the country code e.g. US, UK, AU, FR … etc.
BANK_CITY 128 String The name of the city in which the branch is located.
BANK_ADDRESS 128 String Address of the current bank or branch.
The API system returns results in XML format, which is easy to parse in a variety of programming languages and platforms.

A sample XML reply from the API for a SORT code search would be:

<result>
<sort_code>200415</sort_code>
<account>38290008</account>
<iban>GB37BARC20041538290008</iban>
<country>GB</country>
<bank_name>BARCLAYS BANK PLC</bank_name>
<bank_bic>BARCGB2108L</bank_bic>
<chaps_bic>BARCGB22</chaps_bic>
<bank_address>Dept AC Barclaycard House</bank_address>
<bank_city>Northampton</bank_city>
<bank_postalcode>NN4 7SG</bank_postalcode>
<bank_phone>01604 234234</bank_phone>
<direct_debits>NO</direct_debits>
<pfs_payments>YES</pfs_payments>
<chaps>YES</chaps>
<bacs>YES</bacs>
<ccc_payments>NO</ccc_payments>
</result>


5. API Errors

In case of an error the SORT API returns an XML response containing the error message.

The XML tags are returned without any other fields in the XML response.

Below you can find a description of all possible error messages that could be returned:

<error>Subscription Expired</error>
<error>Invalid API Key</error>
<error>Account number or Sort code is not valid!</error>
<error>Sort code cannot be found</error>
<error>No more queries available, you need to purchase additional queries.</error>