New Zealand National Clearing Code (NCC) API Lookup Documentations

Our New Zealand National Clearing Code (NCC) API lookup function allows you to automate NCC Lookup by a simple HTTP GET request. For casual user who is not interested to use API, similar function is available in NCC page.

The function will return the result in either XML or JSON format. The default format is XML, but if you prefer to have the result in JSON format simply specify JSON format in the request. You can parse both format easily into various programming languages and platforms.

This page will describe on how to use our NCC API and the expected result you will receive from our systems.

As part of system security and protection, you require to have an API key in order to access our API function, which will be given once you register for API Access.

How to do National Clearing Code (NCC) Lookup through API?


National Clearing Code (NCC) Lookup through our API is very simple. What you need to do is make a GET request.

General API Call Format

The default result format is in XML. If you want to get the result in this format, simply follow the API request as below,


https://api.bank.codes/nz-ncc/?format=[FORMAT]&api_key=[API_KEY]&bsb=[NCC]

OR
https://api.bank.codes/nz-ncc/[FORMAT]/[API_KEY]/[NCC]/

Input DataExplanation
[FORMAT]Specify the format of the output. Accept "xml" or "json"
[API_KEY]API Key assign to your account
[NCC]National Clearing Code (NCC) which you would like to check in the format of XXYYYY.

1. XML Format Example


https://api.bank.codes/nz-ncc/?format=xml&api_key=9fc53b3db09ca830488d19546a4fc2a1&bsb=012-002

OR
https://api.bank.codes/nz-ncc/xml/9fc53b3db09ca830488d19546a4fc2a1/012-002/

Expected Result in XML


<result>
  <ncc>020100</ncc>
  <bank_number>02</bank_number>
  <branch_number>0100</branch_number>
  <bic>BKNZNZ22100</bic>
  <bank>Bank of New Zealand</bank>
  <branch>Auckland</branch>
  <address>80 Queen Street</address>
  <city>Auckland</city>
  <postcode>1010</postcode>
  <std>(09)</std>
  <phone>375-1293</phone>
  <fax>375-1301</fax>
  <valid>true</valid>
</result>

2. JSON Format Example


https://api.bank.codes/nz-ncc/?format=json&api_key=9fc53b3db09ca830488d19546a4fc2a1&bsb=012-002

OR
https://api.bank.codes/nz-ncc/json/9fc53b3db09ca830488d19546a4fc2a1/012-002/

Expected Result in JSON


{
    "ncc": "020100",
    "bank_number": "02",
    "branch_number": "0100",
    "bic": "BKNZNZ22100",
    "bank": "Bank of New Zealand",
    "branch": "Auckland",
    "address": "80 Queen Street",
    "city": "Auckland",
    "postcode": "1010",
    "std": "(09)",
    "phone": "375-1293",
    "fax": "375-1301",
    "valid": "true"
}

3. Error Messages

In some cases, the API may return a response containing error message. Below you can find a description of all possible error messages.

Error IDError MessageExplanation
1001API Key Not SpecifiedYou need to specify your API Key while making API request. Kindly check the API Key in user area.
1002Invalid API KeyPlease make sure that you specify the correct API Key assign to your account. Kindly check the correct API Key in the user area.
1003Suspended API KeyYour API Key was suspended due to system abuse. Kindly contact support.
1004API Usage Limit ExceededYou have exceeded the daily limit allocated to your account. You may purchase additional credit in the user area.
1005National Clearing Code (NCC) Not SpecifiedYou need to specify National Clearing Code (NCC) you want to check.
1006Invalid National Clearing Code (NCC)Please make sure that you specify National Clearing Code (NCC) in the correct format of xxyyyy.
1007National Clearing Code (NCC) Not FoundThe National Clearing Code (NCC) that you submitted is not found in our database.