RBA Cash Rate: 4.35% · 1AUD = 0.67 USD · Inflation: 4.1%  
Leading Digital Marketing Experts</strong | 1300 235 433 | Aggregation Enquires Welcome | Book Appointment
Example Interest Rates: Home Loan Variable: 5.69% (5.89%*) • Home Loan Fixed: 5.39% (6.59%*) • Fixed: 5.39% (6.59%*) • Variable: 5.69% (5.89%*) • Investment IO: 5.69% (6.48%*) • Investment PI: 5.39% (6.59%*)

BSB Number API

BSB Number API

On the 23rd of November 2007 I built a quick website at BSBnumbers.com to return bank information and BSB numbers. The site predated the popularity of the iPhone and, like many sites of that era, didn't take mobile design into consideration. It's only now - nearly 10 years later - that we've completely revised the back-end of the site and built a temporary front-end. The website was the first of its kind at the time and, despite the numerous copycats, it hasn't lost relevance and has always maintained a consistent growth.

While the site always had an API, no part of it was ever public. The new API provides unrestricted access (to multiple endpoints) for registered users, and limited access for unregistered use. A large portion of our clientele are from the Aussie finance community and, as such, validating BSB numbers is an integral part of their service (normally just used to validate form input). Clients also have access to a plugin that'll essentially provide an AJAX-based full-featured search feature on their own site.

BSB API

A request to the API should follow the following structure: http://api.beliefmedia.com/bsb/{BSBnumber}.json. The BSB number should be 6 digits long (a hyphen is permitted). A valid request will return JSON data that unfolds as follows:

1
Array
2
(
3
    [status] => 200
4
    [message] => OK
5
    [code] => 200
6
    [data] => Array
7
        (
8
            [bsbnumber] => 062-146
9
            [instcode] => CBA
10
            [branchname] => North Strathfield
11
            [streetaddress] => 191 Concord Road
12
            [suburb] => North Strathfield
13
            [state] => NSW
14
            [postcode] => 2137
15
            [peh] => PEH
16
        )
17
 
18
)

Note that the status code (and message) just means that we processed your request. The code (key) determines if the number exists or not (200 meaning that the BSB exists). The four primary error codes you're likely to encounter are as follows:

  • 200 - BSB number exists. BSB Data will be returned in this case.
  • 404 - BSB number not found.
  • 400 - Invalid request. Note that any query with forbidden characters will usually simply be ignored. Validation of 6 numbers should usually be performed client-side.
  • 429 - Slow down. Unregistered users may see this message if they exceed guest limits.

PHP Function

A simple example to return whether a BSB number exists or not is as follows. Note that the function obviously doesn't determine if it is the correct number or not... so it's expected that you'll return the data to your page after input for verification.

1
<?php 
2
/*
3
 BSB Number API : http://www.beliefmedia.com/bsb-number-api
4
 Simple function checks if BSB number is valid
5
*/
6
 
7
function beliefmedia_bsb($bsb) {
8
 
9
  $data = @file_get_contents('http://api.beliefmedia.com/bsb/' . $bsb . '.json');
10
  if ($data === false) return '429';
11
 
12
  $data = json_decode($data, true);
13
  return ($data['code'] == '200') ? true : false;
14
}
15
 
16
$bsb = '062146';
17
echo (beliefmedia_bsb($bsb) !== false) ? 'Exists' : 'Does not exist';

Considerations

  • If you're a mortgage broker, or somebody that works in the finance field, please make touch with us. We tend to double finance leads in as little as a few days.
  • Registered users should add their API key to the request: http://api.beliefmedia.com/bsb/{BSBnumber}.json?apikey=12345.
  • The data is checked daily for updates.

■ ■ ■

 
Download our complimentary 650-page guide on marketing for mortgage brokers. We'll show you exactly how we generate billions in volume for our clients.
Finance Guide, Cropped Top and Bottom
  Timezone: 1 · [ CHANGE ]

RELATED READING

Like this article?

Share on Facebook
Share on Twitter
Share on Linkdin
Share on Pinterest

Leave a comment