SortWare REST API Specifications


Developer Integration Reference

The SortWare API uses REST based endpoints for easy and straight forward integration.


Input

A simple set of HTTP POST/GET input parameters for it's core functionality. The accepted parameters are listed in the table below:

Accepted Input Fields
Field Name Length Type Description
sortcode 6 Numeric The Sort Code
account 8 Numeric Bank Account Number
api_key 32 String Your personal API key.
search 6 Numeric (optional) Sort Code for directory search.

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.php?api_key=[API_KEY]&sortcode=[SORT]&account=[ACCOUNT]

The sort code API also can perform sort code searches only by submitting the following request:
https://api.iban.com/clients/api/sort-api.php?api_key=[API_KEY]&search=[SORT]


Output

A detailed description of the fields returned can be seen in the table below:

API Response Values
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.
COUNTRY_CODE 2 String Two letter abbreviation of the country code e.g. US, UK, AU, FR … etc.
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_ADDRESS 128 String Address of the current bank or branch.
BANK_CITY 128 String The name of the city in which the branch is located.
BANK_POSTALCODE 128 String Postal Code of the bank branch.
BANK_PHONE 128 String Main contact phone number for the bank or branch.
DIRECT_DEBITS 3 String Marker identifying if current branch supports Direct Debity Payment scheme. Values: YES or NO
PFS_PAYMENTS 3 String Marker identifying if current branch supports Faster Payments scheme. Values: YES or NO
CHAPS 3 String Marker identifying if current branch supports CHAPS scheme. Values: YES or NO
BACS 3 String Marker identifying if current branch supports BACS Payment scheme. Values: YES or NO
CCC_PAYMENTS 3 String Marker identifying if current branch supports CHEQUE & CREDIT CLEARING. Values: YES or NO
COUNTRY 32 String Full name of the country of origin e.g. “United States”

Below you can find a simple XSD schema of the XML response:

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="result">
    <xs:complexType>
      <xs:sequence>
        <xs:element type="xs:int" name="sort_code"/>
        <xs:element type="xs:int" name="account"/>
        <xs:element type="xs:string" name="iban"/>
        <xs:element type="xs:string" name="country"/>
        <xs:element type="xs:string" name="bank_name"/>
        <xs:element type="xs:string" name="bank_bic"/>
        <xs:element type="xs:string" name="chaps_bic"/>
        <xs:element type="xs:string" name="bank_address"/>
        <xs:element type="xs:string" name="bank_city"/>
        <xs:element type="xs:string" name="bank_postalcode"/>
        <xs:element type="xs:string" name="bank_phone"/>
        <xs:element type="xs:string" name="direct_debits"/>
        <xs:element type="xs:string" name="pfs_payments"/>
        <xs:element type="xs:string" name="chaps"/>
        <xs:element type="xs:string" name="bacs"/>
        <xs:element type="xs:string" name="ccc_payments"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

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>


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>